Commit Graph

2205 Commits

Author SHA1 Message Date
Parker Moore a1b39840bb Revert change to Collection#url_template which caused test breakage.
Reverts dab53a697b
2016-01-06 10:13:13 -08:00
Peter Suschlik b1a2115948 Fix spelling of GitHub in docs and history
* Github -> GitHub
* GitHub pages -> GitHub Pages
2016-01-06 17:21:09 +01:00
Parker Moore dc31264160 url: tiny optimization to #generate_url_from_drop 2016-01-04 18:18:28 -08:00
Parker Moore 9579924f8a drop: tiny optimization to .mutable to create fewer objects 2016-01-04 18:18:12 -08:00
Parker Moore dab53a697b collection: tiny optimization to #url_template 2016-01-04 18:17:51 -08:00
Parker Moore b6c283a4ae wip: allow custom extensions 2016-01-04 17:42:06 -08:00
Parker Moore f995d86673 Merge pull request #4254 from jekyll/shim-docs-import-with-nudge
Merge pull request 4254
2016-01-04 16:30:30 -08:00
Parker Moore f47612ee98 Merge pull request #4307 from fulldecent/patch-1
Merge pull request 4307
2016-01-04 16:25:41 -08:00
Parker Moore 4fe9eecf05 For blessed gems, shim their commands so users know how to use them. 2016-01-04 16:10:21 -08:00
Parker Moore cb5bc1093e utils: has_yaml_header? should accept files with extraneous spaces
Occasionally, extra spaces at the end of the YAML front matter prologue are
saved to a file and it goes missing without telling the user why. This
should simply accept those changes without any detriment to the user,
allowing anyone to add as many spaces as they like to the end of their
front matter prologues.
2016-01-04 14:09:30 -08:00
Parker Moore e097a15657 Merge pull request #4312 from jekyll/fix-layout-metadata
Merge pull request 4312
2016-01-04 13:05:00 -08:00
Parker Moore 95a3c54ddb drop: only check mutable if the key is a method 2016-01-04 12:41:40 -08:00
Parker Moore 06c45df8c3 Drop: hash syntax should use setter method for a property if it's defined 2016-01-04 12:38:41 -08:00
Parker Moore 735194ccaf Convertible/Page/Renderer: use payload hash accessor & setter syntax 2016-01-04 12:37:19 -08:00
Pat Hawks 060904d809
Rubocop: Style/TrailingWhitespace
- Trailing whitespace detected
Rubocop: Style/EmptyLines
 - Extra blank line detected
Rubocop: Style/EmptyLinesAroundBlockBody
 - Extra empty line detected at block body beginning
2016-01-04 12:16:36 -08:00
Pat Hawks ab3d906e04
Rubocop: Style/ParenthesesAroundCondition
- Don't use parentheses around the condition of an if
2016-01-04 12:14:00 -08:00
Pat Hawks cce848d3d8
Rubocop: Avoid single-line method definitions 2016-01-04 12:12:17 -08:00
Pat Hawks c1c8b6dbf7
Rubocop: Style/SpaceInsideHashLiteralBraces 2016-01-04 12:07:34 -08:00
Pat Hawks 04e635b10c
Rubocop: Style/SpaceInsideRangeLiteral
- Space inside range literal
2016-01-04 12:06:40 -08:00
Pat Hawks 6711234d5f
Rubocop: Style/BlockDelimiters
- Avoid using {...} for multi-line blocks
2016-01-04 12:05:54 -08:00
Pat Hawks 086e85ca9e
Rubocop: Style/PerlBackrefs
- Avoid the use of Perl-style backrefs
2016-01-04 12:01:23 -08:00
Pat Hawks be3666fcf0
Rubocop: Do not use unless with else
- Rewrite these with the positive case first
2016-01-04 11:51:14 -08:00
Pat Hawks ec83ef60b5
Rubocop: Lint/UselessAssignment 2016-01-04 11:49:54 -08:00
Pat Hawks 085a778b0a
Rubocop: Style/NestedTernaryOperator
- Ternary operators must not be nested. Prefer if/else constructs instead.
2016-01-04 11:46:25 -08:00
Pat Hawks 78e9f3389e
Rubocop: Style/IndentationWidth 2016-01-04 11:42:17 -08:00
Pat Hawks f9926edbc4
Rubocop: Style/TrivialAccessors
- Use `attr_writer` to define trivial writer methods
2016-01-04 11:39:14 -08:00
Pat Hawks af9ec6831d
Rubocop: Style/ElseAlignment
- Align else with if
Rubocop: Lint/EndAlignment
 - Align end with if
