liquor 0.1.1 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +3 -9
  5. data/Gemfile +7 -0
  6. data/Guardfile +11 -0
  7. data/MIT-LICENSE +6 -2
  8. data/README.md +4 -122
  9. data/Rakefile +20 -23
  10. data/doc/language-spec.html +768 -0
  11. data/doc/language-spec.md +698 -0
  12. data/lib/liquor.rb +39 -68
  13. data/lib/liquor/ast_tools.rb +28 -0
  14. data/lib/liquor/compiler.rb +110 -0
  15. data/lib/liquor/context.rb +76 -254
  16. data/lib/liquor/diagnostics.rb +151 -0
  17. data/lib/liquor/drop/drop.rb +168 -0
  18. data/lib/liquor/drop/drop_delegation.rb +24 -0
  19. data/lib/liquor/drop/drop_scope.rb +118 -0
  20. data/lib/liquor/drop/dropable.rb +17 -0
  21. data/lib/liquor/emitter.rb +313 -0
  22. data/lib/liquor/extensions/kaminari.rb +14 -0
  23. data/lib/liquor/extensions/pagination.rb +235 -0
  24. data/lib/liquor/extensions/rails.rb +97 -0
  25. data/lib/liquor/extensions/thinking_sphinx.rb +14 -0
  26. data/lib/liquor/extensions/tire.rb +30 -0
  27. data/lib/liquor/external.rb +79 -0
  28. data/lib/liquor/function.rb +94 -0
  29. data/lib/liquor/grammar/lexer.rb +1223 -0
  30. data/lib/liquor/grammar/lexer.rl +297 -0
  31. data/lib/liquor/grammar/parser.racc +288 -0
  32. data/lib/liquor/grammar/parser.rb +885 -0
  33. data/lib/liquor/library.rb +41 -0
  34. data/lib/liquor/manager.rb +146 -0
  35. data/lib/liquor/runtime.rb +167 -0
  36. data/lib/liquor/stdlib/builtin_functions.rb +315 -0
  37. data/lib/liquor/stdlib/builtin_tags.rb +228 -0
  38. data/lib/liquor/stdlib/html_truncater.rb +162 -0
  39. data/lib/liquor/stdlib/partial_tags.rb +76 -0
  40. data/lib/liquor/tag.rb +83 -14
  41. data/lib/liquor/version.rb +1 -1
  42. data/liquor.gemspec +29 -6
  43. data/spec/builtins_spec.rb +264 -0
  44. data/spec/compiler_spec.rb +136 -0
  45. data/spec/context_spec.rb +49 -0
  46. data/spec/drop_delegation_spec.rb +21 -0
  47. data/spec/drop_spec.rb +222 -0
  48. data/spec/errors_spec.rb +40 -0
  49. data/spec/external_spec.rb +207 -0
  50. data/spec/function_spec.rb +80 -0
  51. data/spec/lexer_spec.rb +173 -0
  52. data/spec/library_spec.rb +18 -0
  53. data/spec/manager_spec.rb +84 -0
  54. data/spec/parser_spec.rb +381 -0
  55. data/spec/partials_spec.rb +74 -0
  56. data/spec/runtime_spec.rb +97 -0
  57. data/spec/spec_helper.rb +94 -0
  58. data/spec/tag_spec.rb +7 -0
  59. metadata +216 -173
  60. data/AUTHORS +0 -2
  61. data/CHANGELOG +0 -48
  62. data/Gemfile.lock +0 -91
  63. data/History.txt +0 -44
  64. data/LICENSE +0 -23
  65. data/example/server/example_servlet.rb +0 -37
  66. data/example/server/liquid_servlet.rb +0 -28
  67. data/example/server/liquor_servlet.rb +0 -28
  68. data/example/server/server.rb +0 -12
  69. data/example/server/templates/index.liquid +0 -6
  70. data/example/server/templates/index.liquor +0 -6
  71. data/example/server/templates/products.liquid +0 -45
  72. data/example/server/templates/products.liquor +0 -45
  73. data/init.rb +0 -8
  74. data/lib/extras/liquid_view.rb +0 -51
  75. data/lib/extras/liquor_view.rb +0 -51
  76. data/lib/liquor/block.rb +0 -101
  77. data/lib/liquor/condition.rb +0 -120
  78. data/lib/liquor/document.rb +0 -17
  79. data/lib/liquor/drop.rb +0 -256
  80. data/lib/liquor/errors.rb +0 -11
  81. data/lib/liquor/extensions.rb +0 -72
  82. data/lib/liquor/file_system.rb +0 -62
  83. data/lib/liquor/htmltags.rb +0 -74
  84. data/lib/liquor/module_ex.rb +0 -60
  85. data/lib/liquor/standardfilters.rb +0 -315
  86. data/lib/liquor/strainer.rb +0 -58
  87. data/lib/liquor/tags/assign.rb +0 -33
  88. data/lib/liquor/tags/capture.rb +0 -35
  89. data/lib/liquor/tags/case.rb +0 -83
  90. data/lib/liquor/tags/comment.rb +0 -9
  91. data/lib/liquor/tags/content_for.rb +0 -54
  92. data/lib/liquor/tags/cycle.rb +0 -59
  93. data/lib/liquor/tags/for.rb +0 -136
  94. data/lib/liquor/tags/if.rb +0 -80
  95. data/lib/liquor/tags/ifchanged.rb +0 -20
  96. data/lib/liquor/tags/include.rb +0 -56
  97. data/lib/liquor/tags/unless.rb +0 -33
  98. data/lib/liquor/tags/yield.rb +0 -49
  99. data/lib/liquor/template.rb +0 -181
  100. data/lib/liquor/variable.rb +0 -52
  101. data/performance/shopify.rb +0 -92
  102. data/performance/shopify/comment_form.rb +0 -33
  103. data/performance/shopify/database.rb +0 -45
  104. data/performance/shopify/json_filter.rb +0 -7
  105. data/performance/shopify/liquid.rb +0 -18
  106. data/performance/shopify/liquor.rb +0 -18
  107. data/performance/shopify/money_filter.rb +0 -18
  108. data/performance/shopify/paginate.rb +0 -93
  109. data/performance/shopify/shop_filter.rb +0 -98
  110. data/performance/shopify/tag_filter.rb +0 -25
  111. data/performance/shopify/vision.database.yml +0 -945
  112. data/performance/shopify/weight_filter.rb +0 -11
  113. data/performance/tests/dropify/article.liquid +0 -74
  114. data/performance/tests/dropify/blog.liquid +0 -33
  115. data/performance/tests/dropify/cart.liquid +0 -66
  116. data/performance/tests/dropify/collection.liquid +0 -22
  117. data/performance/tests/dropify/index.liquid +0 -47
  118. data/performance/tests/dropify/page.liquid +0 -8
  119. data/performance/tests/dropify/product.liquid +0 -68
  120. data/performance/tests/dropify/theme.liquid +0 -105
  121. data/performance/tests/ripen/article.liquid +0 -74
  122. data/performance/tests/ripen/blog.liquid +0 -13
  123. data/performance/tests/ripen/cart.liquid +0 -54
  124. data/performance/tests/ripen/collection.liquid +0 -29
  125. data/performance/tests/ripen/index.liquid +0 -32
  126. data/performance/tests/ripen/page.liquid +0 -4
  127. data/performance/tests/ripen/product.liquid +0 -75
  128. data/performance/tests/ripen/theme.liquid +0 -85
  129. data/performance/tests/tribble/404.liquid +0 -56
  130. data/performance/tests/tribble/article.liquid +0 -98
  131. data/performance/tests/tribble/blog.liquid +0 -41
  132. data/performance/tests/tribble/cart.liquid +0 -134
  133. data/performance/tests/tribble/collection.liquid +0 -70
  134. data/performance/tests/tribble/index.liquid +0 -94
  135. data/performance/tests/tribble/page.liquid +0 -56
  136. data/performance/tests/tribble/product.liquid +0 -116
  137. data/performance/tests/tribble/search.liquid +0 -51
  138. data/performance/tests/tribble/theme.liquid +0 -90
  139. data/performance/tests/vogue/article.liquid +0 -66
  140. data/performance/tests/vogue/blog.liquid +0 -32
  141. data/performance/tests/vogue/cart.liquid +0 -58
  142. data/performance/tests/vogue/collection.liquid +0 -19
  143. data/performance/tests/vogue/index.liquid +0 -22
  144. data/performance/tests/vogue/page.liquid +0 -3
  145. data/performance/tests/vogue/product.liquid +0 -62
  146. data/performance/tests/vogue/theme.liquid +0 -122
  147. data/test/assign_test.rb +0 -11
  148. data/test/block_test.rb +0 -58
  149. data/test/capture_test.rb +0 -41
  150. data/test/condition_test.rb +0 -115
  151. data/test/content_for_test.rb +0 -15
  152. data/test/context_test.rb +0 -479
  153. data/test/drop_test.rb +0 -162
  154. data/test/error_handling_test.rb +0 -89
  155. data/test/extra/breakpoint.rb +0 -547
  156. data/test/extra/caller.rb +0 -80
  157. data/test/file_system_test.rb +0 -30
  158. data/test/filter_test.rb +0 -147
  159. data/test/helper.rb +0 -24
  160. data/test/html_tag_test.rb +0 -31
  161. data/test/if_else_test.rb +0 -139
  162. data/test/include_tag_test.rb +0 -129
  163. data/test/module_ex_test.rb +0 -89
  164. data/test/output_test.rb +0 -121
  165. data/test/parsing_quirks_test.rb +0 -54
  166. data/test/regexp_test.rb +0 -45
  167. data/test/security_test.rb +0 -41
  168. data/test/standard_filter_test.rb +0 -170
  169. data/test/standard_tag_test.rb +0 -405
  170. data/test/statements_test.rb +0 -137
  171. data/test/strainer_test.rb +0 -27
  172. data/test/template_test.rb +0 -82
  173. data/test/test_helper.rb +0 -28
  174. data/test/unless_else_test.rb +0 -27
  175. data/test/variable_test.rb +0 -173
  176. data/test/yield_test.rb +0 -24
