Tobi Lutke
3befa567b1
Add hermetic template recording and replay
2026-08-07 12:30:55 -04:00
Guilherme Carreiro and Guilherme Carreiro
6aa4041c0f
Rename with_error_mode(...) to with_error_modes(...)
2025-10-27 16:33:31 +01:00
Michael Go
c77ff68573
clean up all warnings by using new Environment
2024-11-04 16:15:05 -04:00
Ian Ker-Seymer and GitHub
fb6634f454
Add concept of Liquid::Environment ( #1815 )
...
* Add concept of `Liquid::World`
* Rename `World` to `Environment`
2024-08-07 15:00:44 -04:00
Michael Go
1d97389fb0
render template name with Liquid Syntax errors
2023-03-02 16:50:55 -04:00
Guilherme Carreiro and GitHub
9ab688eada
Update rubocop-shopify (2.7.0 -> 2.12.0) ( #1687 )
2023-02-15 08:40:59 +01:00
Dylan Thacker-Smith and GitHub
2515f3be09
Use assert_template_result & assert_match_syntax_error in more places ( #1611 )
2022-09-01 17:40:39 -04:00
Dylan Thacker-Smith
f7d67b946e
rubocop autocorrect Style/MethodCallWithArgsParentheses
2020-12-11 13:51:00 -05:00
Dylan Thacker-Smith and GitHub
77084930e9
Bring back silencing of errors in blank nodes for backwards compatibility ( #1292 )
2020-09-15 10:35:18 -04: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
Mike Angell and GitHub
5302f40342
Rubocop fixes ( #1182 )
2019-10-07 17:06:47 +11:00
Mike Angell and GitHub
b667bcb48b
Shopify stye guide fixes ( #1160 )
2019-09-20 02:08:11 +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
Ashwin Maroli and Justin Li
f59f6dea83
Fix simple RuboCop offenses and update TODO file ( #1062 )
...
* Fix Layout/EmptyLineAfterMagicComment offense
* Fix Layout/ExtraSpacing offense
* Fix Layout/ClosingParenthesisIndentation offenses
* Fix Style/MutableConstant offense
* Fix Style/UnneededInterpolation offenses
* Fix Style/RedundantParentheses offenses
* Update TODO config for RuboCop
* Add executable bit to test/test_helper.rb
ref: https://travis-ci.org/Shopify/liquid/jobs/488169512#L578
2019-02-22 12:32:56 -05:00
Dylan Thacker-Smith and GitHub
869dbc7ebf
feature: Allow a default exception renderer to be specified ( #837 )
...
This could be used to preserve the old default of rendering
non-Liquid::Error messages or for providing default behaviour like error
reporting which could be missed if the exception renderer needed to be
specified on each render.
2016-12-12 10:29:09 -05:00
Dylan Thacker-Smith and GitHub
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
Michael Angell
e1d40c7d89
Add whitespace control character and associated tests
2016-06-28 09:15:45 +10:00
Florian Weingarten
d2f16d92d6
Fix a bunch of Ruby warnings
2016-03-30 20:42:30 +00:00
Dylan Thacker-Smith
ad3748af21
Include template name with line numbers in render errors.
2015-06-04 13:44:01 -04:00
Florian Weingarten
82269e2509
fix a few more rubocop offenses
2015-06-04 13:09:58 -04:00
Florian Weingarten
e761a6864e
clean up some rubocop stuff
2015-06-04 12:56:29 -04:00
Dylan Thacker-Smith
8ff1b8e01f
Test set_line_number_from_token after exception is converted.
2015-05-28 09:22:02 -04:00
Dylan Thacker-Smith
8d5e71f856
Allow the exception handler to convert exceptions to hide error messages.
2015-05-27 18:59:51 -04:00
Dylan Thacker-Smith
36200ff704
Make liquid error rendering optional.
...
Although the author of the liquid template wants to see these errors, they
probably don't want the visitor to see the liquid errors. Probably the
best fallback when rendering the page for visitors is to render the empty
string for tags with errors.
2015-05-25 11:24:53 -04:00
Justin Li
dad98cfc89
Merge pull request #562 from Shopify/use-find_variable-for-parentloop
...
Use custom stack for forloop references
2015-05-15 21:48:57 -04:00
Justin Li
648a4888af
Pop the for_stack register in an ensure
2015-05-14 15:02:20 -04:00
Florian Weingarten
3372ca8136
Rubocop
2015-05-14 14:37:18 +00:00
Dylan Thacker-Smith
d84870d7a5
Test line number of errors in nested blocks.
2014-10-03 16:25:12 -05:00
Florian Weingarten
584b492e70
Line numbers for all parse errors
2014-10-03 21:00:31 +00:00
Florian Weingarten
c83e1c7b6d
prefix for Liquid::Error instances
2014-09-05 14:12:30 +00:00
Florian Weingarten
17cc8fdbb3
put line number in parentheses
2014-09-05 14:12:30 +00:00
Tristan Hume and Florian Weingarten
27c1019385
Add line numbers to warnings
2014-09-05 14:12:30 +00:00
Florian Weingarten
5eff375094
Optional line numbers for liquid errors
2014-09-05 14:12:29 +00:00
Ken Dreyer and Florian Weingarten
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
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