rubocop-cargosense 4.0.0 → 5.1.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: fdb8c9e0d9dc008c27ab21a7b3245d5b19fe86b2c70e93331f9e96e155119d16
4
- data.tar.gz: 76348e8ef6a212f5cae80ea60932e8feeb08368ee85bf9ad9bb6e0342cc6d6f6
3
+ metadata.gz: 47e427564924c7169b02c46366aa450d0f31e9dcbba8be805d544f452dd7fe91
4
+ data.tar.gz: 7620979cada542c525021ac06b21822bb4418d640d8bb253655d0079b283e07a
5
5
  SHA512:
6
- metadata.gz: a06c36046a17a7bd3885327da40befdeb43b50d81050a50f89cafbef3bd2630ff6b106f3c3ac45b3278684c5112805b4cc7cd57b08eb37e12dfba6064a782803
7
- data.tar.gz: 7780994fca4779b0991fea24e662ba82ff42bf07b579a45d0f85c8f91d399e6491a54761b20cedd0be969b5d69f0503755cf93f55b5c09ebd56594f8e40178b6
6
+ metadata.gz: 81e5117301f394394f1ae32a8a587adad525c16e6ed20dd86a6d80486e993443f136a72cd48a9cd6b8c86ac6c1844a070bdd96b9d490c7cef8e611ca480d3639
7
+ data.tar.gz: be4f79a1d681207f894a355381c44219a6ac8e144a3b0d7be1d4aa049ad80e4775b8afd2ef378c6401afec7d50970b0f769d8e3b74eadecf8479b77b490ba061
data/README.md CHANGED
@@ -16,16 +16,16 @@ gem "rubocop-cargosense", require: false
16
16
 
17
17
  ## Usage
18
18
 
