rubocop-slim 0.2.8 → 0.3.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: 6cc13d20db409e4be47e6572f26316aa1f769a2075e3e467aea4da80264376c0
4
- data.tar.gz: e8c6412e4601f6959723ffb5aaecc00cb54a5ab57af01245a0b5009aec652e1c
3
+ metadata.gz: e66ccc298ec65e04faa7e04a808599561bf00a5612f894b696e95f5dc0d78133
4
+ data.tar.gz: e0cc9efca5b9bb323d40152ddc164d366cbffd991d8687fd7b081681aeb278c0
5
5
  SHA512:
6
- metadata.gz: 5ccaa0d63a42c0b5dc73ce7d91b43c56793300c913c1b45a9534a6caba6b08912abc6fb2e677ac9b5eb97c0231d737141970df7a5ab91b17164d1bec067318fa
7
- data.tar.gz: 894a0ddcda52e388bb88a5d7c29dfbf142fd94900e73ef3bd4ff79d72baae87c9689a6de41690482214ab4868f9d05429f966994541a882ed29b1bbca714892d
6
+ metadata.gz: 89e1f4affe662786a84a62185518ebf90a9dabbeab66f4e19e85fa2f97e6b1f4d813d61b9b07d99b7e7159028f591f616939a61f654f9b2df8e16ff50444ecea
7
+ data.tar.gz: 72b4f5485a411e9de2bc3e086e78fdf9c41076a4fc0434ce8397fb2abddd5760ef4732499405e52f45874b1fecf7e06646f17a479f4656577afab927c9423b43
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
  - rubocop-slim
data/Gemfile.lock CHANGED
@@ -1,93 +1,106 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-slim (0.2.8)
5
- rubocop (~> 1.45)
4
+ rubocop-slim (0.3.0)
5
+ lint_roller (>= 1.1)
6
+ rubocop (>= 1.72.1)
6
7
  slimi (~> 0.7)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- activesupport (7.1.3.4)
12
+ activesupport (7.1.5.1)
12
13
  base64
14
+ benchmark (>= 0.3)
13
15
  bigdecimal
14
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
17
  connection_pool (>= 2.2.5)
16
18
  drb
17
19
  i18n (>= 1.6, < 2)
20
+ logger (>= 1.4.2)
18
21
  minitest (>= 5.1)
19
22
  mutex_m
23
+ securerandom (>= 0.3)
20
24
  tzinfo (~> 2.0)
21
- ast (2.4.2)
25
+ ast (2.4.3)
22
26
  base64 (0.2.0)
23
- bigdecimal (3.1.8)
24
- concurrent-ruby (1.3.3)
25
- connection_pool (2.4.1)
26
- diff-lcs (1.5.1)
27
+ benchmark (0.4.0)
28
+ bigdecimal (3.1.9)
29
+ concurrent-ruby (1.3.5)
30
+ connection_pool (2.5.0)
31
+ diff-lcs (1.6.1)
27
32
  drb (2.2.1)
28
- i18n (1.14.5)
33
+ i18n (1.14.7)
29
34
  concurrent-ruby (~> 1.0)
30
- json (2.7.2)
31
- language_server-protocol (3.17.0.3)
32
- minitest (5.24.1)
33
- mutex_m (0.2.0)
34
- parallel (1.25.1)
35
- parser (3.3.4.0)
35
+ json (2.10.2)
36
+ language_server-protocol (3.17.0.4)
37
+ lint_roller (1.1.0)
38
+ logger (1.7.0)
39
+ minitest (5.25.5)
40
+ mutex_m (0.3.0)
41
+ parallel (1.26.3)
42
+ parser (3.3.7.4)
36
43
  ast (~> 2.4.1)
37
44
  racc
38
- racc (1.8.0)
45
+ prism (1.4.0)
46
+ racc (1.8.1)
39
47
  rainbow (3.1.1)
40
48
  rake (13.2.1)
41
- regexp_parser (2.9.2)
42
- rexml (3.3.2)
43
- strscan
49
+ regexp_parser (2.10.0)
44
50
  rspec (3.13.0)
