mad_rubocop 4.0.0 → 4.2.0.pre1

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: bf7bced8d0ebaa1472e9dbccd826a2fcf40801a72652aa26386e3495ae6bb432
4
- data.tar.gz: b100ed6a2e464c4b79f110981cd738b37234d7dd1a8a42bd797a49d9f4a3cb1b
3
+ metadata.gz: 930cb2fd32ca469737626bc9a0887cc7bc360132a6f02fe64e7e1aea98385385
4
+ data.tar.gz: 6f128330fb5aec401bb769c396a96e649b33a4a131ca9b55111e83c66d24f019
5
5
  SHA512:
6
- metadata.gz: f4b7174f6e2c7f4335333f8a4576c569a07b5d44daf52783fd29c4ffe57312cde91c2e4ec95953f7149353571b10d1caf6d962f62f5431fa58de6ab84120338c
7
- data.tar.gz: 06aeb4da3f1fa3cb6344ad2abeb450b2b7a5a3cef214e5754d82e54208f279e8a1f05e888df770e9e4cd53b9db34cbdae02d23a155b14e52500ac69957d605f2
6
+ metadata.gz: e28373a1d905f847cf3a621ea2531b91bd8f334cc3dbfd22844d8516d1148c8631635961ffb961661b0fb02ca844924c31562c7fa178a8e7255f0b590e679882
7
+ data.tar.gz: a6ac66cfa032a3ffa71bc401831895e0534fededd581278808101a532f387189629a13edf859303d64c06ced496e56e18be38ae8b1797603d386389240336d53
@@ -0,0 +1,33 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ jobs:
9
+ spec:
10
+ name: spec (${{ matrix.ruby }})
11
+ runs-on: ubuntu-latest
12
+ continue-on-error: ${{ matrix.experimental || false }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby:
17
+ - "3.1"
18
+ - "3.4"
19
+ - "jruby-9.4"
20
+ - "jruby-10.0"
21
+ include:
22
+ # Bleeding-edge runtime: exercised, but allowed to fail so a
23
+ # not-yet-released or in-flight toolchain never blocks a PR.
24
+ - ruby: "4.0"
25
+ experimental: true
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ bundler-cache: true
32
+ - name: Run specs
33
+ run: bundle exec rake spec
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --require spec_helper
2
+ --format documentation
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rails
3
3
  - rubocop-performance
4
4
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.1
1
+ 3.4.8
data/README.md CHANGED
@@ -1,8 +1,18 @@
1
- [![Dependency Status](https://gemnasium.com/mxenabled/mad_rubocop.svg)](https://gemnasium.com/mxenabled/mad_rubocop)
2
-
3
1
  # MadRubocop
4
2
 
5
- Custom RuboCop yml files to modify the cops enforced by RuboCop.
3
+ [![CI](https://github.com/mxenabled/mad_rubocop/actions/workflows/ci.yml/badge.svg)](https://github.com/mxenabled/mad_rubocop/actions/workflows/ci.yml)
4
+
5
+ Custom RuboCop yml files to modify the cops enforced by RuboCop, shared across projects.
6
+
7
+ Built on RuboCop `~> 1.88`, rubocop-rails `~> 2.35`, and rubocop-performance `~> 1.26`. Requires Ruby `>= 3.1`.
8
+
9
+ ## What's in the box
10
+
11
+ This gem ships configuration only — no Ruby code. Consumers inherit three files:
12
+
13
+ - `.rubocop.yml` — the entry point. Loads the `rubocop-rails` and `rubocop-performance` plugins, inherits the two files below, and sets `AllCops` defaults (`NewCops: disable`, so cops added in a RuboCop upgrade stay off until explicitly enabled here).
14
+ - `lib/disabled_cops.yml` — cops turned off, either as permanent house style or because the codebase isn't ready for them.
15
+ - `lib/modified_cops.yml` — cops kept on but configured to a non-default style (e.g. `hash_rockets`, `double_quotes`, outdented access modifiers).
6
16
 
7
17
  ## Installation
8
18
 
@@ -27,15 +37,28 @@ inherit_gem:
27
37
  mad_rubocop: .rubocop.yml
28
38
  ```
29
39
 
30
- NOTE: The `Exlude` setting on cops that only ignore certain files or directories cannot be set by MadRubocop.
40
+ NOTE: The `Exclude` setting on cops that only ignore certain files or directories cannot be set by MadRubocop.
31
41
 
32
42
 
33
43
  ## Development
34
44
 
35
45
  After checking out the repo, run `bin/setup` to install dependencies.
36
46
 
47
+ Run the test suite with `bundle exec rake spec`. The specs validate the shipped configuration against the installed RuboCop — they confirm the config loads, the rubocop-rails and rubocop-performance plugins are present, and every referenced cop still exists (catching cops that a RuboCop upgrade renames or removes).
48
+
37
49
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
50
 
51
+ ### Upgrading RuboCop
52
+
53
+ Keeping the pinned RuboCop (and its plugins) current is the main maintenance task. The workflow:
54
+
55
+ 1. Bump the version constraints for `rubocop`, `rubocop-rails`, and/or `rubocop-performance` in `mad_rubocop.gemspec`.
56
+ 2. Run `bundle update rubocop rubocop-rails rubocop-performance`.
57
+ 3. Run `bundle exec rake spec`. The suite fails if the config references a cop that the new RuboCop **renamed or removed** — the failure message names the offending cop.
58
+ 4. For each failure, update the cop name in `lib/disabled_cops.yml` / `lib/modified_cops.yml` (or drop it if the cop no longer exists).
59
+ 5. Because `NewCops` is disabled, cops **added** in the upgrade are off by default. Review `rubocop --show-cops` (or the release notes) and add any you want to disable/configure.
60
+ 6. Bump `MadRubocop::VERSION` in `version.rb`, note the change, and release.
61
+
39
62
  ## Contributing
40
63
 
41
64
  Bug reports and pull requests are welcome on GitHub at https://github.com/mxenabled/mad_rubocop.
data/Rakefile CHANGED
@@ -1 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -113,7 +113,7 @@ Naming/HeredocDelimiterCase:
113
113
  Enabled: false
114
114
  Naming/MemoizedInstanceVariableName:
115
115
  Enabled: false
116
- Naming/PredicateName:
116
+ Naming/PredicatePrefix:
117
117
  Enabled: false
118
118
  Naming/MethodParameterName:
119
119
  Enabled: false
@@ -1,3 +1,3 @@
1
1
  module MadRubocop
2
- VERSION = "4.0.0"
2
+ VERSION = "4.2.0.pre1"
3
3
  end
data/mad_rubocop.gemspec CHANGED
@@ -20,9 +20,12 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_dependency "rubocop", "~> 1.32.0"
24
- spec.add_dependency "rubocop-performance", "~> 1.14.3"
25
- spec.add_dependency "rubocop-rails", "~> 2.15.2"
23
+ spec.required_ruby_version = ">= 3.1"
24
+
25
+ spec.add_dependency "rubocop", "~> 1.88.0"
26
+ spec.add_dependency "rubocop-performance", "~> 1.26.1"
27
+ spec.add_dependency "rubocop-rails", "~> 2.35.5"
26
28
  spec.add_development_dependency "bundler", "~> 2.0"
27
29
  spec.add_development_dependency "rake"
30
+ spec.add_development_dependency "rspec", "~> 3.0"
28
31
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mad_rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.2.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Toolson
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-10-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rubocop
@@ -16,42 +15,42 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 1.32.0
18
+ version: 1.88.0
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: 1.32.0
25
+ version: 1.88.0
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rubocop-performance
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: 1.14.3
32
+ version: 1.26.1
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: 1.14.3
39
+ version: 1.26.1
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: rubocop-rails
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: 2.15.2
46
+ version: 2.35.5
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
- version: 2.15.2
53
+ version: 2.35.5
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: bundler
57
56
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +79,20 @@ dependencies:
80
79
  - - ">="
81
80
  - !ruby/object:Gem::Version
82
81
  version: '0'
82
+ - !ruby/object:Gem::Dependency
83
+ name: rspec
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '3.0'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '3.0'
83
96
  description: Wrapper for MX specific RuboCop settings for managing custom settings
84
97
  across many projects.
85
98
  email:
@@ -89,7 +102,9 @@ executables:
89
102
  extensions: []
90
103
  extra_rdoc_files: []
91
104
  files:
105
+ - ".github/workflows/ci.yml"
92
106
  - ".gitignore"
107
+ - ".rspec"
93
108
  - ".rubocop.yml"
94
109
  - ".ruby-version"
95
110
  - Gemfile
@@ -106,7 +121,6 @@ homepage: https://github.com/mxenabled/mad_rubocop
106
121
  licenses:
107
122
  - MIT
108
123
  metadata: {}
109
- post_install_message:
110
124
  rdoc_options: []
111
125
  require_paths:
112
126
  - lib
@@ -114,15 +128,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - ">="
116
130
  - !ruby/object:Gem::Version
117
- version: '0'
131
+ version: '3.1'
118
132
  required_rubygems_version: !ruby/object:Gem::Requirement
119
133
  requirements:
120
134
  - - ">="
121
135
  - !ruby/object:Gem::Version
122
136
  version: '0'
123
137
  requirements: []
124
- rubygems_version: 3.3.7
125
- signing_key:
138
+ rubygems_version: 3.6.9
126
139
  specification_version: 4
127
140
  summary: Wrapper for MX specific RuboCop settings. https://twitter.com/madrubocop
128
141
  test_files: []