slimi 0.8.0 → 0.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f85a2a7fb060ffa915242323704ec46c52f7bc224084013c08b7832ccaaa4e2
4
- data.tar.gz: d76831908983154a2f80f8f2ed433ee76e29d5d016eb7a9b29e2b0f292d7f54f
3
+ metadata.gz: df7564efc95dcfc968f262e77fff5be0daa2c779c43f8da3ee858a9508264685
4
+ data.tar.gz: 414c5620fb99766908c117ef3ae49d14df04206d6121714fb167ec4a4773678b
5
5
  SHA512:
6
- metadata.gz: 4fac9d1b99931a94dee91a14721e0f657b1abd44f8f71110240d50bed95583793f42fee67bd5c0986857fcc356aae5efc2d20c077569c7658898bbf7af2e69b2
7
- data.tar.gz: b21697a773720dc4604f7a21df0625df5671c52e7b4f48bcefcfc8bb5941b8f7af3b2776e0dc881d8eef218f53bb4f551d064e5180e68408d5167f5248fc58cf
6
+ metadata.gz: 12999b7675a1e9aa480cc32c8380a4a09f906376ce34e545db48f481991e1edb6d10bd3b8d6c0f1e09596d357b084b2f92d9958bee66149c27eacb50d0c76991
7
+ data.tar.gz: 037a95dd6470e185b63c6c145706cf27c9271aa2d1017c8ab5806dd87f96a8a05d0f779d5dcb279c7bd242043f80d9af43e2da2515997f0fcbb4b33aa303defd
data/.rubocop.yml CHANGED
@@ -4,7 +4,6 @@ require:
4
4
  AllCops:
5
5
  NewCops: enable
6
6
  SuggestExtensions: false
7
- TargetRubyVersion: 2.6
8
7
 
9
8
  Layout/LineLength:
10
9
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - Change required ruby version from 2.6+ to 3.3+.
6
+
5
7
  ## 0.8.0 - 2026-06-13
6
8
 
7
9
  - Support splat attributes.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- slimi (0.8.0)
4
+ slimi (0.9.0)
5
5
  temple
6
6
  thor
7
7
  tilt
@@ -9,22 +9,25 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionview (7.1.3.4)
13
- activesupport (= 7.1.3.4)
12
+ actionview (8.1.3)
13
+ activesupport (= 8.1.3)
14
14
  builder (~> 3.1)
15
15
  erubi (~> 1.11)
16
16
  rails-dom-testing (~> 2.2)
17
17
  rails-html-sanitizer (~> 1.6)
18
- activesupport (7.1.3.4)
18
+ activesupport (8.1.3)
19
19
  base64
20
20
  bigdecimal
21
- concurrent-ruby (~> 1.0, >= 1.0.2)
21
+ concurrent-ruby (~> 1.0, >= 1.3.1)
22
22
  connection_pool (>= 2.2.5)
23
23
  drb
24
24
  i18n (>= 1.6, < 2)
25
+ json
26
+ logger (>= 1.4.2)
25
27
  minitest (>= 5.1)
26
- mutex_m
27
- tzinfo (~> 2.0)
28
+ securerandom (>= 0.3)
29
+ tzinfo (~> 2.0, >= 2.0.5)
30
+ uri (>= 0.13.1)
28
31
  ast (2.4.2)
29
32
  base64 (0.2.0)
30
33
  bigdecimal (3.1.8)
@@ -39,17 +42,20 @@ GEM
39
42
  concurrent-ruby (~> 1.0)
40
43
  json (2.7.2)
41
44
  language_server-protocol (3.17.0.3)
45
+ logger (1.7.0)
42
46
  loofah (2.22.0)
43
47
  crass (~> 1.0.2)
44
48
  nokogiri (>= 1.12.0)
45
- minitest (5.24.1)
46
- mutex_m (0.2.0)
47
- nokogiri (1.18.10-x86_64-linux-gnu)
49
+ minitest (6.0.6)
50
+ drb (~> 2.0)
51
+ prism (~> 1.5)
52
+ nokogiri (1.19.3-x86_64-linux-gnu)
48
53
  racc (~> 1.4)
49
54
  parallel (1.25.1)
50
55
  parser (3.3.4.0)
51
56
  ast (~> 2.4.1)
52
57
  racc
58
+ prism (1.9.0)
53
59
  racc (1.8.0)
54
60
  rails-dom-testing (2.2.0)
