mad_rubocop 4.1.0.rc1 → 4.2.1
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 +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +44 -0
- data/README.md +27 -4
- data/lib/disabled_cops.yml +1 -1
- data/lib/mad_rubocop/version.rb +1 -1
- metadata +19 -25
- data/.gitignore +0 -9
- data/.ruby-version +0 -1
- data/Gemfile +0 -4
- data/Rakefile +0 -1
- data/bin/setup +0 -8
- data/mad_rubocop.gemspec +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0cb24e0770cc84448638789aa52ee1bb68fe03f15e8383e0f2bfe5f3076034f
|
|
4
|
+
data.tar.gz: 685fdcbf11c888af8d9f045d4e99f7fcd8a8f621409dc0a4b4e82340cfc36461
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa916708acfdb7c363bc3aff3b694781e95d790162c5c7807e1c3056328461887fd494ee3f9d9d0aa6590f19af9110bfceecb0f8f12cac1b23d2bb8eb3daf4eb
|
|
7
|
+
data.tar.gz: 617b280fb10e1b6207a55e4714ea2aef43fb0fab5cf866e4f799a62b969e6bf5a5aa630fd3db0a34d043a2ac7411e276fe895bd418b1c48e99fe1e9b9e2715c7
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
|
|
7
|
+
## [4.2.1] - 2026-09-25
|
|
8
|
+
|
|
9
|
+
### Breaking
|
|
10
|
+
|
|
11
|
+
- Require Ruby `>= 3.1`. Ruby 2.7 and 3.0 are no longer supported.
|
|
12
|
+
- Require RuboCop `~> 1.91.0`, rubocop-rails `~> 2.38.0`, and rubocop-performance `~> 1.27.0`.
|
|
13
|
+
Consumers that pin an older RuboCop must upgrade it to use this release.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Load rubocop-rails and rubocop-performance with `plugins:` instead of `require:`.
|
|
18
|
+
- Rename `Naming/PredicateName` to `Naming/PredicatePrefix` in `disabled_cops.yml`
|
|
19
|
+
(renamed in RuboCop 1.88).
|
|
20
|
+
- The gem no longer installs a `setup` executable, and packages only the shipped
|
|
21
|
+
configuration, `README.md`, `CHANGELOG.md`, and `LICENSE.txt`.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Specs that load the configuration and fail when it references a renamed or removed cop.
|
|
26
|
+
- CI on CRuby 3.1, 3.4, and 4.0, JRuby 9.4, and JRuby 10.0.
|
|
27
|
+
|
|
28
|
+
## [4.2.0.pre1] - 2026-07-20
|
|
29
|
+
|
|
30
|
+
- Prerelease for RuboCop 1.88 support. Superseded by 4.2.1.
|
|
31
|
+
|
|
32
|
+
## [4.1.0.rc1] - 2025-04-17
|
|
33
|
+
|
|
34
|
+
- Release candidate: RuboCop `~> 1.75`, rubocop-performance `~> 1.25`, rubocop-rails `~> 2.31`,
|
|
35
|
+
Ruby `>= 2.7.0`. Superseded by 4.2.1.
|
|
36
|
+
|
|
37
|
+
## [4.0.0] - 2022-10-21
|
|
38
|
+
|
|
39
|
+
- RuboCop `~> 1.32.0`, rubocop-performance `~> 1.14.3`, rubocop-rails `~> 2.15.2`.
|
|
40
|
+
|
|
41
|
+
[4.2.1]: https://github.com/mxenabled/mad_rubocop/compare/v4.2.0.pre1...v4.2.1
|
|
42
|
+
[4.2.0.pre1]: https://github.com/mxenabled/mad_rubocop/compare/v4.1.0.rc1...v4.2.0.pre1
|
|
43
|
+
[4.1.0.rc1]: https://github.com/mxenabled/mad_rubocop/compare/v4.0.0...v4.1.0.rc1
|
|
44
|
+
[4.0.0]: https://github.com/mxenabled/mad_rubocop/compare/v3.64.0...v4.0.0
|
data/README.md
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
[](https://gemnasium.com/mxenabled/mad_rubocop)
|
|
2
|
-
|
|
3
1
|
# MadRubocop
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
[](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, rubocop-rails, and rubocop-performance. [`mad_rubocop.gemspec`](mad_rubocop.gemspec) pins their versions and the minimum Ruby; [`CHANGELOG.md`](CHANGELOG.md) records the changes in each release.
|
|
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 `
|
|
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`, add an entry to `CHANGELOG.md`, 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/lib/disabled_cops.yml
CHANGED
data/lib/mad_rubocop/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mad_rubocop
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1
|
|
4
|
+
version: 4.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zach Toolson
|
|
@@ -15,92 +15,86 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 1.91.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
25
|
+
version: 1.91.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: rubocop-performance
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
32
|
+
version: 1.27.0
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version:
|
|
39
|
+
version: 1.27.0
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: rubocop-rails
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
|
44
44
|
- - "~>"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
46
|
+
version: 2.38.0
|
|
47
47
|
type: :runtime
|
|
48
48
|
prerelease: false
|
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version:
|
|
53
|
+
version: 2.38.0
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
|
-
name:
|
|
55
|
+
name: rake
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '
|
|
60
|
+
version: '13.0'
|
|
61
61
|
type: :development
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '
|
|
67
|
+
version: '13.0'
|
|
68
68
|
- !ruby/object:Gem::Dependency
|
|
69
|
-
name:
|
|
69
|
+
name: rspec
|
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements:
|
|
72
|
-
- - "
|
|
72
|
+
- - "~>"
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '0'
|
|
74
|
+
version: '3.0'
|
|
75
75
|
type: :development
|
|
76
76
|
prerelease: false
|
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
|
79
|
-
- - "
|
|
79
|
+
- - "~>"
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0'
|
|
81
|
+
version: '3.0'
|
|
82
82
|
description: Wrapper for MX specific RuboCop settings for managing custom settings
|
|
83
83
|
across many projects.
|
|
84
84
|
email:
|
|
85
85
|
- zach.toolson@mx.com
|
|
86
|
-
executables:
|
|
87
|
-
- setup
|
|
86
|
+
executables: []
|
|
88
87
|
extensions: []
|
|
89
88
|
extra_rdoc_files: []
|
|
90
89
|
files:
|
|
91
|
-
- ".gitignore"
|
|
92
90
|
- ".rubocop.yml"
|
|
93
|
-
-
|
|
94
|
-
- Gemfile
|
|
91
|
+
- CHANGELOG.md
|
|
95
92
|
- LICENSE.txt
|
|
96
93
|
- README.md
|
|
97
|
-
- Rakefile
|
|
98
|
-
- bin/setup
|
|
99
94
|
- lib/disabled_cops.yml
|
|
100
95
|
- lib/mad_rubocop.rb
|
|
101
96
|
- lib/mad_rubocop/version.rb
|
|
102
97
|
- lib/modified_cops.yml
|
|
103
|
-
- mad_rubocop.gemspec
|
|
104
98
|
homepage: https://github.com/mxenabled/mad_rubocop
|
|
105
99
|
licenses:
|
|
106
100
|
- MIT
|
|
@@ -112,14 +106,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
112
106
|
requirements:
|
|
113
107
|
- - ">="
|
|
114
108
|
- !ruby/object:Gem::Version
|
|
115
|
-
version:
|
|
109
|
+
version: '3.1'
|
|
116
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
111
|
requirements:
|
|
118
112
|
- - ">="
|
|
119
113
|
- !ruby/object:Gem::Version
|
|
120
114
|
version: '0'
|
|
121
115
|
requirements: []
|
|
122
|
-
rubygems_version: 3.6.
|
|
116
|
+
rubygems_version: 3.6.9
|
|
123
117
|
specification_version: 4
|
|
124
118
|
summary: Wrapper for MX specific RuboCop settings. https://twitter.com/madrubocop
|
|
125
119
|
test_files: []
|
data/.gitignore
DELETED
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.1.1
|
data/Gemfile
DELETED
data/Rakefile
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|
data/bin/setup
DELETED
data/mad_rubocop.gemspec
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
lib = File.expand_path("../lib", __FILE__)
|
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
-
require "mad_rubocop/version"
|
|
6
|
-
|
|
7
|
-
Gem::Specification.new do |spec|
|
|
8
|
-
spec.name = "mad_rubocop"
|
|
9
|
-
spec.version = MadRubocop::VERSION
|
|
10
|
-
spec.authors = ["Zach Toolson"]
|
|
11
|
-
spec.email = ["zach.toolson@mx.com"]
|
|
12
|
-
|
|
13
|
-
spec.summary = "Wrapper for MX specific RuboCop settings. https://twitter.com/madrubocop"
|
|
14
|
-
spec.description = "Wrapper for MX specific RuboCop settings for managing custom settings across many projects."
|
|
15
|
-
spec.homepage = "https://github.com/mxenabled/mad_rubocop"
|
|
16
|
-
spec.license = "MIT"
|
|
17
|
-
|
|
18
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
19
|
-
spec.bindir = "bin"
|
|
20
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
21
|
-
spec.require_paths = ["lib"]
|
|
22
|
-
|
|
23
|
-
spec.required_ruby_version = '>= 2.7.0'
|
|
24
|
-
|
|
25
|
-
spec.add_dependency "rubocop", "~> 1.75"
|
|
26
|
-
spec.add_dependency "rubocop-performance", "~> 1.25"
|
|
27
|
-
spec.add_dependency "rubocop-rails", "~> 2.31"
|
|
28
|
-
spec.add_development_dependency "bundler", "~> 2.0"
|
|
29
|
-
spec.add_development_dependency "rake"
|
|
30
|
-
end
|