jekyll-liquid-plus 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/CHANGELOG.md +3 -0
- data/lib/jekyll-liquid-plus.rb +1 -0
- data/lib/jekyll-liquid-plus/helpers/cache.rb +8 -0
- data/lib/jekyll-liquid-plus/helpers/path.rb +6 -1
- data/lib/jekyll-liquid-plus/tags/render.rb +1 -1
- data/lib/jekyll-liquid-plus/version.rb +1 -1
- data/test/source/_includes/file3.html +1 -0
- data/test/source/include.html +1 -0
- data/test/source/render.html +1 -0
- data/test/test.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmRkMmM1YTBiYTM5MTFkZTM0MTY4ODVlM2ZhMjQwOTFjZDc5NDQ5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmI4NjljOTRkMmEyYzA4OTc1NGQzODhmZjk3Y2YwZmMyNzczZTlhOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDk4NGJmYTZhOGNhNGI2ZTc3MGZmNDUwZjdlNmUzZjEzNGU3MGY3ZmI3ZDc2
|
10
|
+
NmI3ZTI1MmI3YmRkMWNlM2Q5ZmI2YjllYjEyNDM0NTZmOWYxZjFjMDVmYTll
|
11
|
+
MGUzYmY1M2VhN2E1YzUxNGFjODI5MThmZmQ5NjcxYzc3YzQzNzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODYzMTFjMjdkNDU0YzhkMmUxOWVjZTEwOTE0OGI3YjFlMDcwYTliNTU0MjM2
|
14
|
+
N2RhZmIwZDgxNDA5MDVhMTIzMmFmN2M0ODU3YzhiN2M5NWE5ZDA5MjIxYTAy
|
15
|
+
OTVkNjRlZjdjZmFlZjA0Y2IwMWYyZDJiNjdjZjQ5OTVkYmNlZjM=
|
data/CHANGELOG.md
CHANGED
data/lib/jekyll-liquid-plus.rb
CHANGED
@@ -5,6 +5,7 @@ $:.unshift File.dirname(__FILE__)
|
|
5
5
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
6
6
|
|
7
7
|
module LiquidPlus
|
8
|
+
autoload :Cache, 'jekyll-liquid-plus/helpers/cache'
|
8
9
|
autoload :IncludeTag, 'jekyll-liquid-plus/tags/include'
|
9
10
|
autoload :WrapTag, 'jekyll-liquid-plus/tags/wrap'
|
10
11
|
autoload :RenderTag, 'jekyll-liquid-plus/tags/render'
|
@@ -44,7 +44,7 @@ module LiquidPlus
|
|
44
44
|
files = get_paths(files, context)
|
45
45
|
files.each_with_index do |f, i|
|
46
46
|
file = path ? File.join(path, f) : f
|
47
|
-
if
|
47
|
+
if exists(file, context)
|
48
48
|
return f
|
49
49
|
# If "file.html || none" is passed, fail gracefully
|
50
50
|
elsif i == files.size - 1
|
@@ -53,6 +53,11 @@ module LiquidPlus
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
def exists(file, context)
|
57
|
+
path = expand(file, context)
|
58
|
+
Cache.exists(path)
|
59
|
+
end
|
60
|
+
|
56
61
|
# Read file paths from context variables if necessary
|
57
62
|
#
|
58
63
|
# Input:
|
@@ -0,0 +1 @@
|
|
1
|
+
{% include file.html %}
|
data/test/source/include.html
CHANGED
data/test/source/render.html
CHANGED
data/test/test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-liquid-plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- Rakefile
|
83
83
|
- jekyll-liquid-plus.gemspec
|
84
84
|
- lib/jekyll-liquid-plus.rb
|
85
|
+
- lib/jekyll-liquid-plus/helpers/cache.rb
|
85
86
|
- lib/jekyll-liquid-plus/helpers/conditional.rb
|
86
87
|
- lib/jekyll-liquid-plus/helpers/include.rb
|
87
88
|
- lib/jekyll-liquid-plus/helpers/path.rb
|
@@ -97,6 +98,7 @@ files:
|
|
97
98
|
- test/source/.gitignore
|
98
99
|
- test/source/_includes/file.html
|
99
100
|
- test/source/_includes/file2.html
|
101
|
+
- test/source/_includes/file3.html
|
100
102
|
- test/source/_layouts/default.html
|
101
103
|
- test/source/_plugins/liquid-plus.rb
|
102
104
|
- test/source/assign.html
|