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] 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) 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/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 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' 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