Commit Graph

334 Commits

Author SHA1 Message Date
Florian Weingarten
529cc60ef1 backport argument error fix 2015-07-24 11:04:40 -04:00
Dylan Thacker-Smith
d891c2b7ab Fix a timezone test failure. 2015-07-23 16:37:26 -04:00
Florian Weingarten
8f84ddb5ce Fix chained access to multi-dimensional hash 2015-07-17 11:19:38 -04:00
Justin Li
49f2af4209 Merge pull request #570 from Shopify/fix-strict-conditions
Fix condition parse order in strict mode
2015-05-28 16:37:43 -04:00
Justin Li
9dd24824f9 Disable minitest expectation interface due to reckless modification of Object 2015-04-24 13:31:54 -04:00
Justin Li
47dbcd93a5 Merge pull request #551 from Shopify/expose-variable-name
Merge pull request 551
2015-04-24 11:23:35 -04:00
Dylan Thacker-Smith
000d0c911b Merge pull request #519 from Shopify/remove-filter-method-blacklist
Allow filters to redefine Object methods to make them invokable.
2015-02-04 18:09:51 -05:00
Florian Weingarten
cbc163ba1c Merge pull request #506 from Shopify/fix_capture_with_hyphen
Use VariableSignature as Syntax for Capture tag to allow hyphens in variable names
2015-01-23 10:37:52 -05:00
Florian Weingarten
d6db28c854 Revert "Merge pull request #463 from Shopify/stricter-identifiers"
This reverts commit a056f6521c, reversing
changes made to 7843bcca8d.
2014-11-07 01:49:01 +00:00
Florian Weingarten
475ea51f1f Revert "Merge pull request #466 from Shopify/remove-expression-cache"
This reverts commit d9ae36ec40, reversing
changes made to 2da9d49478.
2014-11-07 01:48:51 +00:00
Florian Weingarten
9c33e9601b Revert "Merge pull request #476 from Shopify/missing-variable-name-error"
This reverts commit 4dc682313f, reversing
changes made to a8f60ff6b1.
2014-11-07 01:48:16 +00:00
Florian Weingarten
b242a7273a Revert "Merge pull request #478 from Shopify/numbers-in-identifiers"
This reverts commit 263e90e772, reversing
changes made to 4dc682313f.
2014-11-07 01:48:05 +00:00
Florian Weingarten
4b1835e3c0 Revert "Merge pull request #458 from Shopify/block-body"
This reverts commit 12d526a05c, reversing
changes made to 263e90e772.

Conflicts:
	lib/liquid/block_body.rb
2014-11-07 01:47:47 +00:00
Justin Li
95b031ee04 Add quirks test for extra dots in ranges 2014-11-05 11:41:12 -05:00
Justin Li
4d97a714a9 Add quirks test for variables with number prefixes 2014-11-05 10:56:58 -05:00
Dylan Thacker-Smith
2fd8ad08c0 Remove unused local variable that was accidentally added. 2014-11-03 17:07:42 -05:00
Dylan Thacker-Smith
73fcd42403 Create a BlockBody class to decouple block body parsing from tags. 2014-11-03 17:07:42 -05:00
Justin Li
dd5ee81089 Disallow number and dash identifier prefixes 2014-10-29 12:08:00 -04:00
Justin Li
a07e382617 Use a single token for identifiers 2014-10-29 11:28:41 -04:00
Justin Li
fcb23a4cd2 Disallow filters with no variable in strict mode 2014-10-27 13:34:27 -04:00
Justin Li
a206c8301d Fix test leaking error_mode, fix equality check for VariableLookup 2014-10-22 15:40:41 -04:00
Justin Li
887b05e6ed Clarify test name 2014-10-21 14:06:30 -04:00
Justin Li
5d68e8803f Ensure nil works as a variable name 2014-10-21 14:03:10 -04:00
Justin Li
dedd1d3dc0 Fix case where a variable name is falsy 2014-10-21 12:09:26 -04:00
Dylan Thacker-Smith
b9ac3fef8f Remove the quotes from the partial string in the profiler timing objects. 2014-10-18 16:26:18 -04:00
Dylan Thacker-Smith
f5faa4858c Remove parsed expression cache. 2014-10-18 15:03:40 -04:00
Dylan Thacker-Smith
a1a128db19 Refactor Condition so that it takes a parsed expression. 2014-10-18 15:03:40 -04:00
Florian Weingarten
7196a2d58e Avoid parallel assignments 2014-10-18 13:58:32 +00:00
Justin Li
b4ea483c4e Separate ? and - into special tokens 2014-10-17 13:30:54 -04:00
Dylan Thacker-Smith
f387508666 Parse expressions in Liquid::Variable#parse. 2014-10-08 21:06:59 -04: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
Dylan Thacker-Smith
cf5ccede50 Avoid modifying the default resources limits hash. 2014-10-01 18:51:06 -05:00
Evan Huus
23622a9739 Merge pull request #440 from Shopify/drop-tainting
Variable tainting
2014-09-22 13:43:35 -04:00
Florian Weingarten
be3d261e11 Regression test for including assignments 2014-09-18 10:37:44 +00:00
Evan Huus
eeb061ef44 Address code review comments
- clean up comment wording
- fix potentially leaky tests
2014-09-16 17:23:26 +00:00
Evan Huus
67b2c320a1 Add tainting tests 2014-09-16 17:23:26 +00:00
Dylan Thacker-Smith
a5717a3f8d Fix flaky test which assumes total_render_time can't be 0.
jruby has millisecond precision for Time.now, so total_render_time can be 0
due to this lack of precision.
2014-09-15 17:26:55 -04:00
Jason Hiltz-Laforge
aafdf4adb0 Fix JRuby builds 2014-09-08 20:41:22 +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
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
Tristan Hume
68af2d6e2a Pass options to include tags 2014-08-26 10:50:25 -04:00
Bogdan Gusiev
4e9d414fde Fixed condition constains operator with wrong data type
"contains" operator on wrong data type should not cause NoMethodError.
2014-08-18 17:32:29 +03:00
Derrick Reimer
0b847e553c Add url_encode standard filter 2014-08-15 08:45:40 -07:00
Florian Weingarten
c2663258be Merge pull request #364 from collectiveidea/instrument-rendering-with-hooks
Profiling the rendering of a liquid template
2014-08-13 23:04:29 +02:00
Florian Weingarten
35808390ee Merge pull request #414 from Shopify/to_liquid_context
Call to_liquid in Context invoke
2014-08-12 22:05:52 +02:00
Florian Weingarten
1678c07548 Call to_liquid in Context invoke 2014-08-12 19:54:12 +00:00
Jason Roelofs
173a58d36a Profile liquid rendering
Add a simple profiling system to liquid rendering. Each
liquid tag ({{ }} and {% %}) is processed through this profiling,
keeping track of the partial name (in the case of {% include %}), line
number, and the time it took to render the tag. In the case of {%
include %}, the profiler keeps track of the name of the partial and
properly links back tag rendering to the partial and line number for
easy lookup and dive down. With this, it's now possible to track down
exactly how long each tag takes to render.

These hooks get installed and uninstalled on an as-need basis so by
default there is no impact on the overall liquid execution speed.
2014-08-12 15:37:21 -04:00