2016-01-04 11:23:06 -08:00
Pat Hawks f6fd9014ba
Rubocop: Style/CaseIndentation
- Indent when as deep as case
2016-01-04 11:15:37 -08:00
Pat Hawks 2c9a349f9a Rubocop: Style/Next
- Use next to skip iteration
2016-01-04 11:10:52 -08:00
Pat Hawks f221b925b4 Rubocop: Lint/StringConversionInInterpolation
- Redundant use of Object#to_s in interpolation
2016-01-04 11:08:31 -08:00
Pat Hawks 13c980c896 Rubocop: Style/TrailingComma 2016-01-04 11:08:31 -08:00
Pat Hawks 4c5d77a4b5 Rubocop: Style/EmptyLines 2016-01-04 11:08:18 -08:00
Pat Hawks fd8fdd87d3
Rubocop: Style/RegexpLiteral 2016-01-03 17:10:39 -08:00
Pat Hawks e3189e3828
Rubocop: Lint/UnusedMethodArgument 2016-01-03 17:07:39 -08:00
Pat Hawks 11f0aab4b1
Rubocop: Lint/UnusedBlockArgument
- Unused block argument
2016-01-03 16:24:13 -08:00
Pat Hawks 7ca4f7cd62
Rubocop: Style/Proc
- Use proc instead of Proc.new
...and use lambda instead of proc
2016-01-03 16:18:26 -08:00
Pat Hawks af5d51289f
Rubocop: Style/SymbolProc
- Pass &:to_sym as an argument to map instead of a block
 - Pass &:capitalize as an argument to select instead of a block
 - Pass &:to_s as an argument to map instead of a block
2016-01-03 16:02:32 -08:00
Pat Hawks 704ca6b8cc
Rubocop: Style/NegatedIf
- Favor unless over if for negative conditions
2016-01-03 15:59:12 -08:00
Pat Hawks 663a2d3279
Rubocop: Style/SpaceBeforeBlockBraces
Rubocop: Style/SpaceInsideBlockBraces
2016-01-03 15:58:02 -08:00
Pat Hawks a70d89a862
Rubocop: Style/SpaceAfterComma
- Space missing after comma
2016-01-03 15:56:44 -08:00
Pat Hawks cda226de45
Rubocop: Style/EmptyLinesAroundClassBody
- Extra empty line detected at class body end
2016-01-03 15:55:33 -08:00
Pat Hawks 2530a8cdfc
Rubocop: Style/HashSyntax
- Use hash rockets syntax
2016-01-03 15:49:22 -08:00
Pat Hawks d157a04c6d
Rubocop: Performance/StringReplacement
- Use delete! instead of gsub!
 - Use tr instead of gsub
2016-01-03 15:47:31 -08:00
Pat Hawks ff5f7b7120
Rubocop: Style/DeprecatedHashMethods
- Hash#has_key? is deprecated in favor of Hash#key?
Add method `key?` to Drop
2016-01-03 15:41:04 -08:00
Pat Hawks 98a19cdf2b
Rubocop: Style/PercentLiteralDelimiters
- %w-literals should be delimited by ( and )
Rubocop: Style/WordArray
 - Use %w or %W for array of words
2016-01-03 15:32:11 -08:00
Pat Hawks fb0457bf3d
Rubocop: Style/AndOr
- Use && instead of and
 - Use || instead of or
2016-01-03 15:30:26 -08:00
Pat Hawks 6550867051
Rubocop: Style/SpecialGlobalVars
- Prefer $LOAD_PATH over $:
2016-01-03 15:29:49 -08:00
Pat Hawks 8223ebd861
Use select and find instead of conditional loop 2016-01-03 15:24:18 -08:00
Pat Hawks 0eae36aec2
Rubocop: Style/LineEndConcatenation
- Use \ instead of + or << to concatenate those strings
2016-01-03 14:41:49 -08:00
Pat Hawks 44d2995277
Rubocop: Style/Semicolon
- Do not use semicolons to terminate expressions
2016-01-03 14:40:45 -08:00
Pat Hawks 31dd0ebed5
Rubocop: Style/EmptyLiteral
- Use array literal [] instead of Array.new
 - Use hash literal {} instead of Hash.new
