jekyll 3.5.1 → 3.5.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: 2703d120f266bf4fa3319dea8db0bddd9e93a5f6
4
- data.tar.gz: d7fdca32ac835ab181b160cfa21791b9a2d2b15a
3
+ metadata.gz: 46ce21bfe35d93f05890bde9cd6d656ba480a532
4
+ data.tar.gz: c7e16c4b99b5d535cd3795b4b57a5729b692c44a
5
5
  SHA512:
6
- metadata.gz: 4bcb7cde2b2e10a65f23364915994f2c22bfe026fc331b44cf68971ac96a274af5372d84084b1e3c989d7b3e762e8a9bff6e7b968b590be6fd925edf75508345
7
- data.tar.gz: 3c89aa0d26a9815146ea18a1f24e9c57aa80699d5f8f86fdb8422c8abb8cfa32ea89b83cb6a09d608fd1656f2aaafca8d9e709d2175d0939c845a2928e88cf75
6
+ metadata.gz: 2e78f392ba4ac4757a7b5ccb047c72ec6f9951f816394122c898e9bdb52478e931ff16d8d4776fdfa102152a184ed1e8c8a88d954ed3b1f93417c027d34a2893
7
+ data.tar.gz: '0867babd246831e8401a276adabe8200577e31eb79f037627aade98b2f838c48b946b545fd9c64cd1e2f95c29275173c2aaea5816d2967f84a3d8c77bbc6c276'
@@ -43,13 +43,9 @@ module Jekyll
43
43
 
44
44
  private
45
45
  def make_accessible(hash = @config)
46
- proc_ = proc { |hash_, key| hash_[key.to_s] if key.is_a?(Symbol) }
47
- hash.default_proc = proc_
48
-
49
- hash.each do |_, val|
50
- make_accessible val if val.is_a?(
51
- Hash
52
- )
46
+ hash.keys.each do |key|
47
+ hash[key.to_sym] = hash[key]
48
+ make_accessible(hash[key]) if hash[key].is_a?(Hash)
53
49
  end
54
50
  end
55
51
 
@@ -86,7 +82,7 @@ module Jekyll
86
82
  private
87
83
  def strip_coderay_prefix(hash)
88
84
  hash.each_with_object({}) do |(key, val), hsh|
89
- cleaned_key = key.gsub(%r!\Acoderay_!, "")
85
+ cleaned_key = key.to_s.gsub(%r!\Acoderay_!, "")
90
86
 
91
87
  if key != cleaned_key
92
88
  Jekyll::Deprecator.deprecation_message(
@@ -203,7 +203,7 @@ module Jekyll
203
203
  #
204
204
  # Returns the computed URL for the document.
205
205
  def url
206
- @url = URL.new({
206
+ @url ||= URL.new({
207
207
  :template => url_template,
208
208
  :placeholders => url_placeholders,
209
209
  :permalink => permalink,
@@ -71,7 +71,7 @@ module Jekyll
71
71
  def []=(key, val)
72
72
  if respond_to?("#{key}=")
73
73
  public_send("#{key}=", val)
74
- elsif respond_to? key
74
+ elsif respond_to?(key.to_s)
75
75
  if self.class.mutable?
76
76
  @mutations[key] = val
77
77
  else
@@ -105,7 +105,7 @@ module Jekyll
105
105
  if self.class.mutable
106
106
  @mutations.key?(key)
107
107
  else
108
- respond_to?(key) || fallback_data.key?(key)
108
+ !key.nil? && (respond_to?(key) || fallback_data.key?(key))
109
109
  end
110
110
  end
111
111
 
@@ -10,10 +10,12 @@ module Jekyll
10
10
  # Returns the absolute URL as a String.
11
11
  def absolute_url(input)
12
12
  return if input.nil?
13
- return input if Addressable::URI.parse(input).absolute?
13
+ return input if Addressable::URI.parse(input.to_s).absolute?
14
14
  site = @context.registers[:site]
15
15
  return relative_url(input).to_s if site.config["url"].nil?
16
- Addressable::URI.parse(site.config["url"] + relative_url(input)).normalize.to_s
16
+ Addressable::URI.parse(
17
+ site.config["url"].to_s + relative_url(input)
18
+ ).normalize.to_s
17
19
  end
18
20
 
19
21
  # Produces a URL relative to the domain root based on site.baseurl.
@@ -39,6 +39,8 @@ module Jekyll
39
39
  def read_directories(dir = "")
40
40
  base = site.in_source_dir(dir)
41
41
 
42
+ return unless File.directory?(base)
43
+
42
44
  dot = Dir.chdir(base) { filter_entries(Dir.entries("."), base) }
43
45
  dot_dirs = dot.select { |file| File.directory?(@site.in_source_dir(base, file)) }
44
46
  dot_files = (dot - dot_dirs)
@@ -1,7 +1,11 @@
1
1
  module Jekyll
2
2
  class StaticFile
3
+ extend Forwardable
4
+
3
5
  attr_reader :relative_path, :extname, :name, :data
4
6
 
7
+ def_delegator :to_liquid, :to_json, :to_json
8
+
5
9
  class << self
6
10
  # The cache of last modification times [path] -> mtime.
7
11
  def mtimes
@@ -1,3 +1,3 @@
1
1
  module Jekyll
2
- VERSION = "3.5.1".freeze
2
+ VERSION = "3.5.2".freeze
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.5.1
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-17 00:00:00.000000000 Z
11
+ date: 2017-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable