hamlit 2.9.5-java → 2.13.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +17 -11
- data/CHANGELOG.md +52 -0
- data/Gemfile +2 -8
- data/LICENSE.txt +26 -23
- data/REFERENCE.md +13 -4
- data/benchmark/dynamic_merger/benchmark.rb +25 -0
- data/benchmark/dynamic_merger/hello.haml +50 -0
- data/benchmark/dynamic_merger/hello.string +50 -0
- data/bin/bench +3 -3
- data/bin/update-haml +125 -0
- data/ext/hamlit/hamlit.c +0 -1
- data/hamlit.gemspec +3 -1
- data/lib/hamlit/attribute_builder.rb +2 -2
- data/lib/hamlit/attribute_compiler.rb +3 -3
- data/lib/hamlit/compiler/children_compiler.rb +18 -4
- data/lib/hamlit/compiler/comment_compiler.rb +8 -5
- data/lib/hamlit/compiler/tag_compiler.rb +0 -4
- data/lib/hamlit/dynamic_merger.rb +67 -0
- data/lib/hamlit/engine.rb +5 -6
- data/lib/hamlit/filters/escaped.rb +1 -1
- data/lib/hamlit/filters/markdown.rb +1 -0
- data/lib/hamlit/filters/plain.rb +0 -4
- data/lib/hamlit/filters/preserve.rb +1 -1
- data/lib/hamlit/filters/text_base.rb +1 -1
- data/lib/hamlit/filters/tilt_base.rb +1 -1
- data/lib/hamlit/html.rb +8 -0
- data/lib/hamlit/parser.rb +6 -2
- data/lib/hamlit/parser/haml_attribute_builder.rb +164 -0
- data/lib/hamlit/parser/haml_buffer.rb +20 -130
- data/lib/hamlit/parser/haml_compiler.rb +1 -553
- data/lib/hamlit/parser/haml_error.rb +29 -25
- data/lib/hamlit/parser/haml_escapable.rb +1 -0
- data/lib/hamlit/parser/haml_generator.rb +1 -0
- data/lib/hamlit/parser/haml_helpers.rb +41 -59
- data/lib/hamlit/parser/{haml_xss_mods.rb → haml_helpers/xss_mods.rb} +20 -15
- data/lib/hamlit/parser/haml_options.rb +53 -66
- data/lib/hamlit/parser/haml_parser.rb +103 -71
- data/lib/hamlit/parser/haml_temple_engine.rb +123 -0
- data/lib/hamlit/parser/haml_util.rb +10 -40
- data/lib/hamlit/rails_template.rb +1 -1
- data/lib/hamlit/string_splitter.rb +10 -78
- data/lib/hamlit/template.rb +1 -1
- data/lib/hamlit/temple_line_counter.rb +31 -0
- data/lib/hamlit/version.rb +1 -1
- metadata +58 -24
- data/lib/hamlit/hamlit.su +0 -0
- data/lib/hamlit/parser/MIT-LICENSE +0 -20
- data/lib/hamlit/parser/README.md +0 -30
@@ -0,0 +1,123 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'temple'
|
4
|
+
require 'hamlit/parser/haml_escapable'
|
5
|
+
require 'hamlit/parser/haml_generator'
|
6
|
+
|
7
|
+
module Hamlit
|
8
|
+
class HamlTempleEngine < Temple::Engine
|
9
|
+
define_options(
|
10
|
+
attr_wrapper: "'",
|
11
|
+
autoclose: %w(area base basefont br col command embed frame
|
12
|
+
hr img input isindex keygen link menuitem meta
|
13
|
+
param source track wbr),
|
14
|
+
encoding: nil,
|
15
|
+
escape_attrs: true,
|
16
|
+
escape_html: false,
|
17
|
+
escape_filter_interpolations: nil,
|
18
|
+
filename: '(haml)',
|
19
|
+
format: :html5,
|
20
|
+
hyphenate_data_attrs: true,
|
21
|
+
line: 1,
|
22
|
+
mime_type: 'text/html',
|
23
|
+
preserve: %w(textarea pre code),
|
24
|
+
remove_whitespace: false,
|
25
|
+
suppress_eval: false,
|
26
|
+
cdata: false,
|
27
|
+
parser_class: ::Hamlit::HamlParser,
|
28
|
+
compiler_class: ::Hamlit::HamlCompiler,
|
29
|
+
trace: false,
|
30
|
+
filters: {},
|
31
|
+
)
|
32
|
+
|
33
|
+
use :Parser, -> { options[:parser_class] }
|
34
|
+
use :Compiler, -> { options[:compiler_class] }
|
35
|
+
use HamlEscapable
|
36
|
+
filter :ControlFlow
|
37
|
+
filter :MultiFlattener
|
38
|
+
filter :StaticMerger
|
39
|
+
use HamlGenerator
|
40
|
+
|
41
|
+
def compile(template)
|
42
|
+
initialize_encoding(template, options[:encoding])
|
43
|
+
@precompiled = call(template)
|
44
|
+
end
|
45
|
+
|
46
|
+
# The source code that is evaluated to produce the Haml document.
|
47
|
+
#
|
48
|
+
# This is automatically converted to the correct encoding
|
49
|
+
# (see {file:REFERENCE.md#encodings the `:encoding` option}).
|
50
|
+
#
|
51
|
+
# @return [String]
|
52
|
+
def precompiled
|
53
|
+
encoding = Encoding.find(@encoding || '')
|
54
|
+
return @precompiled.dup.force_encoding(encoding) if encoding == Encoding::ASCII_8BIT
|
55
|
+
return @precompiled.encode(encoding)
|
56
|
+
end
|
57
|
+
|
58
|
+
def precompiled_with_return_value
|
59
|
+
"#{precompiled};#{precompiled_method_return_value}".dup
|
60
|
+
end
|
61
|
+
|
62
|
+
# The source code that is evaluated to produce the Haml document.
|
63
|
+
#
|
64
|
+
# This is automatically converted to the correct encoding
|
65
|
+
# (see {file:REFERENCE.md#encodings the `:encoding` option}).
|
66
|
+
#
|
67
|
+
# @return [String]
|
68
|
+
def precompiled_with_ambles(local_names, after_preamble: '')
|
69
|
+
preamble = <<END.tr("\n", ';')
|
70
|
+
begin
|
71
|
+
extend Hamlit::HamlHelpers
|
72
|
+
_hamlout = @haml_buffer = Hamlit::HamlBuffer.new(haml_buffer, #{HamlOptions.new(options).for_buffer.inspect})
|
73
|
+
_erbout = _hamlout.buffer
|
74
|
+
#{after_preamble}
|
75
|
+
END
|
76
|
+
postamble = <<END.tr("\n", ';')
|
77
|
+
#{precompiled_method_return_value}
|
78
|
+
ensure
|
79
|
+
@haml_buffer = @haml_buffer.upper if @haml_buffer
|
80
|
+
end
|
81
|
+
END
|
82
|
+
"#{preamble}#{locals_code(local_names)}#{precompiled}#{postamble}".dup
|
83
|
+
end
|
84
|
+
|
85
|
+
private
|
86
|
+
|
87
|
+
def initialize_encoding(template, given_value)
|
88
|
+
if given_value
|
89
|
+
@encoding = given_value
|
90
|
+
else
|
91
|
+
@encoding = Encoding.default_internal || template.encoding
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Returns the string used as the return value of the precompiled method.
|
96
|
+
# This method exists so it can be monkeypatched to return modified values.
|
97
|
+
def precompiled_method_return_value
|
98
|
+
"_erbout"
|
99
|
+
end
|
100
|
+
|
101
|
+
def locals_code(names)
|
102
|
+
names = names.keys if Hash === names
|
103
|
+
|
104
|
+
names.map do |name|
|
105
|
+
# Can't use || because someone might explicitly pass in false with a symbol
|
106
|
+
sym_local = "_haml_locals[#{inspect_obj(name.to_sym)}]"
|
107
|
+
str_local = "_haml_locals[#{inspect_obj(name.to_s)}]"
|
108
|
+
"#{name} = #{sym_local}.nil? ? #{str_local} : #{sym_local};"
|
109
|
+
end.join
|
110
|
+
end
|
111
|
+
|
112
|
+
def inspect_obj(obj)
|
113
|
+
case obj
|
114
|
+
when String
|
115
|
+
%Q!"#{obj.gsub(/[\x00-\x7F]+/) {|s| s.inspect[1...-1]}}"!
|
116
|
+
when Symbol
|
117
|
+
":#{inspect_obj(obj.to_s)}"
|
118
|
+
else
|
119
|
+
obj.inspect
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
begin
|
4
4
|
require 'erubis/tiny'
|
@@ -126,7 +126,7 @@ MSG
|
|
126
126
|
def inspect_obj(obj)
|
127
127
|
case obj
|
128
128
|
when String
|
129
|
-
%Q!"#{obj.gsub(/[\x00-\x7F]+/) {|s| s.
|
129
|
+
%Q!"#{obj.gsub(/[\x00-\x7F]+/) {|s| s.dump[1...-1]}}"!
|
130
130
|
when Symbol
|
131
131
|
":#{inspect_obj(obj.to_s)}"
|
132
132
|
else
|
@@ -166,7 +166,7 @@ MSG
|
|
166
166
|
# and the rest of the string.
|
167
167
|
# `["Foo (Bar (Baz bang) bop)", " (Bang (bop bip))"]` in the example above.
|
168
168
|
def balance(scanner, start, finish, count = 0)
|
169
|
-
str = ''
|
169
|
+
str = ''.dup
|
170
170
|
scanner = StringScanner.new(scanner) unless scanner.is_a? StringScanner
|
171
171
|
regexp = Regexp.new("(.*?)[\\#{start.chr}\\#{finish.chr}]", Regexp::MULTILINE)
|
172
172
|
while scanner.scan(regexp)
|
@@ -198,12 +198,9 @@ MSG
|
|
198
198
|
/#[\{$@]/ === str
|
199
199
|
end
|
200
200
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
def slow_unescape_interpolation(str, escape_html = nil)
|
205
|
-
res = ''
|
206
|
-
rest = ::Hamlit::HamlUtil.handle_interpolation str.dump do |scan|
|
201
|
+
def unescape_interpolation(str, escape_html = nil)
|
202
|
+
res = ''.dup
|
203
|
+
rest = Hamlit::HamlUtil.handle_interpolation str.dump do |scan|
|
207
204
|
escapes = (scan[2].size - 1) / 2
|
208
205
|
char = scan[3] # '{', '@' or '$'
|
209
206
|
res << scan.matched[0...-3 - escapes]
|
@@ -215,36 +212,9 @@ MSG
|
|
215
212
|
else
|
216
213
|
scan.scan(/\w+/)
|
217
214
|
end
|
218
|
-
content = eval(
|
219
|
-
content
|
220
|
-
content = "
|
221
|
-
|
222
|
-
res << "\#{#{content}}"
|
223
|
-
end
|
224
|
-
end
|
225
|
-
res + rest
|
226
|
-
end
|
227
|
-
|
228
|
-
# Customized Haml::Util.unescape_interpolation to handle escape by Hamlit.
|
229
|
-
# It wraps double quotes to given `str` with escaping `"`.
|
230
|
-
#
|
231
|
-
# ex) unescape_interpolation('foo#{bar}baz"') #=> "\"foo\#{bar}baz\\\"\""
|
232
|
-
def unescape_interpolation(str)
|
233
|
-
res = ''
|
234
|
-
rest = ::Hamlit::HamlUtil.handle_interpolation str.dump do |scan|
|
235
|
-
escapes = (scan[2].size - 1) / 2
|
236
|
-
char = scan[3] # '{', '@' or '$'
|
237
|
-
res << scan.matched[0...-3 - escapes]
|
238
|
-
if escapes % 2 == 1
|
239
|
-
res << "\##{char}"
|
240
|
-
else
|
241
|
-
interpolated = if char == '{'
|
242
|
-
balance(scan, ?{, ?}, 1)[0][0...-1]
|
243
|
-
else
|
244
|
-
scan.scan(/\w+/)
|
245
|
-
end
|
246
|
-
content = eval('"' + interpolated + '"')
|
247
|
-
content.prepend(char) if char == '@' || char == '$'
|
215
|
+
content = eval("\"#{interpolated}\"")
|
216
|
+
content = "#{char}#{content}" if char == '@' || char == '$'
|
217
|
+
content = "Hamlit::HamlHelpers.html_escape((#{content}))" if escape_html
|
248
218
|
|
249
219
|
res << "\#{#{content}}"
|
250
220
|
end
|
@@ -264,7 +234,7 @@ MSG
|
|
264
234
|
scanner = StringScanner.new(str.dup.force_encoding(Encoding::ASCII_8BIT))
|
265
235
|
bom = scanner.scan(/\xEF\xBB\xBF/n)
|
266
236
|
return bom unless scanner.scan(/-\s*#\s*/n)
|
267
|
-
if coding = try_parse_haml_emacs_magic_comment(scanner)
|
237
|
+
if (coding = try_parse_haml_emacs_magic_comment(scanner))
|
268
238
|
return bom, coding
|
269
239
|
end
|
270
240
|
|
@@ -1,88 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'ripper'
|
2
3
|
require 'hamlit/ruby_expression'
|
3
4
|
|
4
5
|
module Hamlit
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
[]
|
10
|
-
tokens = Ripper.lex(code.strip)
|
11
|
-
tokens.pop while tokens.last && %i[on_comment on_sp].include?(tokens.last[1])
|
12
|
-
|
13
|
-
if tokens.size < 2
|
14
|
-
raise Hamlit::InternalError.new("Expected token size >= 2 but got: #{tokens.size}")
|
15
|
-
end
|
16
|
-
compile_tokens!(exps, tokens)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def strip_quotes!(tokens)
|
23
|
-
_, type, beg_str = tokens.shift
|
24
|
-
if type != :on_tstring_beg
|
25
|
-
raise Hamlit::InternalError.new("Expected :on_tstring_beg but got: #{type}")
|
26
|
-
end
|
27
|
-
|
28
|
-
_, type, end_str = tokens.pop
|
29
|
-
if type != :on_tstring_end
|
30
|
-
raise Hamlit::InternalError.new("Expected :on_tstring_end but got: #{type}")
|
31
|
-
end
|
32
|
-
|
33
|
-
[beg_str, end_str]
|
34
|
-
end
|
35
|
-
|
36
|
-
def compile_tokens!(exps, tokens)
|
37
|
-
beg_str, end_str = strip_quotes!(tokens)
|
38
|
-
|
39
|
-
until tokens.empty?
|
40
|
-
_, type, str = tokens.shift
|
41
|
-
|
42
|
-
case type
|
43
|
-
when :on_tstring_content
|
44
|
-
exps << [:static, eval("#{beg_str}#{str}#{end_str}")]
|
45
|
-
when :on_embexpr_beg
|
46
|
-
embedded = shift_balanced_embexpr(tokens)
|
47
|
-
exps << [:dynamic, embedded] unless embedded.empty?
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def shift_balanced_embexpr(tokens)
|
53
|
-
String.new.tap do |embedded|
|
54
|
-
embexpr_open = 1
|
55
|
-
|
56
|
-
until tokens.empty?
|
57
|
-
_, type, str = tokens.shift
|
58
|
-
case type
|
59
|
-
when :on_embexpr_beg
|
60
|
-
embexpr_open += 1
|
61
|
-
when :on_embexpr_end
|
62
|
-
embexpr_open -= 1
|
63
|
-
break if embexpr_open == 0
|
64
|
-
end
|
65
|
-
|
66
|
-
embedded << str
|
67
|
-
end
|
68
|
-
end
|
6
|
+
module StringSplitter
|
7
|
+
# `code` param must be valid string literal
|
8
|
+
def self.compile(code)
|
9
|
+
unless Ripper.respond_to?(:lex) # truffleruby doesn't have Ripper.lex
|
10
|
+
return [[:dynamic, code]]
|
69
11
|
end
|
70
|
-
end
|
71
|
-
|
72
|
-
def on_dynamic(code)
|
73
|
-
return [:dynamic, code] unless RubyExpression.string_literal?(code)
|
74
|
-
return [:dynamic, code] if code.include?("\n")
|
75
12
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
temple << [:static, content]
|
81
|
-
when :dynamic
|
82
|
-
temple << on_dynamic(content)
|
83
|
-
end
|
13
|
+
begin
|
14
|
+
Temple::Filters::StringSplitter.compile(code)
|
15
|
+
rescue Temple::FilterError => e
|
16
|
+
raise Hamlit::InternalError.new(e.message)
|
84
17
|
end
|
85
|
-
temple
|
86
18
|
end
|
87
19
|
end
|
88
20
|
end
|
data/lib/hamlit/template.rb
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Hamlit
|
3
|
+
# A module to count lines of expected code. This would be faster than actual code generation
|
4
|
+
# and counting newlines in it.
|
5
|
+
module TempleLineCounter
|
6
|
+
class UnexpectedExpression < StandardError; end
|
7
|
+
|
8
|
+
def self.count_lines(exp)
|
9
|
+
type, *args = exp
|
10
|
+
case type
|
11
|
+
when :multi
|
12
|
+
args.map { |a| count_lines(a) }.reduce(:+) || 0
|
13
|
+
when :dynamic, :code
|
14
|
+
args.first.count("\n")
|
15
|
+
when :static
|
16
|
+
0 # It has not real newline "\n" but escaped "\\n".
|
17
|
+
when :case
|
18
|
+
arg, *cases = args
|
19
|
+
arg.count("\n") + cases.map do |cond, e|
|
20
|
+
(cond == :else ? 0 : cond.count("\n")) + count_lines(e)
|
21
|
+
end.reduce(:+)
|
22
|
+
when :escape
|
23
|
+
count_lines(args[1])
|
24
|
+
when :newline
|
25
|
+
1
|
26
|
+
else
|
27
|
+
raise UnexpectedExpression.new("[HAML BUG] Unexpected Temple expression '#{type}' is given!")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/hamlit/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hamlit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 0.8.
|
18
|
+
version: 0.8.2
|
19
19
|
name: temple
|
20
|
-
prerelease: false
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.8.
|
26
|
+
version: 0.8.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
@@ -31,8 +31,8 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '0'
|
33
33
|
name: thor
|
34
|
-
prerelease: false
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
@@ -45,8 +45,8 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
name: tilt
|
48
|
-
prerelease: false
|
49
48
|
type: :runtime
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
@@ -58,9 +58,23 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
|
-
name:
|
61
|
+
name: benchmark_driver
|
62
|
+
type: :development
|
62
63
|
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
name: bundler
|
63
76
|
type: :development
|
77
|
+
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - ">="
|
@@ -73,8 +87,8 @@ dependencies:
|
|
73
87
|
- !ruby/object:Gem::Version
|
74
88
|
version: '0'
|
75
89
|
name: coffee-script
|
76
|
-
prerelease: false
|
77
90
|
type: :development
|
91
|
+
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - ">="
|
@@ -87,8 +101,8 @@ dependencies:
|
|
87
101
|
- !ruby/object:Gem::Version
|
88
102
|
version: '0'
|
89
103
|
name: erubi
|
90
|
-
prerelease: false
|
91
104
|
type: :development
|
105
|
+
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - ">="
|
@@ -101,8 +115,8 @@ dependencies:
|
|
101
115
|
- !ruby/object:Gem::Version
|
102
116
|
version: '5'
|
103
117
|
name: haml
|
104
|
-
prerelease: false
|
105
118
|
type: :development
|
119
|
+
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - ">="
|
@@ -115,8 +129,8 @@ dependencies:
|
|
115
129
|
- !ruby/object:Gem::Version
|
116
130
|
version: '0'
|
117
131
|
name: less
|
118
|
-
prerelease: false
|
119
132
|
type: :development
|
133
|
+
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - ">="
|
@@ -129,8 +143,8 @@ dependencies:
|
|
129
143
|
- !ruby/object:Gem::Version
|
130
144
|
version: '1.1'
|
131
145
|
name: minitest-reporters
|
132
|
-
prerelease: false
|
133
146
|
type: :development
|
147
|
+
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - "~>"
|
@@ -143,8 +157,8 @@ dependencies:
|
|
143
157
|
- !ruby/object:Gem::Version
|
144
158
|
version: 4.0.0
|
145
159
|
name: rails
|
146
|
-
prerelease: false
|
147
160
|
type: :development
|
161
|
+
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - ">="
|
@@ -157,8 +171,8 @@ dependencies:
|
|
157
171
|
- !ruby/object:Gem::Version
|
158
172
|
version: '0'
|
159
173
|
name: rake
|
160
|
-
prerelease: false
|
161
174
|
type: :development
|
175
|
+
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - ">="
|
@@ -171,8 +185,8 @@ dependencies:
|
|
171
185
|
- !ruby/object:Gem::Version
|
172
186
|
version: '0'
|
173
187
|
name: rake-compiler
|
174
|
-
prerelease: false
|
175
188
|
type: :development
|
189
|
+
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
192
|
- - ">="
|
@@ -185,8 +199,8 @@ dependencies:
|
|
185
199
|
- !ruby/object:Gem::Version
|
186
200
|
version: '0'
|
187
201
|
name: sass
|
188
|
-
prerelease: false
|
189
202
|
type: :development
|
203
|
+
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
206
|
- - ">="
|
@@ -199,8 +213,22 @@ dependencies:
|
|
199
213
|
- !ruby/object:Gem::Version
|
200
214
|
version: '0'
|
201
215
|
name: slim
|
216
|
+
type: :development
|
202
217
|
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: '0'
|
229
|
+
name: string_template
|
203
230
|
type: :development
|
231
|
+
prerelease: false
|
204
232
|
version_requirements: !ruby/object:Gem::Requirement
|
205
233
|
requirements:
|
206
234
|
- - ">="
|
@@ -213,8 +241,8 @@ dependencies:
|
|
213
241
|
- !ruby/object:Gem::Version
|
214
242
|
version: '0'
|
215
243
|
name: unindent
|
216
|
-
prerelease: false
|
217
244
|
type: :development
|
245
|
+
prerelease: false
|
218
246
|
version_requirements: !ruby/object:Gem::Requirement
|
219
247
|
requirements:
|
220
248
|
- - ">="
|
@@ -246,6 +274,9 @@ files:
|
|
246
274
|
- benchmark/dynamic_attributes/data_attribute.haml
|
247
275
|
- benchmark/dynamic_attributes/id_attribute.haml
|
248
276
|
- benchmark/dynamic_boolean_attribute.haml
|
277
|
+
- benchmark/dynamic_merger/benchmark.rb
|
278
|
+
- benchmark/dynamic_merger/hello.haml
|
279
|
+
- benchmark/dynamic_merger/hello.string
|
249
280
|
- benchmark/etc/attribute_builder.haml
|
250
281
|
- benchmark/etc/real_sample.haml
|
251
282
|
- benchmark/etc/real_sample.rb
|
@@ -271,6 +302,7 @@ files:
|
|
271
302
|
- bin/setup
|
272
303
|
- bin/stackprof
|
273
304
|
- bin/test
|
305
|
+
- bin/update-haml
|
274
306
|
- exe/hamlit
|
275
307
|
- ext/hamlit/extconf.rb
|
276
308
|
- ext/hamlit/hamlit.c
|
@@ -289,6 +321,7 @@ files:
|
|
289
321
|
- lib/hamlit/compiler/script_compiler.rb
|
290
322
|
- lib/hamlit/compiler/silent_script_compiler.rb
|
291
323
|
- lib/hamlit/compiler/tag_compiler.rb
|
324
|
+
- lib/hamlit/dynamic_merger.rb
|
292
325
|
- lib/hamlit/engine.rb
|
293
326
|
- lib/hamlit/error.rb
|
294
327
|
- lib/hamlit/escapable.rb
|
@@ -310,28 +343,30 @@ files:
|
|
310
343
|
- lib/hamlit/filters/text_base.rb
|
311
344
|
- lib/hamlit/filters/tilt_base.rb
|
312
345
|
- lib/hamlit/force_escapable.rb
|
313
|
-
- lib/hamlit/hamlit.su
|
314
346
|
- lib/hamlit/helpers.rb
|
315
347
|
- lib/hamlit/html.rb
|
316
348
|
- lib/hamlit/identity.rb
|
317
349
|
- lib/hamlit/object_ref.rb
|
318
350
|
- lib/hamlit/parser.rb
|
319
|
-
- lib/hamlit/parser/
|
320
|
-
- lib/hamlit/parser/README.md
|
351
|
+
- lib/hamlit/parser/haml_attribute_builder.rb
|
321
352
|
- lib/hamlit/parser/haml_buffer.rb
|
322
353
|
- lib/hamlit/parser/haml_compiler.rb
|
323
354
|
- lib/hamlit/parser/haml_error.rb
|
355
|
+
- lib/hamlit/parser/haml_escapable.rb
|
356
|
+
- lib/hamlit/parser/haml_generator.rb
|
324
357
|
- lib/hamlit/parser/haml_helpers.rb
|
358
|
+
- lib/hamlit/parser/haml_helpers/xss_mods.rb
|
325
359
|
- lib/hamlit/parser/haml_options.rb
|
326
360
|
- lib/hamlit/parser/haml_parser.rb
|
361
|
+
- lib/hamlit/parser/haml_temple_engine.rb
|
327
362
|
- lib/hamlit/parser/haml_util.rb
|
328
|
-
- lib/hamlit/parser/haml_xss_mods.rb
|
329
363
|
- lib/hamlit/rails_helpers.rb
|
330
364
|
- lib/hamlit/rails_template.rb
|
331
365
|
- lib/hamlit/railtie.rb
|
332
366
|
- lib/hamlit/ruby_expression.rb
|
333
367
|
- lib/hamlit/string_splitter.rb
|
334
368
|
- lib/hamlit/template.rb
|
369
|
+
- lib/hamlit/temple_line_counter.rb
|
335
370
|
- lib/hamlit/utils.rb
|
336
371
|
- lib/hamlit/version.rb
|
337
372
|
homepage: https://github.com/k0kubun/hamlit
|
@@ -353,8 +388,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
388
|
- !ruby/object:Gem::Version
|
354
389
|
version: '0'
|
355
390
|
requirements: []
|
356
|
-
|
357
|
-
rubygems_version: 2.7.9
|
391
|
+
rubygems_version: 3.0.6
|
358
392
|
signing_key:
|
359
393
|
specification_version: 4
|
360
394
|
summary: High Performance Haml Implementation
|