jekyll 3.4.1 → 3.4.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: 3e8dbaa7d70d4925cb1eab5b39dc6f76a7917cac
4
- data.tar.gz: 81c16bf62acdde3d709fc8185b31a3ded47c6f1b
3
+ metadata.gz: c181b1c1eeac1571b6bfd9dc0ed079b70d2babf4
4
+ data.tar.gz: 3c035fa0ffdcc1e50136a4f42f7c663dfba1cc70
5
5
  SHA512:
6
- metadata.gz: fb9df80719a8347a73aeaade7d1bbc7d4b7a1bcc01e02e6df91aee811815c74c2045579a49739000596cc3241b73e55b3563f7ea4f911b31ab55f4c09b283fde
7
- data.tar.gz: 646672895252371ca0e259cbfe38a670d69ac27e9f8354276a4ec24490906a05646e251b640d80cd30450b4a0660394dc3026e4c4c9b788e8b1c32fc4ef7c0d8
6
+ metadata.gz: 77594aada8d31c020015ae8d3ab2f9e96daff03029fc4756c7b256eed989ee83f7598e20c34ec310f48ac41357e832c64b1e313bd70b0a65cfa1cf1ace0bd397
7
+ data.tar.gz: 485767faa60b4be3610bd1869d9585c3922d136cf11fa47c51f9a3c8bf08cd65299bc44b530b92144e4c4b5f65d9a00b6290e2622130171d3609b746768e307d
@@ -0,0 +1,11 @@
1
+ module Jekyll
2
+ module Drops
3
+ class StaticFileDrop < Drop
4
+ extend Forwardable
5
+ def_delegators :@obj, :name, :extname, :modified_time, :basename
6
+ def_delegator :@obj, :relative_path, :path
7
+ def_delegator :@obj, :data, :fallback_data
8
+ def_delegator :@obj, :type, :collection
9
+ end
10
+ end
11
+ end
@@ -28,6 +28,10 @@ module Jekyll
28
28
  @collection = collection
29
29
  @relative_path = File.join(*[@dir, @name].compact)
30
30
  @extname = File.extname(@name)
31
+
32
+ data.default_proc = proc do |_, key|
33
+ site.frontmatter_defaults.find(relative_path, type, key)
34
+ end
31
35
  end
32
36
  # rubocop: enable ParameterLists
33
37
 
@@ -96,13 +100,15 @@ module Jekyll
96
100
  end
97
101
 
98
102
  def to_liquid
99
- {
100
- "basename" => File.basename(name, extname),
101
- "name" => name,
102
- "extname" => extname,
103
- "modified_time" => modified_time,
104
- "path" => File.join("", relative_path),
105
- }
103
+ @to_liquid ||= Drops::StaticFileDrop.new(self)
104
+ end
105
+
106
+ def data
107
+ @data ||= {}
108
+ end
109
+
110
+ def basename
111
+ File.basename(name, extname)
106
112
  end
107
113
 
108
114
  def placeholders
@@ -1,3 +1,3 @@
1
1
  module Jekyll
2
- VERSION = "3.4.1".freeze
2
+ VERSION = "3.4.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.4.1
4
+ version: 3.4.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-03-02 00:00:00.000000000 Z
11
+ date: 2017-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -192,6 +192,7 @@ files:
192
192
  - lib/jekyll/drops/excerpt_drop.rb
193
193
  - lib/jekyll/drops/jekyll_drop.rb
194
194
  - lib/jekyll/drops/site_drop.rb
195
+ - lib/jekyll/drops/static_file_drop.rb
195
196
  - lib/jekyll/drops/unified_payload_drop.rb
196
197
  - lib/jekyll/drops/url_drop.rb
197
198
  - lib/jekyll/entry_filter.rb