mirror of
https://github.com/kemko/liquid.git
synced 2026-01-02 08:15:41 +03:00
Compare commits
6 Commits
v4.0.0.rc1
...
force-to_l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e99c7e2eec | ||
|
|
08de6ed2c5 | ||
|
|
7e322f5cf8 | ||
|
|
bf86a5a069 | ||
|
|
0141444814 | ||
|
|
6d30226768 |
@@ -10,6 +10,11 @@ rvm:
|
||||
|
||||
sudo: false
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libgmp3-dev
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- rvm: jruby-head
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
## 4.0.0 / not yet released / branch "master"
|
||||
|
||||
### Changed
|
||||
* Improve loop performance (#681) [Florian Weingarten]
|
||||
* Rename Drop method `before_method` to `liquid_method_missing` (#661) [Thierry Joyal]
|
||||
* Add url_decode filter to invert url_encode (#645) [Larry Archer]
|
||||
* Add global_filter to apply a filter to all output (#610) [Loren Hale]
|
||||
* Add compact filter (#600) [Carson Reinke]
|
||||
@@ -15,9 +17,11 @@
|
||||
* Ruby 1.9 support dropped (#491) [Justin Li]
|
||||
* Liquid::Template.file_system's read_template_file method is no longer passed the context. (#441) [James Reid-Smith]
|
||||
* Remove support for `liquid_methods`
|
||||
* Rename Drop method `before_method` as `liquid_method_missing` (#661) [Thierry Joyal]
|
||||
|
||||
### Fixed
|
||||
* Fix map filter when value is a Proc (#672) [Guillaume Malette]
|
||||
* Fix truncate filter when value is not a string (#672) [Guillaume Malette]
|
||||
* Fix behaviour of escape filter when input is nil (#665) [Tanel Jakobsoo]
|
||||
* Fix sort filter behaviour with empty array input (#652) [Marcel Cary]
|
||||
* Fix test failure under certain timezones (#631) [Dylan Thacker-Smith]
|
||||
* Fix bug in uniq filter (#595) [Florian Weingarten]
|
||||
|
||||
@@ -60,3 +60,9 @@ class NilClass
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
class Proc
|
||||
def to_liquid # :nodoc:
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
@@ -341,9 +341,12 @@ module Liquid
|
||||
raise Liquid::FloatDomainError, e.message
|
||||
end
|
||||
|
||||
def default(input, default_value = "".freeze)
|
||||
is_blank = input.respond_to?(:empty?) ? input.empty? : !input
|
||||
is_blank ? default_value : input
|
||||
def default(input, default_value = ''.freeze)
|
||||
if !input || input.respond_to?(:empty?) && input.empty?
|
||||
default_value
|
||||
else
|
||||
input
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
@@ -395,7 +398,7 @@ module Liquid
|
||||
|
||||
def each
|
||||
@input.each do |e|
|
||||
yield(e.respond_to?(:to_liquid) ? e.to_liquid : e)
|
||||
yield(e.to_liquid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user