Commit Graph

7309 Commits

Author SHA1 Message Date
Parker Moore 34d172007b
Merge branch 'pathawks-rubocop/misc'
* pathawks-rubocop/misc:
  Fix Page#relative_path so that it consistently does NOT have the prepending slash (previously inconsistent)
  Rubocop cleanup for lib/jekyll/layout.rb
  Rubocop cleanup for lib/jekyll/plugin_manager.rb
  Rubocop cleanup for lib/jekyll/page.rb
2016-05-25 17:57:52 -07:00
Parker Moore 4fbbeddae2
Fix Page#relative_path so that it consistently does NOT have the prepending slash (previously inconsistent)
Fixes for #4946
2016-05-25 17:57:09 -07:00
jekyllbot cceb8c5876 Update history to reflect merge of #4949 [ci skip] 2016-05-25 16:24:30 -07:00
jekyllbot a15958d5a7 Merge pull request #4949 from jekyll/fix-drop-rubocop-errors
Merge pull request 4949
2016-05-25 16:24:29 -07:00
Parker Moore 6f1e1d80cd
Rubocop: drop changes from v3.1 forward-ports 2016-05-25 16:10:11 -07:00
Parker Moore b353e181c1
Update history to reflect merge of #4945
[ci skip]
2016-05-25 16:05:31 -07:00
Parker Moore aff1430608
Fix tests for document drop JSONification based on master updates. /cc #4914 2016-05-25 16:04:16 -07:00
Parker Moore e56e58e498
Merge branch 'master' into pathawks-fp/jsonify-drops
* master: (38 commits)
  Mention where it came from. [ci skip]
  Update history to reflect merge of #4944 [ci skip]
  Update history to reflect merge of #4943 [ci skip]
  Mention where it came from. [ci skip]
  Update history to reflect merge of #4942 [ci skip]
  Update history to reflect merge of #4941
  External: remove &block arg, use block_given?
  Update history to reflect merge of #4936 [ci skip]
  lib/jekyll.rb: require document_drop to ease our pain
  Sort the results of the require_all glob.
  Rubocop fixes
  Reset {{ layout }} between each render & merge layout data properly
  Add failing test for layout data inheritance bug (#4433)
  Add failing test for layout bug (#4897)
  Fix tests for plugins in configuration.
  Define Drop#each so we can use the new frozen/duping behavior
  Don't default 'include' and 'exclude' to an empty array
  Fix some minor things in the tests
  Freeze configuration defaults & duplicate in deep_merge_hashes if need be.
  Remove merge conflicts I forgot to fix.
  ...
2016-05-25 15:55:47 -07:00
Parker Moore 02bf4f1032
Mention where it came from. [ci skip] 2016-05-25 15:49:30 -07:00
jekyllbot d9c9e0238a Update history to reflect merge of #4944 [ci skip] 2016-05-25 15:46:50 -07:00
jekyllbot dc5fd15f71 Merge pull request #4944 from pathawks/fp/sort-includes
Merge pull request 4944
2016-05-25 15:46:50 -07:00
jekyllbot 1502d00063 Update history to reflect merge of #4943 [ci skip] 2016-05-25 15:44:24 -07:00
jekyllbot 0ca45a48e5 Merge pull request #4943 from pathawks/fp/fix-layout-var-overflow
Merge pull request 4943
2016-05-25 15:44:23 -07:00
Parker Moore 3c0d1a18bf
Mention where it came from. [ci skip] 2016-05-25 15:43:13 -07:00
jekyllbot a7cbb89dfc Update history to reflect merge of #4942 [ci skip] 2016-05-25 15:42:05 -07:00
jekyllbot cf810a88fa Merge pull request #4942 from pathawks/fp/configuration-from-permalink-fix
Merge pull request 4942
2016-05-25 15:42:05 -07:00
Parker Moore 757233754e
Update history to reflect merge of #4941
[ci skip]
2016-05-25 09:32:51 -07:00
Parker Moore 10543e7c46
Merge branch 'pathawks-fp/ExcerptDrop'
* pathawks-fp/ExcerptDrop:
  Rubocop fixes
  excerpt drop should give access to document's layout
  look up the content methods for drops in a smarter way
  Use require_relative
  Add ExcerptDrop and remove excerpt's ability to refer to itself in Liquid
2016-05-25 09:31:27 -07:00
Brint O'Hearn de39107c76 Rubocop cleanup for lib/jekyll/layout.rb 2016-05-25 11:28:46 -05:00
Brint O'Hearn 65e78b3280 Rubocop cleanup for lib/jekyll/plugin_manager.rb 2016-05-25 11:27:43 -05:00
Brint O'Hearn 3a04093e51 Rubocop cleanup for lib/jekyll/page.rb 2016-05-25 11:27:29 -05:00
Parker Moore 733c56a65e
External: remove &block arg, use block_given?
Addresses my comment in https://github.com/jekyll/jekyll/pull/4936#discussion_r64598949
2016-05-25 08:55:12 -07:00
jekyllbot 1c937013fd Update history to reflect merge of #4936 [ci skip] 2016-05-25 08:53:40 -07:00
jekyllbot 3292850b98 Merge pull request #4936 from pathawks/passing
Merge pull request 4936
2016-05-25 08:53:39 -07:00
Parker Moore f8c708ffec Fix test to simply ensure next is an object in jsonify 2016-05-24 19:08:50 -05:00
Parker Moore 17d8c96a63 Add ability to render drops as JSON
Previously you could do, e.g. {{ site | jsonify }}, but with the introduction of Liquid Drops, this didn't work anymore.
This PR adds the ability to render drops as JSON. You can safely run drop.to_json and it should Do the Right Thing.
2016-05-24 19:08:46 -05:00
Parker Moore ad7bd84098 lib/jekyll.rb: require document_drop to ease our pain 2016-05-24 19:03:32 -05:00
Parker Moore 1a05483a63 Sort the results of the require_all glob.
Filesystems behave differently when performing glob listings.

In my environment, they are listed alphabetically. On my Mac, when asking for a list of files in a directory, those files are returned as a nicely sorted list. Alphabetized, like you'd want them to be. Like you'd expect them to be.

In some environments, quite different from my own, the return of a similar operation is quite random. Perhaps q comes before a, or e before d; the filesystem will choose its order of the day and you, the fare user, tired and weary from work, must bare the brunt of this.

And so, with this commit, I do hereby request that the noble makers of Dir[] provide for us, the downtrodden and ravaged users, some consistency. As a user of Ruby, I shouldn't have to know or consider the behaviour of an individual filesystem here; it should function the same for all filesystems.

Truly yours,
Parker
2016-05-24 19:03:32 -05:00
Pat Hawks cc0c5ea19e Rubocop fixes 2016-05-24 19:01:35 -05:00
Parker Moore db7cd6f612 Reset {{ layout }} between each render & merge layout data properly 2016-05-24 18:57:54 -05:00
Parker Moore 8e939cd86e Add failing test for layout data inheritance bug (#4433) 2016-05-24 18:57:54 -05:00
Parker Moore a99adcafaa Add failing test for layout bug (#4897) 2016-05-24 18:57:53 -05:00
Parker Moore 7641971d7e Fix tests for plugins in configuration. 2016-05-24 18:49:06 -05:00
Parker Moore 48274244e3 Define Drop#each so we can use the new frozen/duping behavior 2016-05-24 18:49:06 -05:00
Parker Moore d5c3785d29 Don't default 'include' and 'exclude' to an empty array 2016-05-24 18:49:06 -05:00
Parker Moore de5970ae55 Fix some minor things in the tests 2016-05-24 18:49:05 -05:00
Parker Moore d84844c223 Freeze configuration defaults & duplicate in deep_merge_hashes if need be. 2016-05-24 18:49:05 -05:00
Parker Moore ad59b6e62a Remove merge conflicts I forgot to fix. 2016-05-24 18:49:02 -05:00
Parker Moore 37b93f10dd Add missing 'end' to test/helper.rb 2016-05-24 18:47:15 -05:00
Parker Moore 59346eb228 Remove call to #backwards_compatibilize in Configuration.from 2016-05-24 18:47:15 -05:00
Parker Moore 8af77643c5 Site#site_payload: sort collections by label 2016-05-24 18:47:15 -05:00
Parker Moore f52a0e7200 Configuration#add_default_collections: fix bug where DEFAULTS['collections'] is modified 2016-05-24 18:47:15 -05:00
Parker Moore d01f7943de Add Configuration.from & use in Jekyll.configuration.
This process streamlines the creation of new configurations. Creating a new
site will choke if not all the correct options are given.
Configuration.from will ensure the overrides have all string keys and
ensures all the common issues & defaults are in place so a Site can be
created.

A common use:

    config = Configuration.from({ 'permalink' => '/:title/' }) # etc
    site = Jekyll::Site.new(config)
2016-05-24 18:47:15 -05:00
Parker Moore fab092fcec Remove use of Marshal in runtime code. 2016-05-24 18:47:15 -05:00
Parker Moore 4e06f07ad4 Add tests for Configuration#add_default_collections 2016-05-24 18:47:14 -05:00
Parker Moore 6eaa8e90f8 Don't read a config file if the filename is empty. 2016-05-24 18:47:14 -05:00
Parker Moore 04d4473119 Use Marshal to duplicate configuration defaults to prevent manipulation 2016-05-24 18:47:14 -05:00
Parker Moore dbcbf809ff Refactor some tests to prevent manipulation of Jekyll::Config::DEFAULTS 2016-05-24 18:47:04 -05:00
Parker Moore f2263a11b7 Only write collections.posts.permalink if permalink is set. 2016-05-24 18:40:19 -05:00
Parker Moore c69ca4c11e Test#build_configs shouldn't overwrite default collections 2016-05-24 18:40:19 -05:00