mad_rubocop 4.1.0.rc1 → 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: 28dc9f6db299ddf145dbae3fd33c608bc2cf688ee455c8797d36995d5e442ab5
4
- data.tar.gz: dda48438a54bf5130230577610f390d9c50ba6167b14dd259eab18b0216ddc46
3
+ metadata.gz: 930cb2fd32ca469737626bc9a0887cc7bc360132a6f02fe64e7e1aea98385385
4
+ data.tar.gz: 6f128330fb5aec401bb769c396a96e649b33a4a131ca9b55111e83c66d24f019
5
5
  SHA512:
6
- metadata.gz: 4df46cfc93ff45027a592247a2739abb951126f5718bd62541b9870d0509dc5f2b800085142e0179b24ccb926b3fb45d29bd8fbbebf799afca6d0dada9898024
7
- data.tar.gz: 30b0408a04722857631927af7555a244870842fea74e3a0e170d9129cd7027a1d62e0be28dc5cf1820781870bbd1da2a08f379210bceb61cf7483d178e3d5fe5
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.1.0.rc1"
2
+ VERSION = "4.2.0.pre1"
3
3
  end
data/mad_rubocop.gemspec CHANGED
@@ -20,11 +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.required_ruby_version = '>= 2.7.0'
23
+ spec.required_ruby_version = ">= 3.1"
24
24
 
25
- spec.add_dependency "rubocop", "~> 1.75"
26
- spec.add_dependency "rubocop-performance", "~> 1.25"
27
- spec.add_dependency "rubocop-rails", "~> 2.31"
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"
28
28
  spec.add_development_dependency "bundler", "~> 2.0"
29
29
  spec.add_development_dependency "rake"
30
+ spec.add_development_dependency "rspec", "~> 3.0"
30
31
  end
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.0.rc1
4
+ version: 4.2.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Toolson
@@ -15,42 +15,42 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '1.75'
18
+ version: 1.88.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: '1.75'
25
+ version: 1.88.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: '1.25'
32
+ version: 1.26.1
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: '1.25'
39
+ version: 1.26.1
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: '2.31'
46
+ version: 2.35.5
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: '2.31'
53
+ version: 2.35.5
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: bundler
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -79,6 +79,20 @@ dependencies:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
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'
82
96
  description: Wrapper for MX specific RuboCop settings for managing custom settings
83
97
  across many projects.
84
98
  email:
@@ -88,7 +102,9 @@ executables:
88
102
  extensions: []
89
103
  extra_rdoc_files: []
90
104
  files:
105
+ - ".github/workflows/ci.yml"
91
106
  - ".gitignore"
107
+ - ".rspec"
92
108
  - ".rubocop.yml"
93
109
  - ".ruby-version"
94
110
  - Gemfile
@@ -112,14 +128,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
128
  requirements:
113
129
  - - ">="
114
130
  - !ruby/object:Gem::Version
115
- version: 2.7.0
131
+ version: '3.1'
116
132
  required_rubygems_version: !ruby/object:Gem::Requirement
117
133
  requirements:
118
134
  - - ">="
119
135
  - !ruby/object:Gem::Version
120
136
  version: '0'
121
137
  requirements: []
122
- rubygems_version: 3.6.8
138
+ rubygems_version: 3.6.9
123
139
  specification_version: 4
124
140
  summary: Wrapper for MX specific RuboCop settings. https://twitter.com/madrubocop
125
141
  test_files: []