55
61
  activesupport (>= 5.0.0)
@@ -92,6 +98,7 @@ GEM
92
98
  rubocop-rspec (3.0.3)
93
99
  rubocop (~> 1.61)
94
100
  ruby-progressbar (1.13.0)
101
+ securerandom (0.4.1)
95
102
  strscan (3.1.0)
96
103
  temple (0.10.3)
97
104
  thor (1.3.2)
@@ -99,6 +106,7 @@ GEM
99
106
  tzinfo (2.0.6)
100
107
  concurrent-ruby (~> 1.0)
101
108
  unicode-display_width (2.5.0)
109
+ uri (1.1.1)
102
110
 
103
111
  PLATFORMS
104
112
  x86_64-linux
@@ -4,7 +4,7 @@ module Slimi
4
4
  module Filters
5
5
  # Append missing `do` to embedded Ruby code.
6
6
  class DoInserter < Base
7
- VALID_RUBY_LINE_REGEXP = /(\A(if|unless|else|elsif|when|begin|rescue|ensure|case)\b)|\bdo\s*(\|[^|]*\|\s*)?\Z/.freeze
7
+ VALID_RUBY_LINE_REGEXP = /(\A(if|unless|else|elsif|when|begin|rescue|ensure|case)\b)|\bdo\s*(\|[^|]*\|\s*)?\Z/
8
8
 
9
9
  # @param [String] code
10
10
  # @param [Array] expressio
@@ -36,11 +36,11 @@ module Slimi
36
36
  end
37
37
 
38
38
  class Expression
39
- IF_REGEXP = /\A(if|begin|unless|else|elsif|when|rescue|ensure)\b|\bdo\s*(\|[^|]*\|)?\s*$/.freeze
39
+ IF_REGEXP = /\A(if|begin|unless|else|elsif|when|rescue|ensure)\b|\bdo\s*(\|[^|]*\|)?\s*$/
40
40
 
41
- ELSE_REGEXP = /\A(else|elsif|when|rescue|ensure)\b/.freeze
41
+ ELSE_REGEXP = /\A(else|elsif|when|rescue|ensure)\b/
42
42
 
43
- END_REGEXP = /\Aend\b/.freeze
43
+ END_REGEXP = /\Aend\b/
44
44
 
45
45
  # @param [Array] expression
46
46
  def initialize(expression)
@@ -6,7 +6,7 @@ module Slimi
6
6
  class Output < Base
7
7
  define_options :disable_capture
8
8
 
9
- IF_REGEXP = /\A(if|unless)\b|\bdo\s*(\|[^|]*\|)?\s*$/.freeze
9
+ IF_REGEXP = /\A(if|unless)\b|\bdo\s*(\|[^|]*\|)?\s*$/
10
10
 
11
11
  # @param [Boolean] escape
12
12
  # @param [String] code
@@ -77,7 +77,7 @@ module Slimi
77
77
 
78
78
  class Builder
79
79
  # https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
80
- INVALID_ATTRIBUTE_NAME_REGEXP = %r{[ \0"'>/=]}.freeze
80
+ INVALID_ATTRIBUTE_NAME_REGEXP = %r{[ \0"'>/=]}
81
81
 
82
82
  # @param [Hash] options
83
83
  def initialize(options)
@@ -8,8 +8,8 @@ module Slimi
8
8
  # @return [String]
9
9
  def call(template, source = nil)
10
10
  Renderer.new(
11
- source: source,
12
- template: template
11
+ source:,
12
+ template:
13
13
  ).call
14
14
  end
15
15
 
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.8.0'
4
+ VERSION = '0.9.0'
5
5
  end
data/slimi.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'Yet another implementation for Slim template language.'
12
12
  spec.homepage = 'https://github.com/r7kamura/slimi'
13
13
  spec.license = 'MIT'
14
- spec.required_ruby_version = '>= 2.6.0'
14
+ spec.required_ruby_version = '>= 3.3'
15
15
 
16
16
  spec.metadata['homepage_uri'] = spec.homepage
17
17
  spec.metadata['source_code_uri'] = spec.homepage
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
@@ -109,14 +109,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: 2.6.0
112
+ version: '3.3'
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubygems_version: 3.6.9
119
+ rubygems_version: 3.6.7
120
120
  specification_version: 4
121
121
  summary: Yet another implementation for Slim template language.
122
122
  test_files: []