2016-01-03 14:39:01 -08:00
William Entriken 22a0be3f7b Escape html from site.title and page.title 2016-01-03 16:10:38 -05:00
Jordon Bedwell f2f88dbd9f Move require "jekyll/drops/drop" to "jekyll.rb"
Linux does not read files in alphanumeric order, this can lead to
Jekyll drops not working on Linux because the assumption here is that
the collection drop will be required first.
2015-12-27 12:48:21 -06:00
Parker Moore 5034216637 Release 💎 3.1.0.pre.beta1 2015-12-27 08:32:08 -05:00
Parker Moore 7c4876d2eb Merge pull request #4289 from jekyll/fix-utils-deep-merge-drops
Merge pull request 4289
2015-12-27 08:27:25 -05:00
Parker Moore 1b73751abf Merge branch 'fixup-custom-markdown'
* fixup-custom-markdown:
  markdown: minor style fixes
  Add support for underscores.
  Refactor: lib/jekyll/convertor/markdown.rb - tests: no additions/breaks.
2015-12-27 08:24:16 -05:00
Parker Moore 8e887dcd8b markdown: minor style fixes
ref: #3771
2015-12-27 08:24:00 -05:00
Parker Moore 5bf596b239 utils/drops: update Drop to support Utils.deep_merge_hashes
Fixes #4287
2015-12-27 08:06:37 -05:00
Parker Moore d138558c1d drops: provide #to_h to allow for hash introspection
Follow-up to #4277
2015-12-26 14:25:29 -05:00
Parker Moore 3fa8af2a18 drops: create one base Drop class which can be set as mutable or not 2015-12-26 13:43:42 -05:00
Parker Moore 57613b31dd Slightly restructure rake helper files
Ref #4282
2015-12-26 12:53:30 -05:00
Parker Moore e3da5a3f9f Merge pull request #4282 from leethomas/refactor-rake-tasks
Merge pull request 4282
2015-12-26 12:47:30 -05:00
Parker Moore 1f298e0d9d url: move setter outside of if statement
Addresses @envygeeks's comment:
d070a77716 (commitcomment-15164169)
2015-12-26 12:32:21 -05:00
Parker Moore b70ea3ca5c immutable_drop/errors: consolidate errors & fix syntax for raising
Addresses @envygeeks's comments:
bff1726a5a
2015-12-26 12:27:07 -05:00
Parker Moore 1afbe9967d document: return nil if bad arg in #<=>
Addresses @envygeek's comment:

233589e150 (commitcomment-15164178)
2015-12-26 12:23:21 -05:00
leethomas b05b174b87 moved namespaced rake tasks to separate .rake files under lib/tasks 2015-12-25 22:50:23 -08:00
Parker Moore c63b51b661 document: revert comparison of Documents to old style & add nil check
@envygeeks, this should address your comment: fcce0d5482 (commitcomment-15162261)
2015-12-25 22:54:12 -05:00
Parker Moore debdb15171 Move 'forwardable' require to earlier in the program start up. 2015-12-25 22:45:51 -05:00
Parker Moore b2b634e767 drops: use def_delegator more liberally where acceptable 2015-12-24 15:07:48 -05:00
Parker Moore fcce0d5482 document: fix issue with bad comparison 2015-12-24 15:07:31 -05:00
Parker Moore d070a77716 url: fix issue with bad URL escaping when using Drop 2015-12-24 15:07:20 -05:00
Parker Moore bff1726a5a immutable_drop: use custom error for bad set 2015-12-24 15:06:32 -05:00
Parker Moore 233589e150 document: throw ArgumentError if compared to non-doc 2015-12-22 21:34:24 -05:00
Parker Moore 532bb9e9cb Further consolidation in the Drops. 2015-12-22 21:33:42 -05:00
Parker Moore 4935e85f7c CollectionDrop: to_s should work like Array#to_s 2015-12-21 23:41:36 -05:00
Parker Moore 03488b1cde DocumentDrop: use def_delegators instead of duplicating methods 2015-12-21 23:36:31 -05:00
Parker Moore ebe3c10604 Drops: fix accessing of site collections via site.COL_NAME 2015-12-21 23:33:33 -05:00
Parker Moore 82c3ee365f Initial work on using Liquid::Drops instead of Hashes.
The properties of Liquid::Drops are only evaluated when they're asked for
and therefore save computation time. This prevents a lot of GC time cleaning
up objects that are not needed, because they're not created unless requested.
Additionally, this saves time for actual computation of those values because
they can be computed only if needed.

