liquid 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/liquid/tags/capture.rb +1 -1
- data/lib/liquid/tags/table_row.rb +0 -1
- data/lib/liquid/version.rb +1 -1
- data/test/integration/assign_test.rb +10 -0
- data/test/integration/capture_test.rb +10 -0
- metadata +40 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 764c2e81dc860fd817e71e6fd689b45a66bfee70
|
4
|
+
data.tar.gz: 2340fffb775ff15bfac14cb84df48a5a5556225f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6315676f23fbe9883c76df24f32ff92668febe745cb7d632004b77d07938fab98d76ed62a1afea594a1ff1c341cc1c1d83dbe13754064aedb1c2c947a1f62db4
|
7
|
+
data.tar.gz: 5516c2fe89c5e55fdfa788521cc7b3973e47ef9a206c942d2d8c1e3c184ed692ef65dcca596f273ef84b3b568c013a7275852d120d41008472cb8160aa36278b
|
data/lib/liquid/tags/capture.rb
CHANGED
data/lib/liquid/version.rb
CHANGED
@@ -3,6 +3,16 @@ require 'test_helper'
|
|
3
3
|
class AssignTest < Minitest::Test
|
4
4
|
include Liquid
|
5
5
|
|
6
|
+
def test_assign_with_hyphen_in_variable_name
|
7
|
+
template_source = <<-END_TEMPLATE
|
8
|
+
{% assign this-thing = 'Print this-thing' %}
|
9
|
+
{{ this-thing }}
|
10
|
+
END_TEMPLATE
|
11
|
+
template = Template.parse(template_source)
|
12
|
+
rendered = template.render!
|
13
|
+
assert_equal "Print this-thing", rendered.strip
|
14
|
+
end
|
15
|
+
|
6
16
|
def test_assigned_variable
|
7
17
|
assert_template_result('.foo.',
|
8
18
|
'{% assign foo = values %}.{{ foo[0] }}.',
|
@@ -7,6 +7,16 @@ class CaptureTest < Minitest::Test
|
|
7
7
|
assert_template_result("test string", "{% capture 'var' %}test string{% endcapture %}{{var}}", {})
|
8
8
|
end
|
9
9
|
|
10
|
+
def test_capture_with_hyphen_in_variable_name
|
11
|
+
template_source = <<-END_TEMPLATE
|
12
|
+
{% capture this-thing %}Print this-thing{% endcapture %}
|
13
|
+
{{ this-thing }}
|
14
|
+
END_TEMPLATE
|
15
|
+
template = Template.parse(template_source)
|
16
|
+
rendered = template.render!
|
17
|
+
assert_equal "Print this-thing", rendered.strip
|
18
|
+
end
|
19
|
+
|
10
20
|
def test_capture_to_variable_from_outer_scope_if_existing
|
11
21
|
template_source = <<-END_TEMPLATE
|
12
22
|
{% assign var = '' %}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -161,53 +161,53 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: 1.3.7
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.2.
|
164
|
+
rubygems_version: 2.2.0
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: A secure, non-evaling end user template engine with aesthetic markup.
|
168
168
|
test_files:
|
169
|
-
- test/
|
170
|
-
- test/
|
171
|
-
- test/
|
172
|
-
- test/
|
173
|
-
- test/
|
174
|
-
- test/
|
175
|
-
- test/
|
176
|
-
- test/
|
177
|
-
- test/
|
178
|
-
- test/
|
179
|
-
- test/
|
180
|
-
- test/
|
181
|
-
- test/
|
182
|
-
- test/
|
183
|
-
- test/
|
184
|
-
- test/
|
185
|
-
- test/unit/variable_unit_test.rb
|
186
|
-
- test/test_helper.rb
|
169
|
+
- test/fixtures/en_locale.yml
|
170
|
+
- test/integration/assign_test.rb
|
171
|
+
- test/integration/blank_test.rb
|
172
|
+
- test/integration/capture_test.rb
|
173
|
+
- test/integration/context_test.rb
|
174
|
+
- test/integration/drop_test.rb
|
175
|
+
- test/integration/error_handling_test.rb
|
176
|
+
- test/integration/filter_test.rb
|
177
|
+
- test/integration/hash_ordering_test.rb
|
178
|
+
- test/integration/output_test.rb
|
179
|
+
- test/integration/parsing_quirks_test.rb
|
180
|
+
- test/integration/render_profiling_test.rb
|
181
|
+
- test/integration/security_test.rb
|
182
|
+
- test/integration/standard_filter_test.rb
|
183
|
+
- test/integration/tags/break_tag_test.rb
|
184
|
+
- test/integration/tags/continue_tag_test.rb
|
187
185
|
- test/integration/tags/for_tag_test.rb
|
188
186
|
- test/integration/tags/if_else_tag_test.rb
|
189
187
|
- test/integration/tags/include_tag_test.rb
|
190
|
-
- test/integration/tags/
|
188
|
+
- test/integration/tags/increment_tag_test.rb
|
191
189
|
- test/integration/tags/raw_tag_test.rb
|
192
|
-
- test/integration/tags/table_row_test.rb
|
193
190
|
- test/integration/tags/standard_tag_test.rb
|
194
|
-
- test/integration/tags/increment_tag_test.rb
|
195
|
-
- test/integration/tags/unless_else_tag_test.rb
|
196
191
|
- test/integration/tags/statements_test.rb
|
197
|
-
- test/integration/tags/
|
198
|
-
- test/integration/
|
199
|
-
- test/integration/render_profiling_test.rb
|
200
|
-
- test/integration/parsing_quirks_test.rb
|
201
|
-
- test/integration/drop_test.rb
|
202
|
-
- test/integration/hash_ordering_test.rb
|
203
|
-
- test/integration/capture_test.rb
|
204
|
-
- test/integration/assign_test.rb
|
205
|
-
- test/integration/output_test.rb
|
206
|
-
- test/integration/error_handling_test.rb
|
207
|
-
- test/integration/blank_test.rb
|
192
|
+
- test/integration/tags/table_row_test.rb
|
193
|
+
- test/integration/tags/unless_else_tag_test.rb
|
208
194
|
- test/integration/template_test.rb
|
209
|
-
- test/integration/security_test.rb
|
210
195
|
- test/integration/variable_test.rb
|
211
|
-
- test/
|
212
|
-
- test/
|
213
|
-
- test/
|
196
|
+
- test/test_helper.rb
|
197
|
+
- test/unit/block_unit_test.rb
|
198
|
+
- test/unit/condition_unit_test.rb
|
199
|
+
- test/unit/context_unit_test.rb
|
200
|
+
- test/unit/file_system_unit_test.rb
|
201
|
+
- test/unit/i18n_unit_test.rb
|
202
|
+
- test/unit/lexer_unit_test.rb
|
203
|
+
- test/unit/module_ex_unit_test.rb
|
204
|
+
- test/unit/parser_unit_test.rb
|
205
|
+
- test/unit/regexp_unit_test.rb
|
206
|
+
- test/unit/strainer_unit_test.rb
|
207
|
+
- test/unit/tag_unit_test.rb
|
208
|
+
- test/unit/tags/case_tag_unit_test.rb
|
209
|
+
- test/unit/tags/for_tag_unit_test.rb
|
210
|
+
- test/unit/tags/if_tag_unit_test.rb
|
211
|
+
- test/unit/template_unit_test.rb
|
212
|
+
- test/unit/tokenizer_unit_test.rb
|
213
|
+
- test/unit/variable_unit_test.rb
|