rubocop-erb 0.5.5 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49341b04ccc3098029bdd8f9b98b961825328a46623797e1a544e3264f16768b
4
- data.tar.gz: eac652e2b1a040701290af19e4cded60a4cd53aa2849bc2aa5d1c9ddfefe7fee
3
+ metadata.gz: 81ef07f416359d5d003f64954122910aba25e3c46061a745c7b1d3e7bca5ad13
4
+ data.tar.gz: 30b40434d770978c488224dc8acc6f6df3c6149ce74dd38ecdbbc131d6c54c64
5
5
  SHA512:
6
- metadata.gz: d3dd34349dc3eeea3925ad0b0d789e89efabc1ce0120f80ef64298e1b2b8b548936be1f7e4d10b7b2569a36685cc10170af706eeb3d982c08ac1d5638979e90c
7
- data.tar.gz: 7705cb8f5537d18855c89e431fe40489f002a2c9a104b5662fa7bf20e967c23ae549507c42649819360180d1ee792b9980432b810ea1e17f4feb73d3b477f747
6
+ metadata.gz: 4ffb0cb8881cf7d014b389071ab032e8f75e422bd5beabfd36532e3f78cb51f4c3e3cdfb11235242f342aa3f61b1434878d85e0986aa573c93ba120014ca0ce0
7
+ data.tar.gz: 7a781ecb1c6b1041859b417ffed5030e517b261390c4b452a20ece26e0537e78cf2a67fb6a346597b111c8ae4e8204f329e509e67617eda4456724ef70eb0130
data/.rubocop.yml CHANGED
@@ -1,7 +1,9 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-erb
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
5
+
6
+ require:
5
7
  - sevencop
6
8
 
7
9
  inherit_mode:
data/Gemfile.lock CHANGED
@@ -1,31 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-erb (0.5.5)
4
+ rubocop-erb (0.6.0)
5
5
  better_html
6
- rubocop (~> 1.45)
6
+ lint_roller (~> 1.1)
7
+ rubocop (~> 1.72, >= 1.72.1)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- actionview (7.1.3.4)
12
- activesupport (= 7.1.3.4)
12
+ actionview (7.1.5.1)
13
+ activesupport (= 7.1.5.1)
13
14
  builder (~> 3.1)
14
15
  erubi (~> 1.11)
15
16
  rails-dom-testing (~> 2.2)
16
17
  rails-html-sanitizer (~> 1.6)
17
- activesupport (7.1.3.4)
18
+ activesupport (7.1.5.1)
18
19
  base64
20
+ benchmark (>= 0.3)
19
21
  bigdecimal
20
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
21
23
  connection_pool (>= 2.2.5)
22
24
  drb
23
25
  i18n (>= 1.6, < 2)
26
+ logger (>= 1.4.2)
24
27
  minitest (>= 5.1)
25
28
  mutex_m
29
+ securerandom (>= 0.3)
26
30
  tzinfo (~> 2.0)
27
31
  ast (2.4.2)
28
32
  base64 (0.2.0)
33
+ benchmark (0.4.0)
29
34
  better_html (2.1.1)
30
35
  actionview (>= 6.0)
31
36
  activesupport (>= 6.0)
@@ -33,84 +38,93 @@ GEM
33
38
  erubi (~> 1.4)
34
39
  parser (>= 2.4)
35
40
  smart_properties
36
- bigdecimal (3.1.8)
41
+ bigdecimal (3.1.9)
37
42
  builder (3.3.0)
38
- concurrent-ruby (1.3.3)
39
- connection_pool (2.4.1)
43
+ concurrent-ruby (1.3.5)
44
+ connection_pool (2.5.0)
40
45
  crass (1.0.6)
41
- diff-lcs (1.5.1)
46
+ diff-lcs (1.6.0)
42
47
  drb (2.2.1)
