jekyll 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56c167aa9b02ffadc0482aa73eca44b948a1fbc5
4
- data.tar.gz: 009cc8ae7b98a986ffd1792c382ab04a7e3ecfa9
3
+ metadata.gz: 754fc17db71e2e921e0af04aa539ce4ed79bc11d
4
+ data.tar.gz: af228ee2a490fdc51c039cbfdd57ed6877396fe0
5
5
  SHA512:
6
- metadata.gz: 5f12355c33e46191613bed314fcca4d4124e5957cd1ffe394e61c99f2e99536c8c445b9dee2182f52b59d48350c7d3a785b3c49a8e86fb7665477bdcc047b8e4
7
- data.tar.gz: 42e90646fb9484f3dfe61c2268074f7ed97656a0cc4674a07d21c12d985c5be8de08d58afa4a9d3f9414cd097cda30f9405f99c85157718ef8e7377c1d939f85
6
+ metadata.gz: ea0b25be9b51836e6b8909704cbc1473cd35daf97985376e4ce397b98a54c64511c841155a21c2276b813993a8e42683a998df245d776c1395e3c8f7a8f749e2
7
+ data.tar.gz: 1d69242ac627e23898a9f179302477ab9d79f86372f6f318c811c3c009e1fd526eaac7ee6c62316eb89cf4bed5d24ac80ed0012ec9897af7df0896f521339839
@@ -0,0 +1,80 @@
1
+ Metrics/MethodLength: { Max: 24 }
2
+ Metrics/ClassLength: { Max: 240 }
3
+ Metrics/ModuleLength: { Max: 240 }
4
+ Metrics/LineLength: { Max: 112 }
5
+ Metrics/CyclomaticComplexity: { Max: 8 }
6
+ Metrics/PerceivedComplexity: { Max: 8 }
7
+ Metrics/ParameterLists: { Max: 4 }
8
+ Metrics/MethodLength: { Max: 24 }
9
+ Metrics/AbcSize: { Max: 20 }
10
+
11
+ Style/IndentHash: { EnforcedStyle: consistent }
12
+ Style/HashSyntax: { EnforcedStyle: hash_rockets }
13
+ Style/SignalException: { EnforcedStyle: only_raise }
14
+ Style/AlignParameters: { EnforcedStyle: with_fixed_indentation }
15
+ Style/StringLiteralsInInterpolation: { EnforcedStyle: double_quotes }
16
+ Style/MultilineMethodCallIndentation: { EnforcedStyle: indented }
17
+ Style/MultilineOperationIndentation: { EnforcedStyle: indented }
18
+ Style/FirstParameterIndentation: { EnforcedStyle: consistent }
19
+ Style/StringLiterals: { EnforcedStyle: double_quotes }
20
+ Style/RegexpLiteral: { EnforcedStyle: slashes }
21
+ Style/IndentArray: { EnforcedStyle: consistent }
22
+ Style/ExtraSpacing: { AllowForAlignment: true }
23
+
24
+ Style/PercentLiteralDelimiters:
25
+ PreferredDelimiters:
26
+ '%q': '{}'
27
+ '%Q': '{}'
28
+ '%r': '!!'
29
+ '%s': '()'
30
+ '%w': '()'
31
+ '%W': '()'
32
+ '%x': '()'
33
+
34
+ Style/AlignArray: { Enabled: false }
35
+ Style/StringLiterals: { Enabled: false }
36
+ Style/Documentation: { Enabled: false }
37
+ Style/DoubleNegation: { Enabled: false }
38
+ Style/UnneededCapitalW: { Enabled: false }
39
+ Style/EmptyLinesAroundModuleBody: { Enabled: false }
40
+ Style/EmptyLinesAroundAccessModifier: { Enabled: false }
41
+ Style/BracesAroundHashParameters: { Enabled: false }
42
+ Style/SpaceInsideBrackets: { Enabled: false }
43
+ Style/IfUnlessModifier: { Enabled: false }
44
+ Style/ModuleFunction: { Enabled: false }
45
+ Style/RescueModifier: { Enabled: false }
46
+ Style/GuardClause: { Enabled: false }
47
+ Style/FileName: { Enabled: false }
48
+ Lint/UselessAccessModifier: { Enabled: false }
49
+ Style/SpaceAroundOperators: { Enabled: false }
50
+ Style/RedundantReturn: { Enabled: false }
51
+ Style/SingleLineMethods: { Enabled: false }
52
+
53
+ AllCops:
54
+ TargetRubyVersion: 2.0
55
+ Include:
56
+ - lib/**/*.rb
57
+
58
+ Exclude:
59
+ - .rubocop.yml
60
+ - .codeclimate.yml
61
+ - .travis.yml
62
+ - .gitignore
63
+ - .rspec
64
+
65
+ - Gemfile.lock
66
+ - CHANGELOG.{md,markdown,txt,textile}
67
+ - CONTRIBUTING.{md,markdown,txt,textile}
68
+ - readme.{md,markdown,txt,textile}
69
+ - README.{md,markdown,txt,textile}
70
+ - Readme.{md,markdown,txt,textile}
71
+ - ReadMe.{md,markdown,txt,textile}
72
+ - COPYING
73
+ - LICENSE
74
+
75
+ - site/**/*
76
+ - test/**/*
77
+ - vendor/**/*
78
+ - features/**/*
79
+ - script/**/*
80
+ - spec/**/*
@@ -14,8 +14,6 @@
14
14
  [hakiri]: https://hakiri.io/github/jekyll/jekyll/master
