octopress-wrap-tag 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/CHANGELOG.md +3 -0
- data/lib/octopress-wrap-tag.rb +21 -6
- data/lib/octopress-wrap-tag/version.rb +1 -1
- data/octopress-wrap-tag.gemspec +2 -5
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e11bab0f5c7f69eec22e24bdb4312d1e1bbb76ac
|
4
|
+
data.tar.gz: 7f159b3cb9a124c3618c25987ecfd8cee2b489bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f69bb421f1a2060902fb0f95ce98ca60fed67252cbdf9e7f76605346d1a0d80a9409631cbae64f1dc1e3a9a6b98c38118ba4abea05fc871c2ab3dd88d3df909f
|
7
|
+
data.tar.gz: 7d5592352d6d14307a7c5b8624b2d7130eeeccb9314d65a443e9c30170e04f86aff08758ce2c6aab0517fd385e355dd792fb85461170cc114e0c8987cdc9e873
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/octopress-wrap-tag.rb
CHANGED
@@ -44,24 +44,39 @@ module Octopress
|
|
44
44
|
raise IOError.new "Wrap Failed: {% wrap #{@og_markup}%} - Which type of wrap: inlcude, yield, render? - Correct syntax: {% wrap type path or var [filters] [conditions] %}"
|
45
45
|
end
|
46
46
|
|
47
|
+
# Liquid 3 requires Tag.parse insated of Tag.new
|
48
|
+
parse = Liquid::Tag.respond_to?(:parse)
|
49
|
+
|
47
50
|
case type
|
48
51
|
when 'yield'
|
49
|
-
|
52
|
+
if parse
|
53
|
+
content = Octopress::Tags::Yield::Tag.parse('yield', markup, [], {}).render(context)
|
54
|
+
else
|
55
|
+
content = Octopress::Tags::Yield::Tag.new('yield', markup, []).render(context)
|
56
|
+
end
|
50
57
|
return '' if content.nil?
|
51
58
|
when 'return'
|
52
|
-
|
59
|
+
if parse
|
60
|
+
content = Octopress::Tags::ReturnTag::Tag.parse('return', markup, [], {}).render(context)
|
61
|
+
else
|
62
|
+
content = Octopress::Tags::ReturnTag::Tag.new('return', markup, []).render(context)
|
63
|
+
end
|
53
64
|
return '' if content.nil?
|
54
65
|
when 'render'
|
55
66
|
begin
|
56
|
-
|
67
|
+
if parse
|
68
|
+
content = Octopress::Tags::Render::Tag.parse('render', markup, [], {}).render(context)
|
69
|
+
else
|
70
|
+
content = Octopress::Tags::Render::Tag.new('render', markup, []).render(context)
|
71
|
+
end
|
57
72
|
rescue => error
|
58
73
|
error_msg error
|
59
74
|
end
|
60
75
|
when 'include'
|
61
|
-
|
76
|
+
if parse
|
77
|
+
content = Octopress::Tags::Include::Tag.parse('include', markup, [], {}).render(context)
|
78
|
+
else
|
62
79
|
content = Octopress::Tags::Include::Tag.new('include', markup, []).render(context)
|
63
|
-
rescue => error
|
64
|
-
error_msg error
|
65
80
|
end
|
66
81
|
end
|
67
82
|
|
data/octopress-wrap-tag.gemspec
CHANGED
@@ -9,7 +9,6 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Brandon Mathis"]
|
10
10
|
spec.email = ["brandon@imathis.com"]
|
11
11
|
spec.summary = %q{A Liquid block tag which makes it easy to wrap an include, render or yield tag with html}
|
12
|
-
spec.description = %q{A Liquid block tag which makes it easy to wrap an include, render or yield tag with html}
|
13
12
|
spec.homepage = "https://github.com/octopress/wrap-tag"
|
14
13
|
spec.license = "MIT"
|
15
14
|
|
@@ -23,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
23
22
|
spec.add_runtime_dependency "octopress-render-tag", "~> 1.0"
|
24
23
|
spec.add_runtime_dependency "octopress-content-for", "~> 1.0"
|
25
24
|
spec.add_runtime_dependency "octopress-return-tag", "~> 1.0"
|
26
|
-
spec.add_runtime_dependency "jekyll", "
|
25
|
+
spec.add_runtime_dependency "jekyll", ">= 2.0"
|
27
26
|
|
28
27
|
spec.add_development_dependency "bundler", "~> 1.6"
|
29
28
|
spec.add_development_dependency "rake"
|
@@ -31,7 +30,5 @@ Gem::Specification.new do |spec|
|
|
31
30
|
spec.add_development_dependency "octopress-ink"
|
32
31
|
spec.add_development_dependency "octopress"
|
33
32
|
|
34
|
-
|
35
|
-
spec.add_development_dependency "octopress-debugger"
|
36
|
-
end
|
33
|
+
spec.add_development_dependency "octopress-debugger"
|
37
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-wrap-tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octopress-tag-helpers
|
@@ -84,14 +84,14 @@ dependencies:
|
|
84
84
|
name: jekyll
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '2.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
@@ -178,8 +178,7 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
-
description:
|
182
|
-
yield tag with html
|
181
|
+
description:
|
183
182
|
email:
|
184
183
|
- brandon@imathis.com
|
185
184
|
executables: []
|
@@ -232,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
231
|
version: '0'
|
233
232
|
requirements: []
|
234
233
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.
|
234
|
+
rubygems_version: 2.4.6
|
236
235
|
signing_key:
|
237
236
|
specification_version: 4
|
238
237
|
summary: A Liquid block tag which makes it easy to wrap an include, render or yield
|