43
- erubi (1.13.0)
44
- i18n (1.14.5)
48
+ erubi (1.13.1)
49
+ i18n (1.14.7)
45
50
  concurrent-ruby (~> 1.0)
46
- json (2.7.2)
47
- language_server-protocol (3.17.0.3)
48
- loofah (2.23.1)
51
+ json (2.10.1)
52
+ language_server-protocol (3.17.0.4)
53
+ lint_roller (1.1.0)
54
+ logger (1.6.6)
55
+ loofah (2.24.0)
49
56
  crass (~> 1.0.2)
50
57
  nokogiri (>= 1.12.0)
51
- minitest (5.24.1)
52
- mutex_m (0.2.0)
53
- nokogiri (1.16.8-x86_64-linux)
58
+ mini_portile2 (2.8.8)
59
+ minitest (5.25.4)
60
+ mutex_m (0.3.0)
61
+ nokogiri (1.18.7)
62
+ mini_portile2 (~> 2.8.2)
54
63
  racc (~> 1.4)
55
- parallel (1.25.1)
56
- parser (3.3.4.0)
64
+ nokogiri (1.18.7-x86_64-linux-gnu)
65
+ racc (~> 1.4)
66
+ parallel (1.26.3)
67
+ parser (3.3.7.1)
57
68
  ast (~> 2.4.1)
58
69
  racc
59
- prism (0.30.0)
70
+ prism (1.3.0)
60
71
  racc (1.8.1)
61
72
  rails-dom-testing (2.2.0)
62
73
  activesupport (>= 5.0.0)
63
74
  minitest
64
75
  nokogiri (>= 1.6)
65
- rails-html-sanitizer (1.6.1)
76
+ rails-html-sanitizer (1.6.2)
66
77
  loofah (~> 2.21)
67
78
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
68
79
  rainbow (3.1.1)
69
80
  rake (13.2.1)
70
- regexp_parser (2.9.2)
71
- rexml (3.3.4)
72
- strscan
81
+ regexp_parser (2.10.0)
73
82
  rspec (3.13.0)
74
83
  rspec-core (~> 3.13.0)
75
84
  rspec-expectations (~> 3.13.0)
76
85
  rspec-mocks (~> 3.13.0)
77
- rspec-core (3.13.0)
86
+ rspec-core (3.13.3)
78
87
  rspec-support (~> 3.13.0)
79
- rspec-expectations (3.13.1)
88
+ rspec-expectations (3.13.3)
80
89
  diff-lcs (>= 1.2.0, < 2.0)
81
90
  rspec-support (~> 3.13.0)
82
- rspec-mocks (3.13.1)
91
+ rspec-mocks (3.13.2)
83
92
  diff-lcs (>= 1.2.0, < 2.0)
84
93
  rspec-support (~> 3.13.0)
85
- rspec-support (3.13.1)
86
- rubocop (1.65.1)
94
+ rspec-support (3.13.2)
95
+ rubocop (1.72.2)
87
96
  json (~> 2.3)
88
- language_server-protocol (>= 3.17.0)
97
+ language_server-protocol (~> 3.17.0.2)
98
+ lint_roller (~> 1.1.0)
89
99
  parallel (~> 1.10)
90
100
  parser (>= 3.3.0.2)
91
101
  rainbow (>= 2.2.2, < 4.0)
92
- regexp_parser (>= 2.4, < 3.0)
93
- rexml (>= 3.2.5, < 4.0)
94
- rubocop-ast (>= 1.31.1, < 2.0)
102
+ regexp_parser (>= 2.9.3, < 3.0)
103
+ rubocop-ast (>= 1.38.0, < 2.0)
95
104
  ruby-progressbar (~> 1.7)
96
- unicode-display_width (>= 2.4.0, < 3.0)
97
- rubocop-ast (1.32.0)
105
+ unicode-display_width (>= 2.4.0, < 4.0)
106
+ rubocop-ast (1.38.0)
98
107
  parser (>= 3.3.1.0)