45
51
  rspec-core (~> 3.13.0)
46
52
  rspec-expectations (~> 3.13.0)
47
53
  rspec-mocks (~> 3.13.0)
48
- rspec-core (3.13.0)
54
+ rspec-core (3.13.3)
49
55
  rspec-support (~> 3.13.0)
50
- rspec-expectations (3.13.1)
56
+ rspec-expectations (3.13.3)
51
57
  diff-lcs (>= 1.2.0, < 2.0)
52
58
  rspec-support (~> 3.13.0)
53
- rspec-mocks (3.13.1)
59
+ rspec-mocks (3.13.2)
54
60
  diff-lcs (>= 1.2.0, < 2.0)
55
61
  rspec-support (~> 3.13.0)
56
- rspec-support (3.13.1)
57
- rubocop (1.65.0)
62
+ rspec-support (3.13.2)
63
+ rubocop (1.75.2)
58
64
  json (~> 2.3)
59
- language_server-protocol (>= 3.17.0)
65
+ language_server-protocol (~> 3.17.0.2)
66
+ lint_roller (~> 1.1.0)
60
67
  parallel (~> 1.10)
61
68
  parser (>= 3.3.0.2)
62
69
  rainbow (>= 2.2.2, < 4.0)
63
- regexp_parser (>= 2.4, < 3.0)
64
- rexml (>= 3.2.5, < 4.0)
65
- rubocop-ast (>= 1.31.1, < 2.0)
70
+ regexp_parser (>= 2.9.3, < 3.0)
71
+ rubocop-ast (>= 1.44.0, < 2.0)
66
72
  ruby-progressbar (~> 1.7)
67
- unicode-display_width (>= 2.4.0, < 3.0)
68
- rubocop-ast (1.31.3)
69
- parser (>= 3.3.1.0)
70
- rubocop-rake (0.6.0)
71
- rubocop (~> 1.0)
72
- rubocop-rspec (3.0.3)
73
- rubocop (~> 1.61)
73
+ unicode-display_width (>= 2.4.0, < 4.0)
74
+ rubocop-ast (1.44.0)
75
+ parser (>= 3.3.7.2)
76
+ prism (~> 1.4)
77
+ rubocop-rake (0.7.1)
78
+ lint_roller (~> 1.1)
79
+ rubocop (>= 1.72.1)
80
+ rubocop-rspec (3.5.0)
81
+ lint_roller (~> 1.1)
82
+ rubocop (~> 1.72, >= 1.72.1)
74
83
  ruby-progressbar (1.13.0)
75
- sevencop (0.43.1)
84
+ securerandom (0.3.2)
85
+ sevencop (0.48.0)
76
86
  activesupport
77
- rubocop
78
- slimi (0.7.5)
87
+ lint_roller (>= 1.1)
88
+ rubocop (>= 1.72.1)
89
+ slimi (0.7.6)
79
90
  temple
80
91
  thor
81
92
  tilt
82
- strscan (3.1.0)
83
93
  temple (0.10.3)
84
94
  thor (1.3.2)
85
- tilt (2.4.0)
95
+ tilt (2.6.0)
86
96
  tzinfo (2.0.6)
87
97
  concurrent-ruby (~> 1.0)
88
- unicode-display_width (2.5.0)
98
+ unicode-display_width (3.1.4)
99
+ unicode-emoji (~> 4.0, >= 4.0.4)
100
+ unicode-emoji (4.0.4)
89
101
 
90
102
  PLATFORMS
103
+ ruby
91
104
  x86_64-linux
92
105
 
93
106
  DEPENDENCIES
data/README.md CHANGED
@@ -20,11 +20,11 @@ gem install rubocop-slim
20
20
 
21
21
  ## Usage
22
22
 
23
- Require `rubocop-slim` in your RuboCop config.
23
+ Add `rubocop-slim` to plugins.
24
24
 
