mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 10:52:48 -07:00
+10
-2
@@ -1,8 +1,16 @@
|
|||||||
# Liquid Version History
|
# 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]
|
* 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]
|
* Fixed condition with wrong data types, see #423 [Bogdan Gusiev]
|
||||||
* Add url_encode to standard filters, see #421 [Derrick Reimer, djreimer]
|
* Add url_encode to standard filters, see #421 [Derrick Reimer, djreimer]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/if'
|
|||||||
module Liquid
|
module Liquid
|
||||||
# Unless is a conditional just like 'if' but works on the inverse logic.
|
# 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
|
class Unless < If
|
||||||
def render(context)
|
def render(context)
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ module Liquid
|
|||||||
SQUARE_BRACKETED = /\A\[(.*)\]\z/m
|
SQUARE_BRACKETED = /\A\[(.*)\]\z/m
|
||||||
COMMAND_METHODS = ['size'.freeze, 'first'.freeze, 'last'.freeze]
|
COMMAND_METHODS = ['size'.freeze, 'first'.freeze, 'last'.freeze]
|
||||||
|
|
||||||
|
attr_reader :name, :lookups
|
||||||
|
|
||||||
def self.parse(markup)
|
def self.parse(markup)
|
||||||
new(markup)
|
new(markup)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
module Liquid
|
module Liquid
|
||||||
VERSION = "3.0.1"
|
VERSION = "3.0.2"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
ENV["MT_NO_EXPECTATIONS"] = "1"
|
||||||
require 'minitest/autorun'
|
require 'minitest/autorun'
|
||||||
require 'spy/integration'
|
require 'spy/integration'
|
||||||
|
|
||||||
|
|||||||
@@ -136,4 +136,10 @@ class VariableUnitTest < Minitest::Test
|
|||||||
var = Variable.new(%! name_of_variable | upcase !)
|
var = Variable.new(%! name_of_variable | upcase !)
|
||||||
assert_equal " name_of_variable | upcase ", var.raw
|
assert_equal " name_of_variable | upcase ", var.raw
|
||||||
end
|
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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user