99
- rubocop-rake (0.6.0)
100
- rubocop (~> 1.0)
101
- rubocop-rspec (3.0.4)
102
- rubocop (~> 1.61)
108
+ rubocop-rake (0.7.1)
109
+ lint_roller (~> 1.1)
110
+ rubocop (>= 1.72.1)
111
+ rubocop-rspec (3.5.0)
112
+ lint_roller (~> 1.1)
113
+ rubocop (~> 1.72, >= 1.72.1)
103
114
  ruby-progressbar (1.13.0)
104
- sevencop (0.43.1)
115
+ securerandom (0.3.2)
116
+ sevencop (0.47.0)
105
117
  activesupport
106
118
  rubocop
107
119
  smart_properties (1.17.0)
108
- strscan (3.1.0)
109
120
  tzinfo (2.0.6)
110
121
  concurrent-ruby (~> 1.0)
111
- unicode-display_width (2.5.0)
122
+ unicode-display_width (3.1.4)
123
+ unicode-emoji (~> 4.0, >= 4.0.4)
124
+ unicode-emoji (4.0.4)
112
125
 
113
126
  PLATFORMS
127
+ ruby
114
128
  x86_64-linux
115
129
 
116
130
  DEPENDENCIES
data/README.md CHANGED
@@ -24,10 +24,13 @@ Require `rubocop-erb` in your RuboCop config.
24
24
 
25
25
  ```yaml
26
26
  # .rubocop.yml
27
- require:
27
+ plugins:
28
28
  - rubocop-erb
29
29
  ```
30
30
 
31
+ > [!NOTE]
32
+ > The plugin system is supported in RuboCop 1.72+. In earlier versions, use `require` instead of `plugins`.
33
+
31
34
  Now you can use RuboCop also for ERB templates.
32
35
 