25
25
  ```yaml
26
26
  # .rubocop.yml
27
- require:
27
+ plugins:
28
28
  - rubocop-slim
29
29
  ```
30
30
 
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'lint_roller'
4
+
5
+ module RuboCop
6
+ module Slim
7
+ class Plugin < ::LintRoller::Plugin
8
+ def about
9
+ ::LintRoller::About.new(
10
+ description: 'RuboCop plugin for Slim template.',
11
+ homepage: 'https://github.com/r7kamura/rubocop-slim',
12
+ name: 'rubocop-slim',
13
+ version: VERSION
14
+ )
15
+ end
16
+
17
+ def rules(_context)
18
+ ::RuboCop::Runner.ruby_extractors.unshift(::RuboCop::Slim::RubyExtractor)
19
+
20
+ ::LintRoller::Rules.new(
21
+ config_format: :rubocop,
22
+ type: :path,
23
+ value: "#{__dir__}/../../../config/default.yml"
24
+ )
25
+ end
26
+
27
+ def supported?(context)
28
+ context.engine == :rubocop
29
+ end
30
+ end
31
+ end
32
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Slim
5
- VERSION = '0.2.8'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
data/lib/rubocop/slim.rb CHANGED
@@ -11,5 +11,5 @@ module RuboCop
11
11
  end
12
12
  end
13
13
 
14
- require_relative 'slim/rubocop_extension'
14
+ require_relative 'slim/plugin'
15
15
  require_relative 'slim/version'
data/rubocop-slim.gemspec CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.metadata['homepage_uri'] = spec.homepage
17
17
  spec.metadata['source_code_uri'] = spec.homepage
18
18
  spec.metadata['changelog_uri'] = "#{spec.homepage}/releases"
19
+ spec.metadata['default_lint_roller_plugin'] = 'RuboCop::Slim::Plugin'
19
20
 
20
21
  # Specify which files should be added to the gem when it is released.
21
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -28,6 +29,7 @@ Gem::Specification.new do |spec|
28
29
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
30
  spec.require_paths = ['lib']
30
31
 
31
- spec.add_dependency 'rubocop', '~> 1.45'
32
+ spec.add_dependency 'lint_roller', '>= 1.1'
33
+ spec.add_dependency 'rubocop', '>= 1.72.1'
32
34
  spec.add_dependency 'slimi', '~> 0.7'
33
35
  end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-01 00:00:00.000000000 Z
11
+ date: 2025-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: lint_roller
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.1'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rubocop
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - "~>"
31
+ - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: '1.45'
33
+ version: 1.72.1
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - "~>"
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
- version: '1.45'
40
+ version: 1.72.1
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: slimi
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,8 +72,8 @@ files:
58
72
  - lib/rubocop/slim.rb
59
73
  - lib/rubocop/slim/config_loader.rb
60
74
  - lib/rubocop/slim/keyword_remover.rb
75
+ - lib/rubocop/slim/plugin.rb
61
76
  - lib/rubocop/slim/processed_source_builder.rb
62
- - lib/rubocop/slim/rubocop_extension.rb
63
77
  - lib/rubocop/slim/ruby_clip.rb
64
78
  - lib/rubocop/slim/ruby_extractor.rb
65
79
  - lib/rubocop/slim/version.rb
@@ -72,6 +86,7 @@ metadata:
72
86
  homepage_uri: https://github.com/r7kamura/rubocop-slim
73
87
  source_code_uri: https://github.com/r7kamura/rubocop-slim
74
88
  changelog_uri: https://github.com/r7kamura/rubocop-slim/releases
89
+ default_lint_roller_plugin: RuboCop::Slim::Plugin
75
90
  post_install_message:
76
91
  rdoc_options: []
77
92
  require_paths:
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rubocop'
4
-
5
- RuboCop::Runner.ruby_extractors.unshift(RuboCop::Slim::RubyExtractor)
6
-
7
- RuboCop::ConfigLoader.instance_variable_set(
8
- :@default_configuration,
9
- RuboCop::Slim::ConfigLoader.call
10
- )