15
15
  [travis]: https://travis-ci.org/jekyll/jekyll
16
16
 
17
- By Tom Preston-Werner, Nick Quaranto, Parker Moore, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)!
18
-
19
17
  Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
20
18
 
21
19
  ## Philosophy
@@ -37,7 +35,7 @@ See: http://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
37
35
  ## Code of Conduct
38
36
 
39
37
  In order to have a more open and welcoming community, Jekyll adheres to a
40
- [code of conduct](CONDUCT.md) adapted from the Ruby on Rails code of
38
+ [code of conduct](CONDUCT.markdown) adapted from the Ruby on Rails code of
41
39
  conduct.
42
40
 
43
41
  Please adhere to this code of conduct in any interactions you have in the
@@ -153,8 +153,9 @@ module Jekyll
153
153
  def sanitized_path(base_directory, questionable_path)
154
154
  return base_directory if base_directory.eql?(questionable_path)
155
155
 
156
+ questionable_path.insert(0, '/') if questionable_path.start_with?('~')
156
157
  clean_path = File.expand_path(questionable_path, "/")
157
- clean_path = clean_path.sub(/\A\w\:\//, '/')
158
+ clean_path.sub!(/\A\w\:\//, '/')
158
159
 
159
160
  if clean_path.start_with?(base_directory.sub(/\A\w\:\//, '/'))
160
161
  clean_path
@@ -12,11 +12,11 @@ module Jekyll
12
12
  "line_number_start" => 1,
13
13
  "tab_width" => 4,
14
14
  "wrap" => "div"
15
- }
15
+ }.freeze
16
16
 
17
17
  def initialize(config)
18
18
  Jekyll::External.require_with_graceful_fail "kramdown"
19
- @main_fallback_highlighter = config["highlighter"] || "rogue"
19
+ @main_fallback_highlighter = config["highlighter"] || "rouge"
20
20
  @config = config["kramdown"] || {}
21
21
  setup
22
22
  end
@@ -32,22 +32,44 @@ module Jekyll
32
32
  @config["syntax_highlighter_opts"] ||= {}
33
33
  @config["coderay"] ||= {} # XXX: Legacy.
34
34
  modernize_coderay_config
35
+ make_accessible
35
36
  end
36
37
 
37
38
  def convert(content)
38
39
  Kramdown::Document.new(content, @config).to_html
39
40
  end
40
41
 
42
+ private
43
+ def make_accessible(hash = @config)
44
+ proc_ = proc { |hash_, key| hash_[key.to_s] if key.is_a?(Symbol) }
45
+ hash.default_proc = proc_
46
+
47
+ hash.each do |_, val|
48
+ make_accessible val if val.is_a?(
49
+ Hash
50
+ )
51
+ end
52
+ end
53
+
41
54
  # config[kramdown][syntax_higlighter] > config[kramdown][enable_coderay] > config[highlighter]
42
55
  # Where `enable_coderay` is now deprecated because Kramdown
43
56
  # supports Rouge now too.
44
57
 
45
58
  private
46
59
  def highlighter
47
- @highlighter ||= begin
48
- if highlighter = @config["syntax_highlighter"] then highlighter
49
- elsif @config.key?("enable_coderay") && @config["enable_coderay"]
50
- Jekyll::Deprecator.deprecation_message "You are using 'enable_coderay', use syntax_highlighter: coderay in your configuration file."
60
+ return @highlighter if @highlighter
61
+
62
+ if @config["syntax_highlighter"]
63
+ return @highlighter = @config[
64
+ "syntax_highlighter"
65
+ ]
66
+ end
67
+
68
+ @highlighter = begin
69
+ if @config.key?("enable_coderay") && @config["enable_coderay"]
70
+ Jekyll::Deprecator.deprecation_message "You are using 'enable_coderay', " \
71
+ "use syntax_highlighter: coderay in your configuration file."
72
+
51
73
  "coderay"
52
74
  else
53
75
  @main_fallback_highlighter
@@ -59,7 +81,13 @@ module Jekyll
59
81
  def strip_coderay_prefix(hash)
60
82
  hash.each_with_object({}) do |(key, val), hsh|
61
83
  cleaned_key = key.gsub(/\Acoderay_/, "")
62
- Jekyll::Deprecator.deprecation_message "You are using '#{key}'. Normalizing to #{cleaned_key}." if key != cleaned_key
84
+
85
+ if key != cleaned_key
86
+ Jekyll::Deprecator.deprecation_message(
87
+ "You are using '#{key}'. Normalizing to #{cleaned_key}."
88
+ )
89
+ end
90
+
63
91
  hsh[cleaned_key] = val
64
92
  end
65
93
  end
@@ -71,7 +99,9 @@ module Jekyll
71
99
  private
72
100
  def modernize_coderay_config
73
101
  if highlighter == "coderay"
74
- Jekyll::Deprecator.deprecation_message "You are using 'kramdown.coderay' in your configuration, please use 'syntax_highlighter_opts' instead."
102
+ Jekyll::Deprecator.deprecation_message "You are using 'kramdown.coderay' in your configuration, " \
103
+ "please use 'syntax_highlighter_opts' instead."
104
+
75
105
  @config["syntax_highlighter_opts"] = begin
76
106
  strip_coderay_prefix(
77
107
  @config["syntax_highlighter_opts"] \
@@ -22,7 +22,7 @@ module Jekyll
22
22
 
23
23
  def no_subcommand(args)
24
24
  if args.size > 0 && args.first =~ /^--/ && !%w(--help --version).include?(args.first)
25
- deprecation_message "Jekyll now uses subcommands instead of just switches. Run `jekyll --help` to find out more."
25
+ deprecation_message "Jekyll now uses subcommands instead of just switches. Run `jekyll help` to find out more."
26
26
  abort
27
27
  end
28
28
  end
@@ -217,8 +217,11 @@ module Jekyll
217
217
  def destination(base_directory)
218
218
  dest = site.in_dest_dir(base_directory)
219
219
  path = site.in_dest_dir(dest, URL.unescape_path(url))
220
- path = File.join(path, "index.html") if url.end_with?("/")
221
- path << output_ext unless path.end_with? output_ext
220
+ if url.end_with? "/"
221
+ path = File.join(path, "index.html")
222
+ else
223
+ path << output_ext unless path.end_with? output_ext
224
+ end
222
225
  path
223
226
  end
224
227
 
@@ -8,7 +8,7 @@ module Jekyll
8
8
 
9
9
  def parse(content)
10
10
  measure_time do
11
- @template = Liquid::Template.parse(content)
11
+ @template = Liquid::Template.parse(content, line_numbers: true)
12
12
  end
13
13
 
14
14
  self
@@ -20,7 +20,7 @@ module Jekyll
20
20
 
21
21
  def titleize_slug(slug)
22
22
  slug.split("-").map! do |val|
23
- val.capitalize!
23
+ val.capitalize
24
24
  end.join(" ")
25
25
  end
26
26
 
@@ -1,3 +1,3 @@
1
1
  module Jekyll
2
- VERSION = '3.1.1'
2
+ VERSION = '3.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-29 00:00:00.000000000 Z
11
+ date: 2016-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -131,6 +131,7 @@ extra_rdoc_files:
131
131
  - README.markdown
132
132
  - LICENSE
133
133
  files:
134
+ - ".rubocop.yml"
134
135
  - LICENSE
135
136
  - README.markdown
136
137
  - bin/jekyll