33
36
  ```
@@ -1,31 +1,36 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- rubocop-erb (0.5.5)
4
+ rubocop-erb (0.6.0)
5
5
  better_html
6
- rubocop (~> 1.45)
6
+ lint_roller (~> 1.1)
7
+ rubocop (~> 1.72, >= 1.72.1)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- actionview (7.1.2)
12
- activesupport (= 7.1.2)
12
+ actionview (7.1.5.1)
13
+ activesupport (= 7.1.5.1)
13
14
  builder (~> 3.1)
14
15
  erubi (~> 1.11)
15
16
  rails-dom-testing (~> 2.2)
16
17
  rails-html-sanitizer (~> 1.6)
17
- activesupport (7.1.2)
18
+ activesupport (7.1.5.1)
18
19
  base64
20
+ benchmark (>= 0.3)
19
21
  bigdecimal
20
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
21
23
  connection_pool (>= 2.2.5)
22
24
  drb
23
25
  i18n (>= 1.6, < 2)
26
+ logger (>= 1.4.2)
24
27
  minitest (>= 5.1)
25
28
  mutex_m
29
+ securerandom (>= 0.3)
26
30
  tzinfo (~> 2.0)
27
31
  ast (2.4.2)
28
32
  base64 (0.2.0)
33
+ benchmark (0.4.0)
29
34
  better_html (2.0.2)
30
35
  actionview (>= 6.0)
31
36
  activesupport (>= 6.0)
@@ -33,91 +38,92 @@ GEM
33
38
  erubi (~> 1.4)
34
39
  parser (>= 2.4)
35
40
  smart_properties
36
- bigdecimal (3.1.5)
41
+ bigdecimal (3.1.9)
37
42
  builder (3.3.0)
38
- concurrent-ruby (1.2.2)
39
- connection_pool (2.4.1)
43
+ concurrent-ruby (1.3.5)
44
+ connection_pool (2.5.0)
40
45
  crass (1.0.6)
41
- diff-lcs (1.5.0)
42
- drb (2.2.0)
43
- ruby2_keywords
44
- erubi (1.13.0)
45
- i18n (1.14.1)
46
+ diff-lcs (1.6.0)
47
+ drb (2.2.1)
48
+ erubi (1.13.1)
49
+ i18n (1.14.7)
46
50
  concurrent-ruby (~> 1.0)
47
- json (2.7.1)
48
- language_server-protocol (3.17.0.3)
49
- loofah (2.22.0)
51
+ json (2.10.1)
52
+ language_server-protocol (3.17.0.4)
53
+ lint_roller (1.1.0)
54
+ logger (1.6.6)
55
+ loofah (2.24.0)
50
56
  crass (~> 1.0.2)
51
57
  nokogiri (>= 1.12.0)
52
- mini_portile2 (2.8.7)
53
- minitest (5.20.0)
54
- mutex_m (0.2.0)
55
- nokogiri (1.15.5)
58
+ mini_portile2 (2.8.8)
59
+ minitest (5.25.4)
60
+ mutex_m (0.3.0)
61
+ nokogiri (1.15.7)
56
62
  mini_portile2 (~> 2.8.2)
57
63
  racc (~> 1.4)
58
- parallel (1.24.0)
59
- parser (3.3.0.2)
64
+ nokogiri (1.15.7-x86_64-linux)
65
+ racc (~> 1.4)
66
+ parallel (1.26.3)
67
+ parser (3.3.7.1)
60
68
  ast (~> 2.4.1)
61
69
  racc
62
- racc (1.7.3)
70
+ racc (1.8.1)
63
71
  rails-dom-testing (2.2.0)
64
72
  activesupport (>= 5.0.0)
65
73
  minitest
66
74
  nokogiri (>= 1.6)
67
- rails-html-sanitizer (1.6.0)
75
+ rails-html-sanitizer (1.6.2)
68
76
  loofah (~> 2.21)
69
- nokogiri (~> 1.14)
77
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
70
78
  rainbow (3.1.1)
71
- rake (13.1.0)
72
- regexp_parser (2.8.3)
73
- rexml (3.2.6)
74
- rspec (3.12.0)
75
- rspec-core (~> 3.12.0)
76
- rspec-expectations (~> 3.12.0)
77
- rspec-mocks (~> 3.12.0)
78
- rspec-core (3.12.2)
79
- rspec-support (~> 3.12.0)
80
- rspec-expectations (3.12.3)
79
+ rake (13.2.1)
80
+ regexp_parser (2.10.0)
81
+ rspec (3.13.0)
82
+ rspec-core (~> 3.13.0)
83
+ rspec-expectations (~> 3.13.0)
84
+ rspec-mocks (~> 3.13.0)
85
+ rspec-core (3.13.3)
86
+ rspec-support (~> 3.13.0)
87
+ rspec-expectations (3.13.3)
81
88
  diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.12.0)
83
- rspec-mocks (3.12.6)
89
+ rspec-support (~> 3.13.0)
90
+ rspec-mocks (3.13.2)
84
91
  diff-lcs (>= 1.2.0, < 2.0)
85
- rspec-support (~> 3.12.0)
86
- rspec-support (3.12.1)
87
- rubocop (1.59.0)
92
+ rspec-support (~> 3.13.0)
93
+ rspec-support (3.13.2)
94
+ rubocop (1.72.2)
88
95
  json (~> 2.3)
89
- language_server-protocol (>= 3.17.0)
96
+ language_server-protocol (~> 3.17.0.2)
97
+ lint_roller (~> 1.1.0)
90
98
  parallel (~> 1.10)
91
- parser (>= 3.2.2.4)
99
+ parser (>= 3.3.0.2)
92
100
  rainbow (>= 2.2.2, < 4.0)
93
- regexp_parser (>= 1.8, < 3.0)
94
- rexml (>= 3.2.5, < 4.0)
95
- rubocop-ast (>= 1.30.0, < 2.0)
101
+ regexp_parser (>= 2.9.3, < 3.0)
102
+ rubocop-ast (>= 1.38.0, < 2.0)
96
103
  ruby-progressbar (~> 1.7)
97
- unicode-display_width (>= 2.4.0, < 3.0)
98
- rubocop-ast (1.30.0)
99
- parser (>= 3.2.1.0)
100
- rubocop-capybara (2.20.0)
101
- rubocop (~> 1.41)
102
- rubocop-factory_bot (2.25.1)
103
- rubocop (~> 1.41)
104
- rubocop-rake (0.6.0)
105
- rubocop (~> 1.0)
106
- rubocop-rspec (2.26.1)
107
- rubocop (~> 1.40)
108
- rubocop-capybara (~> 2.17)
109
- rubocop-factory_bot (~> 2.22)
104
+ unicode-display_width (>= 2.4.0, < 4.0)
105
+ rubocop-ast (1.38.0)
106
+ parser (>= 3.3.1.0)
107
+ rubocop-rake (0.7.1)
108
+ lint_roller (~> 1.1)
109
+ rubocop (>= 1.72.1)
110
+ rubocop-rspec (3.5.0)
111
+ lint_roller (~> 1.1)
112
+ rubocop (~> 1.72, >= 1.72.1)
110
113
  ruby-progressbar (1.13.0)
111
- ruby2_keywords (0.0.5)
112
- sevencop (0.35.1)
114
+ securerandom (0.3.2)
115
+ sevencop (0.47.0)
113
116
  activesupport
114
117
  rubocop
115
118
  smart_properties (1.17.0)
116
119
  tzinfo (2.0.6)
117
120
  concurrent-ruby (~> 1.0)
118
- unicode-display_width (2.5.0)
121
+ unicode-display_width (3.1.4)
122
+ unicode-emoji (~> 4.0, >= 4.0.4)
123
+ unicode-emoji (4.0.4)
119
124
 
120
125
  PLATFORMS
126
+ ruby
121
127
  x86_64-linux
122
128
 
123
129
  DEPENDENCIES
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'lint_roller'
4
+
5
+ module RuboCop
6
+ module Erb
7
+ # A plugin that integrates rubocop-erb with RuboCop's plugin system.
8
+ class Plugin < LintRoller::Plugin
9
+ def about
10
+ LintRoller::About.new(
11
+ description: 'RuboCop plugin for ERB template.',
12
+ homepage: 'https://github.com/r7kamura/rubocop-erb',
13
+ name: 'rubocop-erb',
14
+ version: VERSION
15
+ )
16
+ end
17
+
18
+ def rules(_context)
19
+ RuboCop::Runner.ruby_extractors.unshift(RuboCop::Erb::RubyExtractor)
20
+
21
+ LintRoller::Rules.new(
22
+ config_format: :rubocop,
23
+ type: :path,
24
+ value: Pathname.new(__dir__).join('../../../config/default.yml')
25
+ )
26
+ end
27
+
28
+ def supported?(context)
29
+ context.engine == :rubocop
30
+ end
31
+ end
32
+ end
33
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Erb
5
- VERSION = '0.5.5'
5
+ VERSION = '0.6.0'
6
6
  end
7
7
  end
data/lib/rubocop/erb.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Erb
5
- autoload :ConfigLoader, 'rubocop/erb/config_loader'
6
5
  autoload :KeywordRemover, 'rubocop/erb/keyword_remover'
7
6
  autoload :ProcessedSourceBuilder, 'rubocop/erb/processed_source_builder'
8
7
  autoload :RubyClip, 'rubocop/erb/ruby_clip'
@@ -11,5 +10,5 @@ module RuboCop
11
10
  end
12
11
  end
13
12
 
14
- require_relative 'erb/rubocop_extension'
13
+ require_relative 'erb/plugin'
15
14
  require_relative 'erb/version'
data/rubocop-erb.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::Erb::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.
@@ -29,5 +30,6 @@ Gem::Specification.new do |spec|
29
30
  spec.require_paths = ['lib']
30
31
 
31
32
  spec.add_dependency 'better_html'
32
- spec.add_dependency 'rubocop', '~> 1.45'
33
+ spec.add_dependency 'lint_roller', '~> 1.1'
34
+ spec.add_dependency 'rubocop', '~> 1.72', '>= 1.72.1'
33
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.6.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-12-03 00:00:00.000000000 Z
11
+ date: 2025-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_html
@@ -24,20 +24,40 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: lint_roller
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rubocop
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '1.45'
47
+ version: '1.72'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 1.72.1
34
51
  type: :runtime
35
52
  prerelease: false
36
53
  version_requirements: !ruby/object:Gem::Requirement
37
54
  requirements:
38
55
  - - "~>"
39
56
  - !ruby/object:Gem::Version
40
- version: '1.45'
57
+ version: '1.72'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 1.72.1
41
61
  description:
42
62
  email:
43
63
  - r7kamura@gmail.com
@@ -57,10 +77,9 @@ files:
57
77
  - gemfiles/ruby_2.7.gemfile
58
78
  - gemfiles/ruby_2.7.gemfile.lock
59
79
  - lib/rubocop/erb.rb
60
- - lib/rubocop/erb/config_loader.rb
61
80
  - lib/rubocop/erb/keyword_remover.rb
81
+ - lib/rubocop/erb/plugin.rb
62
82
  - lib/rubocop/erb/processed_source_builder.rb
63
- - lib/rubocop/erb/rubocop_extension.rb
64
83
  - lib/rubocop/erb/ruby_clip.rb
65
84
  - lib/rubocop/erb/ruby_extractor.rb
66
85
  - lib/rubocop/erb/version.rb
@@ -73,6 +92,7 @@ metadata:
73
92
  homepage_uri: https://github.com/r7kamura/rubocop-erb
74
93
  source_code_uri: https://github.com/r7kamura/rubocop-erb
75
94
  changelog_uri: https://github.com/r7kamura/rubocop-erb/releases
95
+ default_lint_roller_plugin: RuboCop::Erb::Plugin
76
96
  post_install_message:
77
97
  rdoc_options: []
78
98
  require_paths:
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rubocop'
4
-
5
- module RuboCop
6
- module Erb
7
- # Merge default RuboCop config with plugin config.
8
- class ConfigLoader
9
- PLUGIN_CONFIG_PATH = ::File.expand_path(
10
- '../../../config/default.yml',
11
- __dir__
12
- )
13
-
14
- class << self
15
- # @return [RuboCop::Config]
16
- def call
17
- new.call
18
- end
19
- end
20
-
21
- # @return [RuboCop::Config]
22
- def call
23
- RuboCop::ConfigLoader.merge_with_default(
24
- plugin_config,
25
- PLUGIN_CONFIG_PATH
26
- )
27
- end
28
-
29
- private
30
-
31
- # @return [RuboCop::Config]
32
- def plugin_config
33
- config = ::RuboCop::Config.new(
34
- plugin_config_hash,
35
- PLUGIN_CONFIG_PATH
36
- )
37
- config.make_excludes_absolute
38
- config
39
- end
40
-
41
- # @return [Hash]
42
- def plugin_config_hash
43
- ::RuboCop::ConfigLoader.send(
44
- :load_yaml_configuration,
45
- PLUGIN_CONFIG_PATH
46
- )
47
- end
48
- end
49
- end
50
- end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rubocop'
4
-
5
- RuboCop::Runner.ruby_extractors.unshift(RuboCop::Erb::RubyExtractor)
6
-
7
- RuboCop::ConfigLoader.instance_variable_set(
8
- :@default_configuration,
9
- RuboCop::Erb::ConfigLoader.call
10
- )