19
- Include rubocop-cargosense in your project's `.rubocop.yml` using [RuboCop's `require` directive](https://docs.rubocop.org/rubocop/extensions.html#loading-extensions):
19
+ Include rubocop-cargosense in your project's `.rubocop.yml` using [RuboCop's `plugins` directive](https://docs.rubocop.org/rubocop/extensions.html#loading-extensions):
20
20
 
21
21
  ```yaml
22
22
  # .rubocop.yml
23
- require:
23
+ plugins:
24
24
  - rubocop-cargosense
25
25
  ```
26
26
 
27
27
  > [!TIP]
28
- > If rubocop-cargosense is your project's only RuboCop extension, you can simplify the above directive: `require: rubocop-cargosense`
28
+ > If rubocop-cargosense is your project's only RuboCop extension, you can simplify the above directive: `plugins: rubocop-cargosense`
29
29
 
30
30
  Or, inherit rubocop-cargosense's default configuration using [RuboCop's `inherit_gem` directive](https://docs.rubocop.org/rubocop/configuration.html#inheriting-configuration-from-a-dependency-gem):
31
31
 
@@ -5,4 +5,4 @@
5
5
  # @see https://docs.rubocop.org/rubocop-factory_bot
6
6
  # @see https://github.com/rubocop/rubocop-factory_bot
7
7
 
8
- require: rubocop-factory_bot
8
+ plugins: rubocop-factory_bot
@@ -5,7 +5,7 @@
5
5
  # @see https://docs.rubocop.org/rubocop-performance
6
6
  # @see https://github.com/rubocop/rubocop-performance
7
7
 
8
- require: rubocop-performance
8
+ plugins: rubocop-performance
9
9
 
10
10
  Performance/ChainArrayAllocation:
11
11
  Enabled: true
@@ -5,7 +5,7 @@
5
5
  # @see https://docs.rubocop.org/rubocop-rails
6
6
  # @see https://github.com/rubocop/rubocop-rails
7
7
 
8
- require: rubocop-rails
8
+ plugins: rubocop-rails
9
9
 
10
10
  Rails/DefaultScope:
11
11
  Enabled: true
@@ -3,4 +3,4 @@
3
3
  # @see https://rubygems.org/gems/rubocop-rake
4
4
  # @see https://github.com/rubocop/rubocop-rake
5
5
 
6
- require: rubocop-rake
6
+ plugins: rubocop-rake
@@ -5,7 +5,7 @@
5
5
  # @see https://docs.rubocop.org/rubocop-rspec
6
6
  # @see https://github.com/rubocop/rubocop-rspec
7
7
 
8
- require: rubocop-rspec
8
+ plugins: rubocop-rspec
9
9
 
10
10
  RSpec/DescribedClassModuleWrapping:
11
11
  Enabled: true
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lint_roller"
4
+
5
+ module RuboCop
6
+ module CargoSense
7
+ class Plugin < LintRoller::Plugin
8
+ def about
9
+ LintRoller::About.new(
10
+ name: NAME,
11
+ version: VERSION,
12
+ homepage: HOMEPAGE,
13
+ description: DESCRIPTION
14
+ )
15
+ end
16
+
17
+ def rules(_context)
18
+ LintRoller::Rules.new(
19
+ type: :path,
20
+ config_format: :rubocop,
21
+ value: Pathname.new(__dir__).join("../../../config/default.yml")
22
+ )
23
+ end
24
+
25
+ def supported?(context)
26
+ context.engine == :rubocop
27
+ end
28
+ end
29
+ end
30
+ end
@@ -2,10 +2,9 @@
2
2
 
3
3
  module RuboCop
4
4
  module CargoSense
5
- PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
6
- CONFIG_DEFAULT = PROJECT_ROOT.join("config", "default.yml").freeze
7
- CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
8
-
9
- private_constant :CONFIG_DEFAULT, :PROJECT_ROOT
5
+ NAME = "rubocop-cargosense"
6
+ VERSION = "5.1.0"
7
+ HOMEPAGE = "https://github.com/CargoSense/rubocop-cargosense"
8
+ DESCRIPTION = "Reusable RuboCop configuration for CargoSense's Ruby projects."
10
9
  end
11
10
  end
@@ -1,10 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rubocop"
4
- require "rubocop-performance"
5
- require "rubocop-rake"
6
4
 
7
5
  require_relative "rubocop/cargosense"
8
- require_relative "rubocop/cargosense/inject"
9
-
10
- RuboCop::CargoSense::Inject.defaults!
6
+ require_relative "rubocop/cargosense/plugin"
metadata CHANGED
@@ -1,29 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-cargosense
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CargoSense
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-06 00:00:00.000000000 Z
11
+ date: 2025-03-06 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: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
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.64'
33
+ version: '1.72'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 1.72.2
20
37
  type: :runtime
21
38
  prerelease: false
22
39
  version_requirements: !ruby/object:Gem::Requirement
23
40
  requirements:
24
41
  - - "~>"
25
42
  - !ruby/object:Gem::Version
26
- version: '1.64'
43
+ version: '1.72'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.72.2
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: rubocop-capybara
29
49
  requirement: !ruby/object:Gem::Requirement
@@ -44,82 +64,76 @@ dependencies:
44
64
  requirements:
45
65
  - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: '2.26'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 2.26.1
67
+ version: '2.27'
51
68
  type: :runtime
52
69
  prerelease: false
53
70
  version_requirements: !ruby/object:Gem::Requirement
54
71
  requirements:
55
72
  - - "~>"
56
73
  - !ruby/object:Gem::Version
57
- version: '2.26'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 2.26.1
74
+ version: '2.27'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: rubocop-performance
63
77
  requirement: !ruby/object:Gem::Requirement
64
78
  requirements:
65
79
  - - "~>"
66
80
  - !ruby/object:Gem::Version
67
- version: '1.20'
81
+ version: '1.24'
68
82
  type: :runtime
69
83
  prerelease: false
70
84
  version_requirements: !ruby/object:Gem::Requirement
71
85
  requirements:
72
86
  - - "~>"
73
87
  - !ruby/object:Gem::Version
74
- version: '1.20'
88
+ version: '1.24'
75
89
  - !ruby/object:Gem::Dependency
76
90
  name: rubocop-rails
77
91
  requirement: !ruby/object:Gem::Requirement
78
92
  requirements:
79
93
  - - "~>"
80
94
  - !ruby/object:Gem::Version
81
- version: '2.23'
95
+ version: '2.30'
82
96
  type: :runtime
83
97
  prerelease: false
84
98
  version_requirements: !ruby/object:Gem::Requirement
85
99
  requirements:
86
100
  - - "~>"
87
101
  - !ruby/object:Gem::Version
88
- version: '2.23'
102
+ version: '2.30'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: rubocop-rake
91
105
  requirement: !ruby/object:Gem::Requirement
92
106
  requirements:
93
107
  - - "~>"
94
108
  - !ruby/object:Gem::Version
95
- version: '0.6'
109
+ version: '0.7'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 0.7.1
96
113
  type: :runtime
97
114
  prerelease: false
98
115
  version_requirements: !ruby/object:Gem::Requirement
99
116
  requirements:
100
117
  - - "~>"
101
118
  - !ruby/object:Gem::Version
102
- version: '0.6'
119
+ version: '0.7'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 0.7.1
103
123
  - !ruby/object:Gem::Dependency
104
124
  name: rubocop-rspec
105
125
  requirement: !ruby/object:Gem::Requirement
106
126
  requirements:
107
127
  - - "~>"
108
128
  - !ruby/object:Gem::Version
109
- version: '3.0'
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: 3.0.1
129
+ version: '3.5'
113
130
  type: :runtime
114
131
  prerelease: false
115
132
  version_requirements: !ruby/object:Gem::Requirement
116
133
  requirements:
117
134
  - - "~>"
118
135
  - !ruby/object:Gem::Version
119
- version: '3.0'
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: 3.0.1
136
+ version: '3.5'
123
137
  - !ruby/object:Gem::Dependency
124
138
  name: rubocop-rspec_rails
125
139
  requirement: !ruby/object:Gem::Requirement
@@ -159,15 +173,16 @@ files:
159
173
  - config/rubocop.yml
160
174
  - lib/rubocop-cargosense.rb
161
175
  - lib/rubocop/cargosense.rb
162
- - lib/rubocop/cargosense/inject.rb
176
+ - lib/rubocop/cargosense/plugin.rb
163
177
  homepage: https://github.com/CargoSense/rubocop-cargosense
164
178
  licenses:
165
179
  - MIT
166
180
  metadata:
167
181
  bug_tracker_uri: https://github.com/CargoSense/rubocop-cargosense/issues
168
182
  changelog_uri: https://github.com/CargoSense/rubocop-cargosense/releases
183
+ default_lint_roller_plugin: RuboCop::CargoSense::Plugin
169
184
  rubygems_mfa_required: 'true'
170
- source_code_uri: https://github.com/CargoSense/rubocop-cargosense/tree/v4.0.0
185
+ source_code_uri: https://github.com/CargoSense/rubocop-cargosense/tree/v5.1.0
171
186
  post_install_message:
172
187
  rdoc_options: []
173
188
  require_paths:
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module CargoSense
5
- module Inject
6
- def self.defaults!
7
- path = CONFIG_DEFAULT.to_s
8
- hash = ConfigLoader.load_file(path)
9
- config = Config.new(hash, path).tap(&:make_excludes_absolute)
10
- puts "configuration from #{path}" if ConfigLoader.debug?
11
- config = ConfigLoader.merge_with_default(config, path, unset_nil: false)
12
- ConfigLoader.instance_variable_set(:@default_configuration, config)
13
- end
14
- end
15
- end
16
- end