Dylan Thacker-Smith
ca96ca0fef
Fix support for using a String subclass for the liquid source ( #1421 )
2021-03-29 16:22:05 -04:00
Dylan Thacker-Smith
f7d67b946e
rubocop autocorrect Style/MethodCallWithArgsParentheses
2020-12-11 13:51:00 -05:00
Dylan Thacker-Smith
1d63d5db5f
Fix a leaky test that set Tempate.error_mode without resetting it ( #1339 )
2020-10-28 10:36:33 -04:00
Dylan Thacker-Smith
038d0585cf
Move some assign score increment tests to the tag that increments
2020-10-21 10:21:00 -04:00
Dylan Thacker-Smith
ae9dbe0ca7
Fix render length resource limit so it doesn't multiply nested output
2020-09-03 11:13:04 -04:00
Dylan Thacker-Smith
3b486425b0
Handle BlockBody#blank? at parse time ( #1287 )
2020-09-03 11:07:13 -04:00
Dylan Thacker-Smith
2b11efc3ae
Fix performance regression from introduction of Template#disable_tags ( #1274 )
2020-08-18 11:25:51 -04:00
Dylan Thacker-Smith
065ccbc4aa
Remove support for taint checking
2020-07-23 16:22:46 -04:00
Feken Baboyan
8541c6be35
make Template override static registers only when the register key is not defined
2020-05-28 09:08:03 -04:00
Dylan Thacker-Smith
40c68c9c83
Remove support for taint_mode on ruby versions that don't support it
2019-12-19 11:12:51 -05:00
Alessandro Diogo Brückheimer
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
Mike Angell
5302f40342
Rubocop fixes ( #1182 )
2019-10-07 17:06:47 +11:00
Mike Angell
b667bcb48b
Shopify stye guide fixes ( #1160 )
2019-09-20 02:08:11 +10:00
Mike Angell
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 <dylan.smith@shopify.com >
2019-09-18 13:19:45 +10:00
Mike Angell
799da202df
Apply simple rubocop fixes
2019-08-31 21:58:33 +10:00
Florian Weingarten
c89ce9c2ed
use bytesize, not length
2019-04-17 18:55:13 +01:00
Pascal Betz
a979b3ec95
Do not raise when variable is defined but nil when using strict_variables
2017-08-18 12:09:57 -04:00
Dylan Thacker-Smith
f27bd619b9
change: Render an opaque internal error by default for non-Liquid::Error ( #835 )
...
These errors may contain sensitive information, so is safer to
render a more vague message by default.
This is done by replacing non-Liquid::Error exceptions with a
Liquid::InternalError exception with the non-Liquid::Error accessible on
through the cause method. This also allows the template name and line
number to be attached to the template errors.
The exception_handler render option has been changed to exception_renderer
since now it should raise an exception to re-raise on a liquid rendering
error or return a string to be rendered where the error occurred.
2016-12-07 17:34:29 -05:00
Gaurav Chande
00f53b16e8
Prevent Range usage in templates from blowing up
2016-06-02 16:38:44 -04:00
Justin Li
a6fa4c5c38
Merge pull request #691 from urbandictionary/missing_variables_and_filters
...
Merge pull request 691
2016-02-02 23:13:44 -05:00
Ivan Kuznetsov
dadd9b4dd2
Add strict_variables/strict_filters render options to check for undefined variables and filters
2016-02-03 10:49:33 +07:00
Justin Li
198f0aa366
Add test for nested assign score bookkeeping
2016-02-01 13:01:23 -05:00
Thierry Joyal
ac041c4ad1
Rename before_method as liquid_method_missing
2015-10-28 17:28:19 +00:00
Loren Hale
0b11b573d9
add global_filter
...
add a global filter using a proc
only add one proc and not an array
add tests to make sure the global_filter is applied after native filters
2015-07-12 16:46:43 +08:00
Dylan Thacker-Smith
6265c36ec9
Raise Liquid::ZeroDivisionError instead of ZeroDivisionError.
2015-05-25 15:40:17 -04:00
Florian Weingarten
f4724f0db3
Remove support for liquid_methods Module extension
2015-05-14 14:44:19 +00:00
Florian Weingarten
3372ca8136
Rubocop
2015-05-14 14:37:18 +00:00
Justin Li
3080f95a4f
Make render_length tests stricter
2014-12-11 10:41:47 -05:00
Justin Li
cc57908c03
Add test for render_length persisting between block bodies
2014-12-11 10:38:47 -05:00
Justin Li
4df4f218cf
Use same template instance
2014-12-09 17:25:15 -05:00
Justin Li
1593b784a7
Simplify interface for setting template resource limits
2014-12-04 16:18:21 -05:00
Justin Li
db00ec8b32
Move resource limit tracking to its own class
2014-12-04 16:18:09 -05:00
Justin Li
737be1a0c1
Use Timeout#timeout for warnings tests
2014-11-12 17:03:48 -05:00
Justin Li
422bafd66a
Fix #warnings taking exponential time to compute
2014-11-12 16:12:00 -05:00
Dylan Thacker-Smith
cf5ccede50
Avoid modifying the default resources limits hash.
2014-10-01 18:51:06 -05:00
Ken Dreyer
ee4295c889
tests: switch to minitest
...
Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5,
the shim has broken some compatibility with Test::Unit::TestCase in some
scenarios.
Adjusts the test suite to support Minitest 5's syntax.
Minitest versions 4 and below do not support the newer Minitest::Test
class that arrived in version 5. For that case, use the
MiniTest::Unit::TestCase class as a fallback
Conflicts:
test/integration/tags/for_tag_test.rb
test/test_helper.rb
2014-07-28 16:36:38 +00:00
Florian Weingarten
6c6350f18b
Exception handling for humans
...
Ability to pass exception_handler as a block to #render
and provide whatever behavior you want on handling exceptions
https://github.com/Shopify/liquid/pull/254
2014-07-24 14:44:02 +00:00
Thierry Joyal
ad1152853a
render! will properly force rethrow of errors if context is passed as an argument
2014-05-01 16:44:00 +00:00
Dylan Thacker-Smith
7e45155aa9
Seperate unit and integration tests.
...
This makes it easier to re-use the integration tests in a seperate gem that
optimizes parts of liquid with a native implementation.
2014-03-26 15:47:07 -04:00