slimi 0.7.4 → 0.7.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec5e4e452e6c31d6d7f6b65f3eb1f6989d502d470d60a75df53ae4478fcbd59a
4
- data.tar.gz: 333f18dfbc10fe75b05c3c452bf633ed4f39188894af9754f08329c54511cffd
3
+ metadata.gz: 6ca12d6e13960ee1e5286eaea922963d4cdf5c5689138568df0a890ea55ce5e4
4
+ data.tar.gz: 827d5b941f281f28f846fa308ff5980e38b164714d4be947b1c8db93be61c087
5
5
  SHA512:
6
- metadata.gz: dbf98f16509584c552ce49786247f8c80bb3034f509d4528a5b4322ccef5a44a16c9416c8e44d42f9f89bbf5092b57dd21ac82523127335f02afc73448bc87d0
7
- data.tar.gz: 428508b038f66abefb7eb90b19002cbba999e7bca5433b76c71e7a8a7be6e665f302b7085e4074ebe39c83ad444e21cf48f384b35e561eb752be628de30328ee
6
+ metadata.gz: 13b5852f0cfac2d29a0d5ea1ccfb29060835d0e6596a4b29f11a9c910a37a2ea988924c6fe381066c53d9a08dcd1cda608bfacedc05ffca7b05484c3c9f784ba
7
+ data.tar.gz: 1dfd5f1a1579df277731d02dd519225392ea3b7ff18a7362ae7a2b4432ade93805ce434f7a69452b8d10d4141fa97fb203bb455338aabc42cb15e357c849ea7d
data/.rubocop.yml CHANGED
@@ -18,6 +18,9 @@ Metrics:
18
18
  RSpec/AnyInstance:
19
19
  Enabled: false
20
20
 
21
+ RSpec/ExampleLength:
22
+ Enabled: false
23
+
21
24
  RSpec/ImplicitSubject:
22
25
  Enabled: false
23
26
 
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.7.5 - 2024-07-25
6
+
7
+ ### Fixed
8
+
9
+ - Fix position bug on non-escaped interpolation.
10
+ - Fix backslash escape bug.
11
+
5
12
  ## 0.7.4 - 2023-03-22
6
13
 
7
14
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- slimi (0.7.4)
4
+ slimi (0.7.5)
5
5
  temple
6
6
  thor
7
7
  tilt
@@ -9,82 +9,96 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionview (7.0.4.2)
13
- activesupport (= 7.0.4.2)
12
+ actionview (7.1.3.4)
13
+ activesupport (= 7.1.3.4)
14
14
  builder (~> 3.1)
15
- erubi (~> 1.4)
16
- rails-dom-testing (~> 2.0)
17
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
18
- activesupport (7.0.4.2)
15
+ erubi (~> 1.11)
16
+ rails-dom-testing (~> 2.2)
17
+ rails-html-sanitizer (~> 1.6)
18
+ activesupport (7.1.3.4)
19
+ base64
20
+ bigdecimal
19
21
  concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ connection_pool (>= 2.2.5)
23
+ drb
20
24
  i18n (>= 1.6, < 2)
21
25
  minitest (>= 5.1)
26
+ mutex_m
22
27
  tzinfo (~> 2.0)
23
28
  ast (2.4.2)
24
- builder (3.2.4)
25
- concurrent-ruby (1.2.0)
29
+ base64 (0.2.0)
30
+ bigdecimal (3.1.8)
31
+ builder (3.3.0)
32
+ concurrent-ruby (1.3.3)
33
+ connection_pool (2.4.1)
26
34
  crass (1.0.6)
27
- diff-lcs (1.5.0)
28
- erubi (1.12.0)
29
- i18n (1.12.0)
35
+ diff-lcs (1.5.1)
36
+ drb (2.2.1)
37
+ erubi (1.13.0)
38
+ i18n (1.14.5)
30
39
  concurrent-ruby (~> 1.0)
31
- json (2.6.3)
32
- loofah (2.19.1)
40
+ json (2.7.2)
41
+ language_server-protocol (3.17.0.3)
42
+ loofah (2.22.0)
33
43
  crass (~> 1.0.2)
34
- nokogiri (>= 1.5.9)
35
- minitest (5.17.0)
36
- nokogiri (1.14.2-x86_64-linux)
44
+ nokogiri (>= 1.12.0)
45
+ minitest (5.24.1)
46
+ mutex_m (0.2.0)
47
+ nokogiri (1.16.6-x86_64-linux)
37
48
  racc (~> 1.4)
38
- parallel (1.22.1)
39
- parser (3.2.1.0)
49
+ parallel (1.25.1)
50
+ parser (3.3.4.0)
40
51
  ast (~> 2.4.1)
41
- racc (1.6.2)
42
- rails-dom-testing (2.0.3)
43
- activesupport (>= 4.2.0)
52
+ racc
53
+ racc (1.8.0)
54
+ rails-dom-testing (2.2.0)
55
+ activesupport (>= 5.0.0)
56
+ minitest
44
57
  nokogiri (>= 1.6)
45
- rails-html-sanitizer (1.5.0)
46
- loofah (~> 2.19, >= 2.19.1)
58
+ rails-html-sanitizer (1.6.0)
59
+ loofah (~> 2.21)
60
+ nokogiri (~> 1.14)
47
61
  rainbow (3.1.1)