@@ -0,0 +1,74 @@
1
+ require "spec_helper"
2
+
3
+ describe Liquor::Partials do
4
+ it "should provide content_for and yield" do
5
+ exec(%Q|
6
+ {% yield "test" %}
7
+ 1
8
+ {% content_for "test" capture: %}
9
+ data
10
+ {% end content_for %}
11
+ 2
12
+ {% yield "test" %}
13
+ {% yield "test" %}
14
+ |).scan(/\w+/).should == %w(1 2 data data)
15
+ end
16
+
17
+ it "should have working include" do
18
+ manager = Liquor::Manager.new
19
+ manager.register_template 'layout', '1 {% assign x = 2 %}{% include "action" %} 3'
20
+ manager.register_partial '_action', '{{ x }}'
21
+ manager.compile.should be_true
22
+ manager.render('layout').should == '1 2 3'
23
+ end
24
+
25
+ it "should create a scope" do
26
+ manager = Liquor::Manager.new
27
+ manager.register_template 'layout', '1 {% declare x = 2 %}{% include "action" %} 3 {{ x }}'
28
+ manager.register_partial '_action', '{% declare x = "G" %}{{ x }}'
29
+ manager.compile.should be_true
30
+ manager.render('layout').should == '1 G 3 2'
31
+ end
32
+
33
+ it "should report errors in partials in partials" do
34
+ manager = Liquor::Manager.new
35
+ manager.register_template 'layout', '{% assign x = 2 %} {% include "action" %}'
36
+ manager.register_partial '_action', '{{ y }}'
37
+
38
+ manager.compile.should be_false
39
+
40
+ manager.errors.count.should == 1
41
+ manager.errors.first.should be_a Liquor::NameError
42
+ manager.errors.first.message.should =~ %r|identifier `y' is not bound at `_action'|
43
+ end
44
+
45
+ it "should not say that a partial with a syntax error does not exist" do
46
+ manager = Liquor::Manager.new
47
+ manager.register_template 'layout', '{% assign x = 2 %} {% include "action" %}'
48
+ manager.register_partial '_action', '{{ y '
49
+
50
+ manager.compile.should be_false
51
+
52
+ manager.errors.count.should == 1
53
+ manager.errors.first.should be_a Liquor::SyntaxError
54
+ end
55
+
56
+ it "should handle yield with defaults" do
57
+ exec(%Q|
58
+ {% content_for "test" capture: %}captured{% end content_for %}
59
+ {% yield "test" if_none: %}default{% end yield %}
60
+ |).strip.should == 'captured'
61
+
62
+ exec(%Q|
63
+ {% yield "test" if_none: %}default{% end yield %}
64
+ |).strip.should == 'default'
65
+ end
66
+
67
+ it "should handle {% capture var yield: 'name' %}" do
68
+ exec(%Q|
69
+ {% content_for "frag" capture: %}captured{% end content_for %}
70
+ {% capture foo yield: "frag" %}
71
+ {{ foo }}{{ foo }}
72
+ |).strip.should == 'capturedcaptured'
73
+ end
74
+ end
@@ -0,0 +1,97 @@
1
+ require 'spec_helper'
2
+
3
+ describe Liquor::Runtime do
4
+ def capture_diagnostics
5
+ Liquor::Runtime.capture_diagnostics do
6
+ yield
7
+ end
8
+ end
9
+
10
+ def check_with_diagnostic(code, error_patterns, result)
11
+ code, locals = *code
12
+ actual_errors = Liquor::Runtime.capture_diagnostics do
13
+ exec(code, locals || {}).should == result
14
+ end
15
+
16
+ actual_errors.count.should eq error_patterns.count
17
+ error_patterns.zip(actual_errors).each do |(error_pattern, actual_error)|
18
+ actual_error.message.should =~ error_pattern
19
+ end
20
+ end
21
+
22
+ it "should report correct errors and substitutions for {{}}" do
23
+ capture_diagnostics { Liquor::Runtime.interp!([], {}).should == "" }
24
+ check_with_diagnostic('a{{ [] }}b', [ %r|String or Null value expected, Tuple found| ], 'ab')
25
+ end
26
+
27
+ it "should report correct errors and substitutions for a.b" do
28
+ capture_diagnostics { Liquor::Runtime.external!(1, {}).should be_a Liquor::Runtime::DummyExternal }
29
+ check_with_diagnostic('a{{ [].b.c }}b', [
30
+ %r|External value expected, Tuple found|,
31
+ %r|External value expected, Null found|,
32
+ ], 'ab')
33
+ end
34
+
35
+ it "should report correct errors and substitutions for a[b]" do
36
+ capture_diagnostics { Liquor::Runtime.tuple!(1, {}).should == [] }
37
+ check_with_diagnostic('a{{ (1)[2] }}b', [
38
+ %r|Tuple or indexable External value expected, Integer found|,
39
+ ], 'ab')
40
+ end
41
+
42
+ it "should report correct errors and substitutions for +" do
43
+ capture_diagnostics { Liquor::Runtime.integer!("", {}).should == 0 }
44
+ capture_diagnostics { Liquor::Runtime.string!([], {}).should == "" }
45
+ check_with_diagnostic('a{{ 1 + "" }}b', [
46
+ %r|Integer value expected, String found|,
47
+ ], 'a1b')
48
+ check_with_diagnostic('a{{ "qq" + [] }}b', [
49
+ %r|String value expected, Tuple found|,
50
+ ], 'aqqb')
51
+ check_with_diagnostic('a{{ join([1,"test"] + "asd") }}b', [
52
+ %r|Tuple or indexable External value expected, String found|,
53
+ ], 'a1 testb')
54
+ end
55
+
56
+ it "should report type errors for functions and continue" do
57
+ check_with_diagnostic('a{{ join("a" with: "q") }}b', [
58
+ %r|Tuple value expected, String found|
59
+ ], 'ab')
60
+ check_with_diagnostic('a{{ to_number(true) }}b', [
61
+ %r|Integer, String value expected, Boolean found|
62
+ ], 'a0b')
63
+ end
64
+
65
+ describe "with deprecations" do
66
+ before do
67
+ @klass = Class.new do
68
+ include Liquor::External
69
+
70
+ def foo
71
+ 1
72
+ end
73
+ export :foo
74
+ deprecate :foo, date: '2013-03-04', message: 'not available'
75
+ end
76
+ end
77
+
78
+ it "does not treat deprecation as fatal" do
79
+ exec('{{ bar.foo }}', bar: @klass.new).
80
+ should == '1'
81
+ end
82
+
83
+ it "reports deprecations" do
84
+ check_with_diagnostic([ '{{ bar.foo }}', { bar: @klass.new }], [
85
+ %r|`foo' is deprecated and will be removed after 2013-03-04: not available|
86
+ ], '1')
87
+ end
88
+
89
+ it "allows to make deprecations fatal" do
90
+ expect {
91
+ Liquor::Runtime.with_fatal_deprecations do
92
+ exec '{{ bar.foo }}', bar: @klass.new
93
+ end
94
+ }.to raise_error(Liquor::Deprecation)
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,94 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper.rb"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+
8
+ require 'simplecov'
9
+
10
+ SimpleCov.start do
11
+ add_filter "/spec/"
12
+ end
13
+
14
+ require 'liquor'
15
+ require 'digest/md5'
16
+
17
+ module LiquorSpecHelpers
18
+ def lex(string, tags={})
19
+ Liquor::Lexer.lex(string, '(code)', tags)
20
+ end
21
+
22
+ def parse(string, compiler=nil)
23
+ if compiler
24
+ parser = Liquor::Parser.new(compiler.tags)
25
+ else
26
+ parser = Liquor::Parser.new
27
+ end
28
+
29
+ if parser.parse string
30
+ parser.ast
31
+ elsif parser.errors.count == 1
32
+ raise parser.errors.first
33
+ else
34
+ raise Exception, "more than one error"
35
+ end
36
+ end
37
+
38
+ def compile(string, externals=[])
39
+ compiler = Liquor::Compiler.new
40
+ compiler.compile! parse(string, compiler), externals
41
+ end
42
+
43
+ def exec(string, env={})
44
+ compile(string, env.keys).call(env)
45
+ end
46
+
47
+ def check_exec(string, env={})
48
+ compiler = Liquor::Compiler.new
49
+ compiler.compile! parse(string, compiler), env.keys
50
+ $stderr.puts compiler.source
51
+ compiler.code.call(env)
52
+ end
53
+ end
54
+
55
+ RSpec.configure do |config|
56
+ config.include LiquorSpecHelpers
57
+ config.filter_run focus: true
58
+ config.run_all_when_everything_filtered = true
59
+ end
60
+
61
+ RSpec::Matchers.define :have_token_structure do |*expected|
62
+ match do |actual|
63
+ expected.zip(actual).all? do |tok_expected, tok_actual|
64
+ expected_type, expected_value = *tok_expected
65
+ actual_type, actual_pos, actual_value = *tok_actual
66
+
67
+ expected_type == actual_type &&
68
+ (expected_value.nil? || expected_value == actual_value)
69
+ end
70
+ end
71
+ end
72
+
73
+ RSpec::Matchers.define :have_node_structure do |*expected|
74
+ to_structure = ->(tree) {
75
+ if tree.is_a?(Array)
76
+ if tree[0].is_a?(Symbol)
77
+ [ tree[0], *tree[2..-1].map(&to_structure) ]
78
+ else
79
+ tree.map(&to_structure)
80
+ end
81
+ elsif tree.is_a?(Hash)
82
+ tree = tree.dup
83
+ tree.each do |k, v|
84
+ tree[k] = to_structure.(v)
85
+ end
86
+ else
87
+ tree
88
+ end
89
+ }
90
+
91
+ match do |actual|
92
+ actual.map(&to_structure) == expected
93
+ end
94
+ end
@@ -0,0 +1,7 @@
1
+ require "spec_helper"
2
+
3
+ describe Liquor::Tag do
4
+ it "requires a body" do
5
+ expect { Liquor::Tag.new("hello") }.to raise_error
6
+ end
7
+ end
metadata CHANGED
@@ -1,219 +1,262 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.9.1
6
5
  platform: ruby
7
6
  authors:
8
- - Timothy N. Tsvetkov
7
+ - Peter Zotov
8
+ - Nate Gadgibalaev
9
9
  - Yaroslav Markin
10
- - Ivan Evtukhovich
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2012-05-10 00:00:00.000000000 Z
13
+ date: 2013-12-17 00:00:00.000000000 Z
15
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - '>='
27
+ - !ruby/object:Gem::Version
28
+ version: '0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: racc
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: kramdown
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rspec
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: simplecov
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: guard-rspec
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
16
99
  - !ruby/object:Gem::Dependency
17
100
  name: rails
18
- requirement: &70145564706620 !ruby/object:Gem::Requirement
19
- none: false
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ - !ruby/object:Gem::Dependency
114
+ name: nokogiri
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ - !ruby/object:Gem::Dependency
128
+ name: htmlentities
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - '>='
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ - !ruby/object:Gem::Dependency
142
+ name: sqlite3
143
+ requirement: !ruby/object:Gem::Requirement
20
144
  requirements:
21
- - - ~>
145
+ - - '>='
22
146
  - !ruby/object:Gem::Version
23
- version: 3.2.0
24
- type: :runtime
147
+ version: '0'
148
+ type: :development
25
149
  prerelease: false
26
- version_requirements: *70145564706620
27
- description: Liquor is a safe (not evaling) template language based on Liquid template
28
- language
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ description: Liquor is a template system based on well-defined, strongly dynamically
156
+ typed language which is fun to use and easy to debug.
29
157
  email:
30
- - timothy.tsvetkov@gmail.com
158
+ - whitequark@whitequark.org
159
+ - nat@xnsv.ru
160
+ - yaroslav@markin.net
31
161
  executables: []
32
162
  extensions: []
33
163
  extra_rdoc_files: []
34
164
  files:
165
+ - .gitignore
166
+ - .rspec
35
167
  - .travis.yml
36
- - AUTHORS
37
- - CHANGELOG
38
168
  - Gemfile
39
- - Gemfile.lock
40
- - History.txt
41
- - LICENSE
169
+ - Guardfile
42
170
  - MIT-LICENSE
43
171
  - README.md
44
172
  - Rakefile
45
- - example/server/example_servlet.rb
46
- - example/server/liquid_servlet.rb
47
- - example/server/liquor_servlet.rb
48
- - example/server/server.rb
49
- - example/server/templates/index.liquid
50
- - example/server/templates/index.liquor
51
- - example/server/templates/products.liquid
52
- - example/server/templates/products.liquor
53
- - init.rb
54
- - lib/extras/liquid_view.rb
55
- - lib/extras/liquor_view.rb
173
+ - doc/language-spec.html
174
+ - doc/language-spec.md
56
175
  - lib/liquor.rb
57
- - lib/liquor/block.rb
58
- - lib/liquor/condition.rb
176
+ - lib/liquor/ast_tools.rb
177
+ - lib/liquor/compiler.rb
59
178
  - lib/liquor/context.rb
60
- - lib/liquor/document.rb
61
- - lib/liquor/drop.rb
62
- - lib/liquor/errors.rb
63
- - lib/liquor/extensions.rb
64
- - lib/liquor/file_system.rb
65
- - lib/liquor/htmltags.rb
66
- - lib/liquor/module_ex.rb
67
- - lib/liquor/standardfilters.rb
68
- - lib/liquor/strainer.rb
179
+ - lib/liquor/diagnostics.rb
180
+ - lib/liquor/drop/drop.rb
181
+ - lib/liquor/drop/drop_delegation.rb
182
+ - lib/liquor/drop/drop_scope.rb
183
+ - lib/liquor/drop/dropable.rb
184
+ - lib/liquor/emitter.rb
185
+ - lib/liquor/extensions/kaminari.rb
186
+ - lib/liquor/extensions/pagination.rb
187
+ - lib/liquor/extensions/rails.rb
188
+ - lib/liquor/extensions/thinking_sphinx.rb
189
+ - lib/liquor/extensions/tire.rb
190
+ - lib/liquor/external.rb
191
+ - lib/liquor/function.rb
192
+ - lib/liquor/grammar/lexer.rb
193
+ - lib/liquor/grammar/lexer.rl
194
+ - lib/liquor/grammar/parser.racc
195
+ - lib/liquor/grammar/parser.rb
196
+ - lib/liquor/library.rb
197
+ - lib/liquor/manager.rb
198
+ - lib/liquor/runtime.rb
199
+ - lib/liquor/stdlib/builtin_functions.rb
200
+ - lib/liquor/stdlib/builtin_tags.rb
201
+ - lib/liquor/stdlib/html_truncater.rb
202
+ - lib/liquor/stdlib/partial_tags.rb
69
203
  - lib/liquor/tag.rb
70
- - lib/liquor/tags/assign.rb
71
- - lib/liquor/tags/capture.rb
72
- - lib/liquor/tags/case.rb
73
- - lib/liquor/tags/comment.rb
74
- - lib/liquor/tags/content_for.rb
75
- - lib/liquor/tags/cycle.rb
76
- - lib/liquor/tags/for.rb
77
- - lib/liquor/tags/if.rb
78
- - lib/liquor/tags/ifchanged.rb
79
- - lib/liquor/tags/include.rb
80
- - lib/liquor/tags/unless.rb
81
- - lib/liquor/tags/yield.rb
82
- - lib/liquor/template.rb
83
- - lib/liquor/variable.rb
84
204
  - lib/liquor/version.rb
85
205
  - liquor.gemspec
86
- - performance/shopify.rb
87
- - performance/shopify/comment_form.rb
88
- - performance/shopify/database.rb
89
- - performance/shopify/json_filter.rb
90
- - performance/shopify/liquid.rb
91
- - performance/shopify/liquor.rb
92
- - performance/shopify/money_filter.rb
93
- - performance/shopify/paginate.rb
94
- - performance/shopify/shop_filter.rb
95
- - performance/shopify/tag_filter.rb
96
- - performance/shopify/vision.database.yml
97
- - performance/shopify/weight_filter.rb
98
- - performance/tests/dropify/article.liquid
99
- - performance/tests/dropify/blog.liquid
100
- - performance/tests/dropify/cart.liquid
101
- - performance/tests/dropify/collection.liquid
102
- - performance/tests/dropify/index.liquid
103
- - performance/tests/dropify/page.liquid
104
- - performance/tests/dropify/product.liquid
105
- - performance/tests/dropify/theme.liquid
106
- - performance/tests/ripen/article.liquid
107
- - performance/tests/ripen/blog.liquid
108
- - performance/tests/ripen/cart.liquid
109
- - performance/tests/ripen/collection.liquid
110
- - performance/tests/ripen/index.liquid
111
- - performance/tests/ripen/page.liquid
112
- - performance/tests/ripen/product.liquid
113
- - performance/tests/ripen/theme.liquid
114
- - performance/tests/tribble/404.liquid
115
- - performance/tests/tribble/article.liquid
116
- - performance/tests/tribble/blog.liquid
117
- - performance/tests/tribble/cart.liquid
118
- - performance/tests/tribble/collection.liquid
119
- - performance/tests/tribble/index.liquid
120
- - performance/tests/tribble/page.liquid
121
- - performance/tests/tribble/product.liquid
122
- - performance/tests/tribble/search.liquid
123
- - performance/tests/tribble/theme.liquid
124
- - performance/tests/vogue/article.liquid
125
- - performance/tests/vogue/blog.liquid
126
- - performance/tests/vogue/cart.liquid
127
- - performance/tests/vogue/collection.liquid
128
- - performance/tests/vogue/index.liquid
129
- - performance/tests/vogue/page.liquid
130
- - performance/tests/vogue/product.liquid
131
- - performance/tests/vogue/theme.liquid
132
- - test/assign_test.rb
133
- - test/block_test.rb
134
- - test/capture_test.rb
135
- - test/condition_test.rb
136
- - test/content_for_test.rb
137
- - test/context_test.rb
138
- - test/drop_test.rb
139
- - test/error_handling_test.rb
140
- - test/extra/breakpoint.rb
141
- - test/extra/caller.rb
142
- - test/file_system_test.rb
143
- - test/filter_test.rb
144
- - test/helper.rb
145
- - test/html_tag_test.rb
146
- - test/if_else_test.rb
147
- - test/include_tag_test.rb
148
- - test/module_ex_test.rb
149
- - test/output_test.rb
150
- - test/parsing_quirks_test.rb
151
- - test/regexp_test.rb
152
- - test/security_test.rb
153
- - test/standard_filter_test.rb
154
- - test/standard_tag_test.rb
155
- - test/statements_test.rb
156
- - test/strainer_test.rb
157
- - test/template_test.rb
158
- - test/test_helper.rb
159
- - test/unless_else_test.rb
160
- - test/variable_test.rb
161
- - test/yield_test.rb
162
- homepage: https://github.com/evilmartians/liquor
206
+ - spec/builtins_spec.rb
207
+ - spec/compiler_spec.rb
208
+ - spec/context_spec.rb
209
+ - spec/drop_delegation_spec.rb
210
+ - spec/drop_spec.rb
211
+ - spec/errors_spec.rb
212
+ - spec/external_spec.rb
213
+ - spec/function_spec.rb
214
+ - spec/lexer_spec.rb
215
+ - spec/library_spec.rb
216
+ - spec/manager_spec.rb
217
+ - spec/parser_spec.rb
218
+ - spec/partials_spec.rb
219
+ - spec/runtime_spec.rb
220
+ - spec/spec_helper.rb
221
+ - spec/tag_spec.rb
222
+ homepage: http://github.com/evilmartians/liquor
163
223
  licenses: []
224
+ metadata: {}
164
225
  post_install_message:
165
226
  rdoc_options: []
166
227
  require_paths:
167
228
  - lib
168
229
  required_ruby_version: !ruby/object:Gem::Requirement
169
- none: false
170
230
  requirements:
171
- - - ! '>='
231
+ - - '>='
172
232
  - !ruby/object:Gem::Version
173
- version: '0'
233
+ version: '1.9'
174
234
  required_rubygems_version: !ruby/object:Gem::Requirement
175
- none: false
176
235
  requirements:
177
- - - ! '>='
236
+ - - '>='
178
237
  - !ruby/object:Gem::Version
179
238
  version: '0'
180
239
  requirements: []
181
240
  rubyforge_project:
182
- rubygems_version: 1.8.17
241
+ rubygems_version: 2.0.0
183
242
  signing_key:
184
- specification_version: 3
185
- summary: Liquor is a safe (not evaling) template language based on Liquid template
186
- language. Safe means that templates cannot affect security of the server they are
187
- rendered on. So it is usable when you need to give an ability to edit templates
188
- to your users (HTML or email).
243
+ specification_version: 4
244
+ summary: Liquor is a template system based on well-defined, strongly dynamically typed
245
+ language which is fun to use and easy to debug.
189
246
  test_files:
190
- - test/assign_test.rb
191
- - test/block_test.rb
192
- - test/capture_test.rb
193
- - test/condition_test.rb
194
- - test/content_for_test.rb
195
- - test/context_test.rb
196
- - test/drop_test.rb
197
- - test/error_handling_test.rb
198
- - test/extra/breakpoint.rb
199
- - test/extra/caller.rb
200
- - test/file_system_test.rb
201
- - test/filter_test.rb
202
- - test/helper.rb
203
- - test/html_tag_test.rb
204
- - test/if_else_test.rb
205
- - test/include_tag_test.rb
206
- - test/module_ex_test.rb
207
- - test/output_test.rb
208
- - test/parsing_quirks_test.rb
209
- - test/regexp_test.rb
210
- - test/security_test.rb
211
- - test/standard_filter_test.rb
212
- - test/standard_tag_test.rb
213
- - test/statements_test.rb
214
- - test/strainer_test.rb
215
- - test/template_test.rb
216
- - test/test_helper.rb
217
- - test/unless_else_test.rb
218
- - test/variable_test.rb
219
- - test/yield_test.rb
247
+ - spec/builtins_spec.rb
248
+ - spec/compiler_spec.rb
249
+ - spec/context_spec.rb
250
+ - spec/drop_delegation_spec.rb
251
+ - spec/drop_spec.rb
252
+ - spec/errors_spec.rb
253
+ - spec/external_spec.rb
254
+ - spec/function_spec.rb
255
+ - spec/lexer_spec.rb
256
+ - spec/library_spec.rb
257
+ - spec/manager_spec.rb
258
+ - spec/parser_spec.rb
259
+ - spec/partials_spec.rb
260
+ - spec/runtime_spec.rb
261
+ - spec/spec_helper.rb
262
+ - spec/tag_spec.rb