liquid 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b16a9ef0a4f67b44c9fca4d7ef63db9d254220e
4
- data.tar.gz: d53a4e4ab6ba227b62684325c0c374c5e132c342
3
+ metadata.gz: ba57f2ab9f172f86a9ec2423ac7d1fe143018f8c
4
+ data.tar.gz: b70008837aa1d07dae8727da5a101bbc54c9b341
5
5
  SHA512:
6
- metadata.gz: e82a6fe4e69228e0e9beddbff8f9e138005f9cd6ea3dd478aedff2b3315c7fcb45428d2175eebd48e0060757b4e3e718242786ca0d7c066834c651697aa5d268
7
- data.tar.gz: f62a4f5ff4b5482cf230b5ce74a362a4516eb4f65eaf2526adacb79ed5d8063e68ae22c6491e8464b719ca2fc1f64d2be7f652c68cb8b69bc5afd53fc4c8564a
6
+ metadata.gz: 87bfbe742ab9d4da0b5afbbe4b111d7feeaf7c7177439b978b422b907ba6aa7a449af112ed245c271e37f6c071d2399d0bde85a1edb26f6bcd646e453eacc7d2
7
+ data.tar.gz: f89338151cca9e2c8615a14f27555b9f742d5cf161f612fdb173e5c808040fd9f4d4bc1cc7808aefa36b27d811106684e9812a4e913ddc42d552b0ea2b2f98f8
data/lib/liquid/parser.rb CHANGED
@@ -75,7 +75,7 @@ module Liquid
75
75
 
76
76
  def variable_signature
77
77
  str = consume(:id)
78
- if look(:open_square)
78
+ while look(:open_square)
79
79
  str << consume
80
80
  str << expression
81
81
  str << consume(:close_square)
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Liquid
3
- VERSION = "3.0.3"
3
+ VERSION = "3.0.4"
4
4
  end
@@ -44,6 +44,14 @@ class OutputTest < Minitest::Test
44
44
  assert_equal expected, Template.parse(text).render!(@assigns)
45
45
  end
46
46
 
47
+ def test_variable_traversing_with_two_brackets
48
+ text = %({{ site.data.menu[include.menu][include.locale] }})
49
+ assert_equal "it works!", Template.parse(text).render!(
50
+ "site" => { "data" => { "menu" => { "foo" => { "bar" => "it works!" } } } },
51
+ "include" => { "menu" => "foo", "locale" => "bar" }
52
+ )
53
+ end
54
+
47
55
  def test_variable_traversing
48
56
  text = %| {{car.bmw}} {{car.gm}} {{car.bmw}} |
49
57
 
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.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -161,7 +161,7 @@ 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.3
164
+ rubygems_version: 2.2.1
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: A secure, non-evaling end user template engine with aesthetic markup.