48
- rake (13.0.6)
49
- regexp_parser (2.7.0)
50
- rexml (3.2.5)
51
- rspec (3.12.0)
52
- rspec-core (~> 3.12.0)
53
- rspec-expectations (~> 3.12.0)
54
- rspec-mocks (~> 3.12.0)
55
- rspec-core (3.12.1)
56
- rspec-support (~> 3.12.0)
57
- rspec-expectations (3.12.2)
62
+ rake (13.2.1)
63
+ regexp_parser (2.9.2)
64
+ rexml (3.3.2)
65
+ strscan
66
+ rspec (3.13.0)
67
+ rspec-core (~> 3.13.0)
68
+ rspec-expectations (~> 3.13.0)
69
+ rspec-mocks (~> 3.13.0)
70
+ rspec-core (3.13.0)
71
+ rspec-support (~> 3.13.0)
72
+ rspec-expectations (3.13.1)
58
73
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.12.0)
60
- rspec-mocks (3.12.3)
74
+ rspec-support (~> 3.13.0)
75
+ rspec-mocks (3.13.1)
61
76
  diff-lcs (>= 1.2.0, < 2.0)
62
- rspec-support (~> 3.12.0)
63
- rspec-support (3.12.0)
64
- rubocop (1.45.1)
77
+ rspec-support (~> 3.13.0)
78
+ rspec-support (3.13.1)
79
+ rubocop (1.65.0)
65
80
  json (~> 2.3)
81
+ language_server-protocol (>= 3.17.0)
66
82
  parallel (~> 1.10)
67
- parser (>= 3.2.0.0)
83
+ parser (>= 3.3.0.2)
68
84
  rainbow (>= 2.2.2, < 4.0)
69
- regexp_parser (>= 1.8, < 3.0)
85
+ regexp_parser (>= 2.4, < 3.0)
70
86
  rexml (>= 3.2.5, < 4.0)
71
- rubocop-ast (>= 1.24.1, < 2.0)
87
+ rubocop-ast (>= 1.31.1, < 2.0)
72
88
  ruby-progressbar (~> 1.7)
73
89
  unicode-display_width (>= 2.4.0, < 3.0)
74
- rubocop-ast (1.26.0)
75
- parser (>= 3.2.1.0)
76
- rubocop-capybara (2.17.1)
77
- rubocop (~> 1.41)
78
- rubocop-rspec (2.18.1)
79
- rubocop (~> 1.33)
80
- rubocop-capybara (~> 2.17)
81
- ruby-progressbar (1.11.0)
82
- temple (0.10.0)
83
- thor (1.2.1)
84
- tilt (2.1.0)
90
+ rubocop-ast (1.31.3)
91
+ parser (>= 3.3.1.0)
92
+ rubocop-rspec (3.0.3)
93
+ rubocop (~> 1.61)
94
+ ruby-progressbar (1.13.0)
95
+ strscan (3.1.0)
96
+ temple (0.10.3)
97
+ thor (1.3.1)
98
+ tilt (2.4.0)
85
99
  tzinfo (2.0.6)
86
100
  concurrent-ruby (~> 1.0)
87
- unicode-display_width (2.4.2)
101
+ unicode-display_width (2.5.0)
88
102
 
89
103
  PLATFORMS
90
104
  x86_64-linux
data/lib/slimi/cli.rb CHANGED
@@ -23,7 +23,7 @@ module Slimi
23
23
  def parse
24
24
  slim = $stdin.read
25
25
  expression = Parser.new.call(slim)
26
- pp expression # rubocop:disable Lint/Debugger
26
+ pp expression
27
27
  end
28
28
 
29
29
  desc 'render', 'Convert Slim into HTML'
@@ -8,7 +8,7 @@ module Slimi
8
8
  class TextCollector < Base
9
9
  def call(exp)
10
10
  @collected = +''
11
- super(exp)
11
+ super
12
12
  @collected
13
13
  end
14
14
 
@@ -22,7 +22,7 @@ module Slimi
22
22
  class NewlineCollector < Base
23
23
  def call(exp)
24
24
  @collected = [:multi]
25
- super(exp)
25
+ super
26
26
  @collected
27
27
  end
28
28
 
@@ -38,7 +38,7 @@ module Slimi
38
38
  @protect = []
39
39
  @collected = +''
40
40
  @tag = "%#{object_id.abs.to_s(36)}%"
41
- super(exp)
41
+ super
42
42
  @collected
43
43
  end
44
44
 
@@ -13,7 +13,7 @@ module Slimi
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]
@@ -21,7 +21,7 @@ module Slimi
21
21
  if code.start_with?('{') && code.end_with?('}')
22
22
  escape = true
23
23
  code = code[1..-2]
24
- begin2 -= 1
24
+ begin2 += 1
25
25
  else
26
26
  escape = false
27
27
  end
data/lib/slimi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Slimi
4
- VERSION = '0.7.4'
4
+ VERSION = '0.7.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2024-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description:
55
+ description:
56
56
  email:
57
57
  - r7kamura@gmail.com
58
58
  executables:
@@ -103,7 +103,7 @@ metadata:
103
103
  source_code_uri: https://github.com/r7kamura/slimi
104
104
  changelog_uri: https://github.com/r7kamura/slimi/blob/main/CHANGELOG.md
105
105
  rubygems_mfa_required: 'true'
106
- post_install_message:
106
+ post_install_message:
107
107
  rdoc_options: []
108
108
  require_paths:
109
109
  - lib
@@ -118,8 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.3.26
122
- signing_key:
121
+ rubygems_version: 3.5.11
122
+ signing_key:
123
123
  specification_version: 4
124
124
  summary: Yet another implementation for Slim template language.
125
125
  test_files: []