hamli 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -2
- data/CHANGELOG.md +10 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +31 -20
- data/hamli.gemspec +1 -1
- data/lib/hamli/filters/interpolation.rb +1 -1
- data/lib/hamli/parser.rb +6 -6
- data/lib/hamli/version.rb +1 -1
- metadata +4 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 158a375f1876300a8cb20661a8811b4eac41249852a3eb912cf5167de1b1754b
|
|
4
|
+
data.tar.gz: 0b4ecd49bac379cd6aeca136929a24659277dd6b65cae6d373eeede2add8946e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d951547605c4156347968318742f3ffb60da981c21ee264d44c2e32b8a7c069aced50920c50e69e116ec34ad89d100fdc0ddd39ebd314fd2fef38ba95243c96
|
|
7
|
+
data.tar.gz: 96ad7007423345874e5a457246365692cad48f8d3eed187dfd8b9982d1353c085330e143e66d49b99bb281a31f16b5648e378fc8efc226e23c3b7bab07bebcc7
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
hamli (0.
|
|
4
|
+
hamli (0.6.0)
|
|
5
5
|
temple
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
ast (2.4.
|
|
10
|
+
ast (2.4.3)
|
|
11
11
|
diff-lcs (1.5.0)
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
json (2.19.4)
|
|
13
|
+
language_server-protocol (3.17.0.5)
|
|
14
|
+
lint_roller (1.1.0)
|
|
15
|
+
parallel (1.28.0)
|
|
16
|
+
parser (3.3.11.1)
|
|
14
17
|
ast (~> 2.4.1)
|
|
18
|
+
racc
|
|
19
|
+
prism (1.9.0)
|
|
20
|
+
racc (1.8.1)
|
|
15
21
|
rainbow (3.1.1)
|
|
16
22
|
rake (13.0.6)
|
|
17
|
-
regexp_parser (2.
|
|
18
|
-
rexml (3.2.5)
|
|
23
|
+
regexp_parser (2.12.0)
|
|
19
24
|
rspec (3.10.0)
|
|
20
25
|
rspec-core (~> 3.10.0)
|
|
21
26
|
rspec-expectations (~> 3.10.0)
|
|
@@ -29,22 +34,28 @@ GEM
|
|
|
29
34
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
30
35
|
rspec-support (~> 3.10.0)
|
|
31
36
|
rspec-support (3.10.3)
|
|
32
|
-
rubocop (1.
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
rubocop (1.86.1)
|
|
38
|
+
json (~> 2.3)
|
|
39
|
+
language_server-protocol (~> 3.17.0.2)
|
|
40
|
+
lint_roller (~> 1.1.0)
|
|
41
|
+
parallel (>= 1.10)
|
|
42
|
+
parser (>= 3.3.0.2)
|
|
35
43
|
rainbow (>= 2.2.2, < 4.0)
|
|
36
|
-
regexp_parser (>=
|
|
37
|
-
|
|
38
|
-
rubocop-ast (>= 1.15.1, < 2.0)
|
|
44
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
45
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
39
46
|
ruby-progressbar (~> 1.7)
|
|
40
|
-
unicode-display_width (>=
|
|
41
|
-
rubocop-ast (1.
|
|
42
|
-
parser (>= 3.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
48
|
+
rubocop-ast (1.49.1)
|
|
49
|
+
parser (>= 3.3.7.2)
|
|
50
|
+
prism (~> 1.7)
|
|
51
|
+
rubocop-rspec (3.9.0)
|
|
52
|
+
lint_roller (~> 1.1)
|
|
53
|
+
rubocop (~> 1.81)
|
|
54
|
+
ruby-progressbar (1.13.0)
|
|
46
55
|
temple (0.8.2)
|
|
47
|
-
unicode-display_width (2.
|
|
56
|
+
unicode-display_width (3.2.0)
|
|
57
|
+
unicode-emoji (~> 4.1)
|
|
58
|
+
unicode-emoji (4.2.0)
|
|
48
59
|
|
|
49
60
|
PLATFORMS
|
|
50
61
|
x86_64-linux
|
|
@@ -53,7 +64,7 @@ DEPENDENCIES
|
|
|
53
64
|
hamli!
|
|
54
65
|
rake (~> 13.0)
|
|
55
66
|
rspec (~> 3.0)
|
|
56
|
-
rubocop
|
|
67
|
+
rubocop
|
|
57
68
|
rubocop-rspec
|
|
58
69
|
|
|
59
70
|
BUNDLED WITH
|
data/hamli.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.summary = 'Yet another implementation for Haml template language.'
|
|
12
12
|
spec.homepage = 'https://github.com/r7kamura/hamli'
|
|
13
13
|
spec.license = 'MIT'
|
|
14
|
-
spec.required_ruby_version = '>=
|
|
14
|
+
spec.required_ruby_version = '>= 3.3.0'
|
|
15
15
|
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
17
|
spec.metadata['source_code_uri'] = spec.homepage
|
|
@@ -13,7 +13,7 @@ module Hamli
|
|
|
13
13
|
scanner = ::StringScanner.new(string)
|
|
14
14
|
until scanner.eos?
|
|
15
15
|
charpos = scanner.charpos
|
|
16
|
-
if (value = scanner.scan(
|
|
16
|
+
if (value = scanner.scan('\#{'))
|
|
17
17
|
block << [:static, value]
|
|
18
18
|
elsif scanner.scan(/#\{((?>[^{}]|(\{(?>[^{}]|\g<1>)*\}))*)\}/)
|
|
19
19
|
code = scanner[1]
|
data/lib/hamli/parser.rb
CHANGED
|
@@ -54,7 +54,7 @@ module Hamli
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
# @return [Boolean]
|
|
57
|
-
def parse_blank_line
|
|
57
|
+
def parse_blank_line # rubocop:disable Naming/PredicateMethod
|
|
58
58
|
if @scanner.scan(/[ \t]*$/)
|
|
59
59
|
parse_line_ending
|
|
60
60
|
true
|
|
@@ -64,7 +64,7 @@ module Hamli
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
# @return [Boolean]
|
|
67
|
-
def parse_line_ending
|
|
67
|
+
def parse_line_ending # rubocop:disable Naming/PredicateMethod
|
|
68
68
|
if @scanner.scan(/\r?\n/)
|
|
69
69
|
@stacks.last << [:newline]
|
|
70
70
|
true
|
|
@@ -223,7 +223,7 @@ module Hamli
|
|
|
223
223
|
def parse_html_style_attributes
|
|
224
224
|
@scanner.pos += 1
|
|
225
225
|
result = []
|
|
226
|
-
until @scanner.scan(
|
|
226
|
+
until @scanner.scan(')')
|
|
227
227
|
syntax_error!(Errors::UnexpectedEosError) if @scanner.eos?
|
|
228
228
|
|
|
229
229
|
@scanner.scan(/[ \t\r\n]+/)
|
|
@@ -245,7 +245,7 @@ module Hamli
|
|
|
245
245
|
name = @scanner[1]
|
|
246
246
|
|
|
247
247
|
@scanner.scan(/[ \t]*/)
|
|
248
|
-
return [:html, :attr, name, [:static, true]] unless @scanner.scan(
|
|
248
|
+
return [:html, :attr, name, [:static, true]] unless @scanner.scan('=')
|
|
249
249
|
|
|
250
250
|
@scanner.scan(/[ \t]*/)
|
|
251
251
|
unless (quote = @scanner.scan(/["']/))
|
|
@@ -463,7 +463,7 @@ module Hamli
|
|
|
463
463
|
def parse_broken_lines
|
|
464
464
|
result = +''
|
|
465
465
|
result << @scanner.scan(/[^\r\n]*/)
|
|
466
|
-
while result.end_with?(',') || result.end_with?('|')
|
|
466
|
+
while result.end_with?(',') || (result.end_with?('|') && (result !~ /\bdo\s*\|[^|]*\|\z/))
|
|
467
467
|
syntax_error!(Errors::UnexpectedEosError) unless @scanner.scan(/\r?\n/)
|
|
468
468
|
|
|
469
469
|
result << "\n"
|
|
@@ -497,7 +497,7 @@ module Hamli
|
|
|
497
497
|
else
|
|
498
498
|
0
|
|
499
499
|
end
|
|
500
|
-
end.sum
|
|
500
|
+
end.sum
|
|
501
501
|
end
|
|
502
502
|
|
|
503
503
|
# @return [Boolean]
|
data/lib/hamli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hamli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryo Nakamura
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: temple
|
|
@@ -24,7 +23,6 @@ dependencies:
|
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '0'
|
|
27
|
-
description:
|
|
28
26
|
email:
|
|
29
27
|
- r7kamura@gmail.com
|
|
30
28
|
executables: []
|
|
@@ -57,7 +55,6 @@ metadata:
|
|
|
57
55
|
source_code_uri: https://github.com/r7kamura/hamli
|
|
58
56
|
changelog_uri: https://github.com/r7kamura/hamli/blob/main/CHANGELOG.md
|
|
59
57
|
rubygems_mfa_required: 'true'
|
|
60
|
-
post_install_message:
|
|
61
58
|
rdoc_options: []
|
|
62
59
|
require_paths:
|
|
63
60
|
- lib
|
|
@@ -65,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
65
62
|
requirements:
|
|
66
63
|
- - ">="
|
|
67
64
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
65
|
+
version: 3.3.0
|
|
69
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
67
|
requirements:
|
|
71
68
|
- - ">="
|
|
72
69
|
- !ruby/object:Gem::Version
|
|
73
70
|
version: '0'
|
|
74
71
|
requirements: []
|
|
75
|
-
rubygems_version: 3.
|
|
76
|
-
signing_key:
|
|
72
|
+
rubygems_version: 3.6.9
|
|
77
73
|
specification_version: 4
|
|
78
74
|
summary: Yet another implementation for Haml template language.
|
|
79
75
|
test_files: []
|