Michael Go
e361a4d53c
introduce to_liquid_value on variable look and conditional statements
2021-05-26 17:27:18 -03:00
Alessandro Diogo Brückheimer and Mike Angell
e83b1e4159
Add ForceEqualSignAlignment to .rubocop.yml ( #1190 )
...
* Add ForceEqualSignAlignment to .rubocop.yml
* Revert ForceEqualSignAlignment cop
* Update method alignment
* Undo addition of whitespace to improve readability
* Fix missing alignment
2019-10-21 21:18:48 +10:00
Ashwin Maroli and Mike Angell
2c14e0b2ba
Use Regexp#match? when MatchData is not used ( #1165 )
...
* Use `Regexp#match?` when `MatchData` is not used
* Add `TargetRubyVersion: 2.4` to RuboCop config
2019-09-20 02:07:52 +10:00
0d26f05bb8
Enabled frozen string literals ( #1154 )
...
* Enabled frozen string literals
* Update rubocop config
* Prefer string interpolation in simple cases
Co-Authored-By: Dylan Thacker-Smith <[email protected] >
2019-09-18 13:19:45 +10:00
Mike Angell
799da202df
Apply simple rubocop fixes
2019-08-31 21:58:33 +10:00
Koichi ITO
0b36461d80
Suppress warning: BigDecimal.new is deprecated
...
## Summary
`BigDecimal.new` is deprecated since BigDecimal 1.3.3 for Ruby 2.5.
This PR suppresses the following warnings.
```console
% ruby -v
ruby 2.6.0dev (2018-09-06 trunk 64648) [x86_64-darwin17]
% RUBYOPT=-w bundle exec rake
(snip)
/Users/koic/src/github.com/Shopify/liquid/lib/liquid/utils.rb:49:
warning: BigDecimal.new is deprecated; use Kernel.BigDecimal method
instead.
/Users/koic/src/github.com/Shopify/liquid/lib/liquid/utils.rb:53:
warning: BigDecimal.new is deprecated; use Kernel.BigDecimal method
instead.
```
## Other Information
The following is a change of BigDecimal 1.3.3 for Ruby 2.5 related to this PR.
- https://github.com/ruby/bigdecimal/commit/533737338db915b00dc7168c3602e4b462b23503
- https://github.com/ruby/bigdecimal/commit/16738ad0aca158d3c70123990d8caa5789818177
2018-09-09 21:10:20 +09:00
Florian Weingarten
1597f8859f
Fix to_number filter for negative float strings
2016-03-31 09:18:55 -04:00
Ismael Celis
d03c4ae8e8
Allow Utils.to_number to work with anything that responds to #to_number
2016-03-30 01:57:21 -03:00
Akinori MUSHA
a215b70de9
Properly rescue ::ArgumentError in the date filter
2015-07-24 13:35:06 +09:00
Justin Li
6fb402e60d
Move to_integer, to_date, and to_number to Liquid::Utils
2015-07-08 17:33:05 -04:00
Dylan Thacker-Smith
c1eb694057
Remove the redundant iterable check in the for tag.
...
Just do it in slice_collection for consistency with the tablerow tag.
2015-05-28 16:04:50 -04:00
Dylan Thacker-Smith
873eddbb85
Split a line and use String#empty? for readability
2015-05-28 12:55:04 -04:00
Dylan Thacker-Smith
e790b60f60
Fix exception from using an empty string for the table row collection.
2015-05-28 12:11:39 -04:00
Florian Weingarten
3372ca8136
Rubocop
2015-05-14 14:37:18 +00:00
Florian Weingarten
43ac8d560b
Freeze all the things
2014-01-07 12:35:16 -05:00
Tom Burns
30e5f06313
don't make original slice_collection_using_each private
2013-11-25 10:37:10 -05:00
Tom Burns
e667352629
move slice_collection optimization to utils
2013-11-24 14:00:23 -05:00
Marcus Stollsteimer
1cac09831d
Completely remove unused variable
2013-03-05 22:19:38 +01:00
Marcus Stollsteimer
c79abf1f87
Avoid warnings for assigned but unused variable
2012-11-18 10:20:07 +01:00
Dylan Smith
d0184555d9
Allow tablerow to work with any Enumerable. Closes #132
2012-06-20 11:07:11 -04:00