From 47dbcd93a5c5d7f7c2416d34608e4fc52a75fed1 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Tue, 21 Apr 2015 23:33:13 -0400 Subject: [PATCH 1/5] Merge pull request #551 from Shopify/expose-variable-name Merge pull request 551 --- lib/liquid/variable_lookup.rb | 2 ++ test/unit/variable_unit_test.rb | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lib/liquid/variable_lookup.rb b/lib/liquid/variable_lookup.rb index 6a58fe2..92f57c8 100644 --- a/lib/liquid/variable_lookup.rb +++ b/lib/liquid/variable_lookup.rb @@ -3,6 +3,8 @@ module Liquid SQUARE_BRACKETED = /\A\[(.*)\]\z/m COMMAND_METHODS = ['size'.freeze, 'first'.freeze, 'last'.freeze] + attr_reader :name, :lookups + def self.parse(markup) new(markup) end diff --git a/test/unit/variable_unit_test.rb b/test/unit/variable_unit_test.rb index 13d2cc4..b1b2f31 100644 --- a/test/unit/variable_unit_test.rb +++ b/test/unit/variable_unit_test.rb @@ -136,4 +136,10 @@ class VariableUnitTest < Minitest::Test var = Variable.new(%! name_of_variable | upcase !) assert_equal " name_of_variable | upcase ", var.raw end + + def test_variable_lookup_interface + lookup = VariableLookup.new('a.b.c') + assert_equal 'a', lookup.name + assert_equal ['b', 'c'], lookup.lookups + end end From 8c193e203f4b95fd77f84557eb886b2893de2acc Mon Sep 17 00:00:00 2001 From: Florian Weingarten Date: Fri, 24 Apr 2015 11:25:16 -0400 Subject: [PATCH 2/5] bump version --- lib/liquid/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/version.rb b/lib/liquid/version.rb index 757b3fa..6f4eb01 100644 --- a/lib/liquid/version.rb +++ b/lib/liquid/version.rb @@ -1,4 +1,4 @@ # encoding: utf-8 module Liquid - VERSION = "3.0.1" + VERSION = "3.0.2" end From 291b58bc91b9f2fe88b0565314089341867e72e7 Mon Sep 17 00:00:00 2001 From: Florian Weingarten Date: Wed, 19 Nov 2014 14:02:58 +0100 Subject: [PATCH 3/5] Merge pull request #489 from alex-ross/patch-1 Fixes syntax error in documentation for unless tag --- lib/liquid/tags/unless.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/tags/unless.rb b/lib/liquid/tags/unless.rb index eb8a731..c0e22b6 100644 --- a/lib/liquid/tags/unless.rb +++ b/lib/liquid/tags/unless.rb @@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/if' module Liquid # Unless is a conditional just like 'if' but works on the inverse logic. # - # {% unless x < 0 %} x is greater than zero {% end %} + # {% unless x < 0 %} x is greater than zero {% endunless %} # class Unless < If def render(context) From 9dd24824f9a035e1bd88062950998962d66ed216 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Mon, 20 Apr 2015 10:15:19 -0400 Subject: [PATCH 4/5] Disable minitest expectation interface due to reckless modification of Object --- test/test_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index d1ebf57..ac01390 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,6 @@ #!/usr/bin/env ruby +ENV["MT_NO_EXPECTATIONS"] = "1" require 'minitest/autorun' require 'spy/integration' From 9bd05110dcffb98c05f203b371e2e0a745e767c3 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Fri, 24 Apr 2015 16:05:55 -0400 Subject: [PATCH 5/5] Update changelog --- History.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 486eb94..52b4f61 100644 --- a/History.md +++ b/History.md @@ -1,8 +1,16 @@ # Liquid Version History -## 3.0.0 / not yet released / branch "master" +## 3.0.2 / 2015-04-24 / branch "3-0-stable" + +* Expose VariableLookup private members (#551) [Justin Li, pushrax] +* Documentation fixes + +## 3.0.1 / 2015-01-23 + +* Remove duplicate `index0` key in TableRow tag (#502) [Alfred Xing] + +## 3.0.0 / 2014-11-12 -* ... * Removed Block#end_tag. Instead, override parse with `super` followed by your code. See #446 [Dylan Thacker-Smith, dylanahsmith] * Fixed condition with wrong data types, see #423 [Bogdan Gusiev] * Add url_encode to standard filters, see #421 [Derrick Reimer, djreimer]