It's funny how much it helps when you only do what is needed. Far less overhead.
2015-12-21 22:47:30 -05:00
Parker Moore fdcd761313 Merge branch 'akoeplinger-doctor-permalink-same-case-warning'
* akoeplinger-doctor-permalink-same-case-warning:
  Added tests for new jekyll doctor warning
  Incorporate code review feedback
  Incorporate code review feedback
  Add a Jekyll doctor warning for URLs that only differ by case
2015-12-13 12:26:07 -08:00
Parker Moore 92adfd0e46 Merge pull request #4052 from Crunch09/process-empty-config-files
Merge pull request 4052
2015-12-11 14:11:11 -08:00
Parker Moore b94800361b Collection: change missing_method message to be a bit clearer.
Fixes #4234. Fixes #4199.
2015-12-11 14:07:34 -08:00
Parker Moore 4f21458b34 Merge pull request #4184 from ducktyper/allow-quoted-dates
Merge pull request 4184
2015-12-11 14:02:55 -08:00
Parker Moore 11959ab2bc Merge pull request #4233 from RochesterinNYC/patch-1
Merge pull request 4233
2015-12-07 22:10:09 -08:00
James Wen 0e89e80426 Switch PluginManager to use require_with_graceful_fail
* Add debug statement specifying current plugin to External#require_with_graceful_fail
2015-12-07 20:46:07 -05:00
Jordon Bedwell 643ae68912 Add a default charset to content-type on webrick.
Add a default charset to content-type on webrick, using Jekyll's
default encoding (or user set encoding) and cleanup servlet removing
unecessary logic that really served no purpose at the end of the
day, we don't need to strictly match Nginx, only be "like it."

This also cleans up the way we set headers and merges that logic
into a cleaner to understand interface that is slightly speedier.
2015-12-06 20:33:53 -06:00
Jordon Bedwell b63712e403 Fix an edge where file is sometimes not returned properly. 2015-12-05 04:48:51 -06:00
Ducksan Cho 99042fa870 Improve error message 2015-12-05 16:21:50 +13:00
Parker Moore c6255d5f28 Merge pull request #4223 from jekyll/pull/sample-filter
Merge pull request 4223
2015-12-04 14:12:18 -08:00
Parker Moore 47d2a2459d filters: refactor #sample to leave off the arg 2015-12-04 13:48:09 -08:00
Jordon Bedwell 8efbdc01ff Fix #3791/#3478
* Add support for SSL through command line switches.
* Add suppport for file/index.html > file.html > directory.
* Add support for custom-headers through configuration.
* Modernize and split up the serve.
* Add a few basic tests.
2015-12-04 14:07:07 -06:00
Parker Moore 2e91d094e5 filters#sample: n == 1, return item; n > 1, return array 2015-12-04 10:25:13 -08:00
Jordon Bedwell 28c568386d Merge pull request #4220 from jekyll/pull/enable-codeclimate-platform
Fix: #4219: Add CodeClimate Platform.
2015-12-04 12:08:00 -06:00
Jordon Bedwell b6de905ee4 Fix: #4219: Add CodeClimate Platform. 2015-12-04 11:42:52 -06:00
Parker Moore 86195655d7 filters: allow sample(n) instead of just sample(1) 2015-12-04 09:40:57 -08:00
Parker Moore 96bc62c666 Add 'sample' Liquid filter
Equivalent to Array#sample functionality
2015-12-04 09:33:33 -08:00
Parker Moore 6cbd06ea85 Merge pull request #4109 from jekyll/cleanup-kramdown-converter
Merge pull request 4109
2015-12-04 09:21:22 -08:00
Parker Moore fe13c3b366 KramdownConverter: clean up some source with some unified methods 2015-12-04 09:21:11 -08:00
Jordon Bedwell e331a37260 Fix #4202: Have Kramdown behave like Github. 2015-12-04 11:11:30 -06:00
Jordon Bedwell 3432fd2c2d Modernize Kramdown for Markdown converter. 2015-12-04 08:09:08 -06:00
Parker Moore b90f8e048a Merge pull request #4150 from ducktyper/master
Merge pull request 4150
2015-11-30 19:57:01 -08:00