rubocop-ruby2_4 1.0.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d43d8e8d177d09ed332007a6cee9d112f047e1041def7144594ae005f290c86
4
- data.tar.gz: 6338f0db09d1b04c51ef2582548d855d842f69764ad43c32c81ecba94e89f1ab
3
+ metadata.gz: b5062bdd6ca8dfc3f4f4537557383e2fefe91757d59e763b4c028c644da2adbb
4
+ data.tar.gz: 6369a7426c857b2223776a04eee399463f1a35c75be546b0ac6946347c7f5b03
5
5
  SHA512:
6
- metadata.gz: 5004c325d72a09479424bf317cb3da708b8daf5a7adbf1ec9ba4d181f025be46865153e2f8997d40d3c7ee2728e5ae8af37492321046e0665460757406122637
7
- data.tar.gz: 9c2bc979f17797452896df8be3acfd5b9f9346d55d1c255cad03ba8411d4f33c0fb26be2d7ae04bbc2349d1ff92859e205c95d3cb0e34747bd6ca8ae771edcd9
6
+ metadata.gz: 9dbed9de6b098a72553310ce79adbfb7a5fcfcff07b1c7f7e11eecc5e5edce345db9a58b9b437bd1395792d2f33eda6f8b83ca735fd1675caa46c18e137cf361
7
+ data.tar.gz: '0885ce3f20b7e4398fb57b1b1f237db9ace6e54fec96ac8e3de86cbc56ff42655a085874665088a64b5c7cd16d6e140422b99cd92e3f668f985659e0f6c206b7'
checksums.yaml.gz.sig ADDED
Binary file
data/CHANGELOG.md CHANGED
@@ -6,26 +6,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
  ### Added
9
-
10
9
  ### Changed
10
+ ### Fixed
11
+ ### Removed
11
12
 
13
+ ## [2.0.1] 2023-05-18
12
14
  ### Fixed
15
+ - Ship rakelib/**/*.rake tasks
16
+ - Fix rake_tasks hook on Railtie
13
17
 
18
+ ## [2.0.0] 2023-05-17 [YANKED]
19
+ ### Added
20
+ - Configs for:
21
+ - rubocop
22
+ - rubocop-gradual
23
+ - rubocop-md
24
+ - rubocop-rake
25
+ - rubocop-shopify
26
+ - rubocop-thread_safety
27
+ - standard
28
+ - standard-performance
29
+ - standard-custom
30
+ - standard-rubocop-lts
31
+ - And optionally, if you are using RSpec:
32
+ - rubocop-rspec
33
+ - And optionally, if you are building a RubyGem:
34
+ - rubocop-packaging
35
+ - And optionally, if you are building a Rails app:
36
+ - betterlint
37
+ - standard-rails
38
+ - version_gem
14
39
  ### Removed
40
+ - Support for Ruby <= 2.6. Minimum Ruby Version is now 2.7
41
+
42
+ ## [1.0.3] 2022-05-23
43
+ ### Added
44
+ - Rubocop => RuboCop typo repair
45
+ - Ruby Version Support Matrix
46
+ - Improved documentation
15
47
 
16
48
  ## [1.0.2] 2022-05-03
17
49
  ### Fixed
18
- * Added missing rubocop.yml for inherit_gem directive
50
+ - Added missing rubocop.yml for inherit_gem directive
19
51
 
20
52
  ## [1.0.1] 2022-05-02
21
53
  ### Added
22
- * Documentation
54
+ - Documentation
23
55
 
24
56
  ## [1.0.0] 2022-05-01
25
57
  ### Added
26
- * Initial release
58
+ - Initial release
27
59
 
28
- [Unreleased]: https://github.com/rubocop-semver/rubocop-ruby2_4/compare/v1.0.2...HEAD
29
- [1.0.2]: https://github.com/rubocop-semver/rubocop-ruby2_4/compare/v1.0.1...v1.0.2
30
- [1.0.1]: https://github.com/rubocop-semver/rubocop-ruby2_4/compare/v1.0.0...v1.0.1
31
- [1.0.0]: https://github.com/rubocop-semver/rubocop-ruby2_4/compare/69576e0c1884ab3c773394b5f30a9ebafe11a2a7...v1.0.0
60
+ [Unreleased]: https://github.com/rubocop-lts/rubocop-ruby2_4/compare/v2.0.1...HEAD
61
+ [2.0.1]: https://github.com/rubocop-lts/rubocop-ruby2_4/compare/v2.0.0...v2.0.1
62
+ [2.0.0]: https://github.com/rubocop-lts/rubocop-ruby2_4/compare/v1.0.3...v2.0.0
63
+ [1.0.3]: https://github.com/rubocop-lts/rubocop-ruby2_4/compare/v1.0.2...v1.0.3
64
+ [1.0.2]: https://github.com/rubocop-lts/rubocop-ruby2_4/compare/v1.0.1...v1.0.2
65
+ [1.0.1]: https://github.com/rubocop-lts/rubocop-ruby2_4/compare/v1.0.0...v1.0.1
66
+ [1.0.0]: https://github.com/rubocop-lts/rubocop-ruby2_4/compare/69576e0c1884ab3c773394b5f30a9ebafe11a2a7...v1.0.0
data/CONTRIBUTING.md CHANGED
@@ -1,25 +1,39 @@
1
1
  ## Contributing
2
2
 
3
- Bug reports and pull requests are welcome on GitHub at [https://github.com/rubocop-semver/rubocop-ruby2_4][source]
3
+ Bug reports and pull requests are welcome on GitLab at [https://gitlab.com/rubocop-lts/rubocop-ruby2_4][🚎src-main]
4
4
  . This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
5
5
  the [code of conduct][conduct].
6
6
 
7
- To submit a patch, please fork the project and create a patch with tests. Once you're happy with it send a pull request!
7
+ To submit a patch, please fork the project and create a patch with tests. Once you're happy with it send a pull request
8
+ and post a message to the [gitter chat][🏘chat].
8
9
 
9
- ## Contributors
10
-
11
- [![Contributors](https://contrib.rocks/image?repo=rubocop-semver/rubocop-ruby2_4)][contributors]
10
+ ## Release
12
11
 
13
- Made with [contributors-img][contrib-rocks].
12
+ To release a new version:
14
13
 
15
- [comment]: <> (Following links are used by README, CONTRIBUTING)
14
+ 1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check.
15
+ 2. update the version number in `version.rb`
16
+ 3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`.
17
+ 4. run `bundle exec rake build:checksum`
18
+ 5. move the built gem to project root
19
+ 6. run `bin/checksum` to create the missing SHA256 checksum
20
+ 7. move the built gem back to `pkg/`
21
+ 8. commit the changes
22
+ 9. 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][rubygems].
16
23
 
17
- [conduct]: https://github.com/rubocop-semver/rubocop-ruby2_4/blob/main/CODE_OF_CONDUCT.md
24
+ NOTE: You will need to have a public key in `certs/`, and list your cert in the
25
+ `gemspec`, in order to sign the new release.
26
+ See: [RubyGems Security Guide][rubygems-security-guide]
18
27
 
19
- [contrib-rocks]: https://contrib.rocks
28
+ ## Contributors
20
29
 
21
- [contributors]: https://github.com/rubocop-semver/rubocop-ruby2_4/graphs/contributors
30
+ See: [https://gitlab.com/rubocop-lts/rubocop-ruby2_4/-/graphs/main][🖐contributors]
22
31
 
23
32
  [comment]: <> (Following links are used by README, CONTRIBUTING, Homepage)
24
33
 
25
- [source]: https://github.com/rubocop-semver/rubocop-ruby2_4/
34
+ [🤝conduct]: https://gitlab.com/rubocop-lts/rubocop-ruby2_4/-/blob/main/CODE_OF_CONDUCT.md
35
+ [🖐contributors]: https://gitlab.com/rubocop-lts/rubocop-ruby2_4/-/graphs/main
36
+ [🚎src-main]: https://gitlab.com/rubocop-lts/rubocop-ruby2_4/-/tree/main
37
+ [🏘chat]: https://gitter.im/rubocop-lts/community
38
+ [rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
39
+ [rubygems]: https://rubygems.org
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Peter Boling
3
+ Copyright (c) 2022 - 2023 Peter H. Boling of https://railsbling.com
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,53 +1,219 @@
1
1
  <p align="center">
2
2
  <a href="https://rubocop.org#gh-light-mode-only" target="_blank" rel="noopener">
3
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby2_4/raw/main/docs/images/logo/rubocop-light.svg?raw=true" alt="PNG Rubocop Logo, Copyright (c) 2014 Bozhidar Batsov, MIT License, SVG Rubocop Logo, Gil Barbara, CC0">
3
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby2_4/raw/main/docs/images/logo/rubocop-light.svg?raw=true" alt="SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt">
4
4
  </a>
5
5
  <a href="https://rubocop.org#gh-dark-mode-only" target="_blank" rel="noopener">
6
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby2_4/raw/main/docs/images/logo/rubocop-dark.svg?raw=true" alt="SVG Rubocop Logo, Copyright (c) 2014 Bozhidar Batsov, MIT License, SVG Rubocop Logo, Roberto Huertas, MIT">
6
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby2_4/raw/main/docs/images/logo/rubocop-dark.svg?raw=true" alt="SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt">
7
7
  </a>
8
8
  <a href="https://www.ruby-lang.org/" target="_blank" rel="noopener">
9
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby2_4/raw/main/docs/images/logo/ruby-logo.svg?raw=true" alt="Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5">
9
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby2_4/raw/main/docs/images/logo/ruby-logo.svg?raw=true" alt="Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5, see docs/images/logo/README.txt">
10
10
  </a>
11
11
  <a href="https://semver.org/#gh-light-mode-only" target="_blank" rel="noopener">
12
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby2_4/raw/main/docs/images/logo/semver-light.svg?raw=true" alt="SemVer.org Logo by @maxhaz">
12
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby2_4/raw/main/docs/images/logo/semver-light.svg?raw=true" alt="SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt">
13
13
  </a>
14
14
  <a href="https://semver.org/#gh-dark-mode-only" target="_blank" rel="noopener">
15
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby2_4/raw/main/docs/images/logo/semver-dark.svg?raw=true" alt="SemVer.org Logo by @maxhaz">
15
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby2_4/raw/main/docs/images/logo/semver-dark.svg?raw=true" alt="SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt">
16
16
  </a>
17
17
  </p>
18
18
 
19
- # Rubocop::Ruby24
19
+ ---
20
+
21
+ NOTE: You might be interested in [`rubocop-lts`][rlts] which sits as a higher level than this gem, and can keep pace with whatever version of Ruby you happen to be on.
22
+
23
+ | Gem Name | Version | Downloads | CI | Activity |
24
+ |-------------------------------|-------------------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
25
+ | [`rubocop-lts`][⛳️lts-gh] | [![Gem Version][⛳️lts-vi]][⛳️lts-g] | [![Total DL][🖇️lts-dti]][⛳️lts-g] [![DL Rank][🏘️lts-rti]][⛳️lts-g] | [![Current][🚎lts-cwfi]][🚎lts-cwf] | [![Open Issues][📗lts-ioi]][📗lts-io] [![Closed Issues][🚀lts-ici]][🚀lts-ic] [![Open PRs][💄lts-poi]][💄lts-po] [![Closed PRs][👽lts-pci]][👽lts-pc] |
26
+ | [`rubocop-ruby2_4`][⛳️ini-gh] | [![Gem Version][⛳️ini-vi]][⛳️ini-g] | [![Total DL][🖇️ini-dti]][⛳️ini-g] [![DL Rank][🏘️ini-rti]][⛳️ini-g] | [![Current][🚎ini-cwfi]][🚎ini-cwf] [![Heads][🖐ini-hwfi]][🖐ini-hwf] | [![Open Issues][📗ini-ioi]][📗ini-io] [![Closed Issues][🚀ini-ici]][🚀ini-ic] [![Open PRs][💄ini-poi]][💄ini-po] [![Closed PRs][👽ini-pci]][👽ini-pc] |
27
+
28
+ <!-- columnar badge #s for Project Health table:
29
+ ⛳️
30
+ 🖇
31
+ 🏘
32
+ 🚎
33
+ 🖐
34
+ 🧮
35
+ 📗
36
+ 🚀
37
+ 💄
38
+ 👽
39
+ -->
40
+
41
+ [⛳️lts-vi]: http://img.shields.io/gem/v/rubocop-lts.svg
42
+ [🖇️lts-dti]: https://img.shields.io/gem/dt/rubocop-lts.svg
43
+ [🏘️lts-rti]: https://img.shields.io/gem/rt/rubocop-lts.svg
44
+ [🚎lts-cwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/current.yml
45
+ [🚎lts-cwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/current.yml/badge.svg
46
+ [🖐lts-hwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/heads.yml
47
+ [🖐lts-hwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/heads.yml/badge.svg
48
+ [🧮lts-lwf]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/legacy.yml
49
+ [🧮lts-lwfi]: https://github.com/rubocop-lts/rubocop-lts/actions/workflows/legacy.yml/badge.svg
50
+ [📗lts-io]: https://github.com/rubocop-lts/rubocop-lts/issues
51
+ [📗lts-ioi]: https://img.shields.io/github/issues-raw/rubocop-lts/rubocop-lts
52
+ [🚀lts-ic]: https://github.com/rubocop-lts/rubocop-lts/issues?q=is%3Aissue+is%3Aclosed
53
+ [🚀lts-ici]: https://img.shields.io/github/issues-closed-raw/rubocop-lts/rubocop-lts
54
+ [💄lts-po]: https://github.com/rubocop-lts/rubocop-lts/pulls
55
+ [💄lts-poi]: https://img.shields.io/github/issues-pr/rubocop-lts/rubocop-lts
56
+ [👽lts-pc]: https://github.com/rubocop-lts/rubocop-lts/pulls?q=is%3Apr+is%3Aclosed
57
+ [👽lts-pci]: https://img.shields.io/github/issues-pr-closed/rubocop-lts/rubocop-lts
58
+ [⛳️lts-g]: https://rubygems.org/gems/rubocop-lts
59
+ [⛳️lts-gh]: https://github.com/rubocop-lts/rubocop-lts
60
+
61
+ [⛳️ini-vi]: http://img.shields.io/gem/v/rubocop-ruby2_4.svg
62
+ [🖇️ini-dti]: https://img.shields.io/gem/dt/rubocop-ruby2_4.svg
63
+ [🏘️ini-rti]: https://img.shields.io/gem/rt/rubocop-ruby2_4.svg
64
+ [🚎ini-cwf]: https://github.com/rubocop-lts/rubocop-ruby2_4/actions/workflows/current.yml
65
+ [🚎ini-cwfi]: https://github.com/rubocop-lts/rubocop-ruby2_4/actions/workflows/current.yml/badge.svg
66
+ [🖐ini-hwf]: https://github.com/rubocop-lts/rubocop-ruby2_4/actions/workflows/heads.yml
67
+ [🖐ini-hwfi]: https://github.com/rubocop-lts/rubocop-ruby2_4/actions/workflows/heads.yml/badge.svg
68
+ [🧮ini-lwf]: https://github.com/rubocop-lts/rubocop-ruby2_4/actions/workflows/legacy.yml
69
+ [🧮ini-lwfi]: https://github.com/rubocop-lts/rubocop-ruby2_4/actions/workflows/legacy.yml/badge.svg
70
+ [📗ini-io]: https://github.com/rubocop-lts/rubocop-ruby2_4/issues
71
+ [📗ini-ioi]: https://img.shields.io/github/issues-raw/rubocop-lts/rubocop-ruby2_4
72
+ [🚀ini-ic]: https://github.com/rubocop-lts/rubocop-ruby2_4/issues?q=is%3Aissue+is%3Aclosed
73
+ [🚀ini-ici]: https://img.shields.io/github/issues-closed-raw/rubocop-lts/rubocop-ruby2_4
74
+ [💄ini-po]: https://github.com/rubocop-lts/rubocop-ruby2_4/pulls
75
+ [💄ini-poi]: https://img.shields.io/github/issues-pr/rubocop-lts/rubocop-ruby2_4
76
+ [👽ini-pc]: https://github.com/rubocop-lts/rubocop-ruby2_4/pulls?q=is%3Apr+is%3Aclosed
77
+ [👽ini-pci]: https://img.shields.io/github/issues-pr-closed/rubocop-lts/rubocop-ruby2_4
78
+ [⛳️ini-g]: https://rubygems.org/gems/rubocop-ruby2_4
79
+ [⛳️ini-gh]: https://github.com/rubocop-lts/rubocop-ruby2_4
80
+
81
+ # 🦾 Rubocop::Ruby24
20
82
 
21
83
  See the intro [blog post](https://dev.to/pboling/rubocop-ruby-matrix-gems-nj)!
22
84
 
23
- This gem requires no other gems. It depends on `rubocop`, but does not `require 'rubocop'`.
85
+ This gem configures many gems for you:
86
+
87
+ - rubocop
88
+ - rubocop-gradual
89
+ - rubocop-md
90
+ - rubocop-rake
91
+ - rubocop-shopify
92
+ - rubocop-thread_safety
93
+ - standard
94
+ - standard-performance (incl. rubocop-performance)
95
+ - standard-custom
96
+ - standard-rubocop-lts (ruby version-specific rules)
97
+
98
+ And optionally, if you are using RSpec:
99
+
100
+ - rubocop-rspec
101
+
102
+ And optionally, if you are building a RubyGem:
103
+
104
+ - rubocop-packaging
105
+
106
+ And optionally, if you are building a Rails app:
107
+
108
+ - standard-rails (incl. rubocop-rails)
109
+ - betterlint
24
110
 
25
111
  Awareness of `rubocop`'s lack of [SemVer][semver] adherence isn't evenly dispersed in the Ruby community.
26
112
 
27
- The Rubocop team [has real reasons](https://github.com/semver/semver/issues/317)
28
- for [not following SemVer](https://github.com/rubocop/rubocop/issues/4243), but if you've
29
- found this project their reasons likely weigh less, in your context (e.g. running `rubocop` from command line), than
30
- what brought you here.
113
+ The RuboCop team [has reasons](https://github.com/semver/semver/issues/317)
114
+ for [not following SemVer](https://github.com/rubocop/rubocop/issues/4243).
115
+
116
+ NOTE: They think they are following SemVer,
117
+ but their interpretation differs from mine, and seems to differ from the
118
+ [intent of SemVer's creator][major-versions-not-sacred].
31
119
 
32
120
  <p align="left">
33
121
  <a href="https://metaredux.com/posts/2022/04/21/rubocop-turns-10.html" target="_blank" rel="noopener">
34
- <img width="360px" src="https://github.com/rubocop-semver/rubocop-ruby2_4/raw/main/docs/images/rubocop-not-semver.png?raw=true" alt="Explanation of non-SemVer compliance, @bbatsov">
122
+ <img width="360px" src="https://github.com/rubocop-lts/rubocop-ruby2_4/raw/main/docs/images/rubocop-not-semver.png?raw=true" alt="Explanation of non-SemVer compliance, @bbatsov">
35
123
  </a>
36
124
  </p>
37
125
 
38
126
  The purpose of this gem is to constrain the `rubocop` dependency of a project in
39
- a [SemVer compliant](https://semver.org/) (Semantic Versioning) way that aligns with the the desired minimum
40
- compatible/supported Ruby version.
41
-
42
- Adding this gem will facilitate the best practice of adding a `~> ` version constrained `rubocop` dependency, while
43
- minimizing the risk of a rubocop minor / patch upgrade breaking the build. See the
44
- official [compatibility matrix](https://github.com/rubocop/rubocop/blob/master/docs/modules/ROOT/pages/compatibility.adoc#support-matrix) (Rubocop documentation)
45
-
46
- ## Stable
47
-
48
- All releases of this gem are stable releases. The first version is `1.0.0`.
49
-
50
- ## Installation
127
+ a [SemVer compliant][semver]
128
+ (Semantic Versioning, [Major Versions are Not Sacred][major-versions-not-sacred])
129
+ way that aligns with its desired minimum compatible/supported Ruby version.
130
+ Secondary purpose is to provide default configurations for a bevy of RuboCop-related plugins.
131
+
132
+ ## 💎 Ruby Version Support
133
+
134
+ This gem facilitates equivalent of adding a `~> ` version constrained `rubocop`(-ish +more) dependency,
135
+ thus minimizing the risk of a rubocop minor / patch upgrade breaking the build.
136
+
137
+ ### What's that you say?
138
+
139
+ This gem will install a suite of tools that will **analyze & lint code** intended to support any version of Ruby >= 2.0.
140
+
141
+ This gem helps insulate projects from RuboCop churn by enshrining many conventions
142
+ that have been shown over years to reduce problems.
143
+
144
+ #### Background
145
+
146
+ Each [spring `rubocop` drops][rubocop-support-matrix] the ability to **install** and **run** `rubocop` on an EOL'd Ruby.
147
+ Eventually `rubocop` will drop the ability to **analyze code** intended to support an EOL'd Ruby,
148
+ as they already have for Ruby 1.9. RuboCop has never run properly on Ruby 1.8.
149
+ This gem, via [standard (Standard Ruby)][standardrb], allows RuboCop to analyze Ruby 2.4 code,
150
+ by turning off certain rules that only apply to later Rubies.
151
+
152
+ When the `rubocop` team makes _any_ of these changes they
153
+ [only bump the minor version][rubocop-versioning] of RuboCop,
154
+ in violation of SemVer ([they disagree][rubocop-release-policy]).
155
+
156
+ In other words, RuboCop intentionally does not bump the major version when they drop
157
+ _analysis_, _runtime_, or _installation_ support for a given version of Ruby.
158
+
159
+ This is a primary _raison d’être_ for this project.
160
+ To get a better understanding of how SemVer is intended to work read this article from the creator of SemVer:
161
+
162
+ - ["Major Version Numbers are Not Sacred"][major-versions-not-sacred]!
163
+
164
+ [rubocop-support-matrix]: https://docs.rubocop.org/rubocop/compatibility.html#support-matrix
165
+ [rubocop-versioning]: https://docs.rubocop.org/rubocop/versioning.html
166
+ [rubocop-release-policy]: https://docs.rubocop.org/rubocop/versioning.html#release-policy
167
+ [major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
168
+ [standardrb]: https://github.com/standardrb/standard
169
+
170
+ ### 👪 A Gem Family
171
+
172
+ The `rubocop-lts` family of gems has a version supporting any version of Ruby you need.
173
+ They can be used as development dependencies for libraries or applications.
174
+
175
+ - [`rubocop-lts`][rlts]
176
+ - [`standard-rubocop-lts`][stdrlts]
177
+ - [`rubocop-ruby1_8`][rr18]
178
+ - [`rubocop-ruby1_9`][rr19]
179
+ - [`rubocop-ruby2_0`][rr20]
180
+ - [`rubocop-ruby2_1`][rr21]
181
+ - [`rubocop-ruby2_2`][rr22]
182
+ - [`rubocop-ruby2_3`][rr23]
183
+ - [`rubocop-ruby2_4`][rr24]
184
+ - [`rubocop-ruby2_5`][rr25]
185
+ - [`rubocop-ruby2_6`][rr26]
186
+ - [`rubocop-ruby2_7`][rr27]
187
+ - [`rubocop-ruby3_0`][rr30]
188
+ - [`rubocop-ruby3_1`][rr31]
189
+ - [`rubocop-ruby3_2`][rr32]
190
+
191
+ [rlts]: https://github.com/rubocop-lts/rubocop-lts#-how-to-untie-gorgons-knot
192
+ [stdrlts]: https://github.com/rubocop-lts/standard-rubocop-lts
193
+ [rr18]: https://gitlab.com/rubocop-lts/standard-rubocop-lts
194
+ [rr19]: https://gitlab.com/rubocop-lts/rubocop-ruby1_9
195
+ [rr20]: https://gitlab.com/rubocop-lts/rubocop-ruby2_0
196
+ [rr21]: https://gitlab.com/rubocop-lts/rubocop-ruby2_1
197
+ [rr22]: https://gitlab.com/rubocop-lts/rubocop-ruby2_2
198
+ [rr23]: https://gitlab.com/rubocop-lts/rubocop-ruby2_3
199
+ [rr24]: https://gitlab.com/rubocop-lts/rubocop-ruby2_4
200
+ [rr25]: https://gitlab.com/rubocop-lts/rubocop-ruby2_5
201
+ [rr26]: https://gitlab.com/rubocop-lts/rubocop-ruby2_6
202
+ [rr27]: https://gitlab.com/rubocop-lts/rubocop-ruby2_7
203
+ [rr30]: https://gitlab.com/rubocop-lts/rubocop-ruby3_0
204
+ [rr31]: https://gitlab.com/rubocop-lts/rubocop-ruby3_1
205
+ [rr32]: https://gitlab.com/rubocop-lts/rubocop-ruby3_2
206
+
207
+ ## 🗿 Stable
208
+
209
+ All releases of this gem are stable releases.
210
+ We do not release new versions for every release of `rubocop`,
211
+ as this gem is tied to [standard (Standard Ruby)][standardrb].
212
+ A typical release cycle for a gem in the `rubocop-lts` family is roughly every six months,
213
+ though eventually analysis support for an old version of Ruby will be dropped.
214
+ When that happens releases of the `rubocop-lts` gem for that version of Ruby will (mostly) cease.
215
+
216
+ ## ✨ Installation
51
217
 
52
218
  Install the gem and add to the application's Gemfile by executing:
53
219
 
@@ -57,59 +223,105 @@ If bundler is not being used to manage dependencies, install the gem by executin
57
223
 
58
224
  $ gem install rubocop-ruby2_4
59
225
 
60
- ## Usage
226
+ ## 🔧 Basic Usage
61
227
 
62
- The following is optional. We'll discuss why you might want to do this after you see what it does.
63
-
64
- Add to the top of your project's `.rubocop.yml` configuration file:
228
+ If you are using Rails, building a Rubygem, or not using RSpec, see ["Advanced Usage"](#advanced-usage).
229
+ Otherwise, if you using this in plain Ruby _and_ RSpec, you can add to the top of your project's `.rubocop.yml` configuration file:
65
230
 
66
231
  ```yaml
67
232
  inherit_gem:
68
233
  rubocop-ruby2_4: rubocop.yml
69
234
  ```
70
235
 
71
- This has the same effect as you declaring the following in your `.rubocop.yml`:
236
+ Among _many_ other settings, this has the effect of declaring the following:
72
237
 
73
238
  ```yaml
74
239
  AllCops:
75
- # remove if already present in your `.rubocop.yml` to gain the full benefit of this gem!
76
- TargetRubyVersion: 2.4
77
240
  NewCops: enable
78
241
  ```
79
242
 
80
- Let's talk about these settings.
243
+ Let's talk about these settings. (TODO: Document some of the other settings!)
244
+
245
+ ### ⚙️ `NewCops: enable`
246
+
247
+ Upgrades to the latest RuboCop can include all kinds of changes, including removing support for the version of Ruby your project uses, or adding a cop that may not work with some of your syntax (e.g. [some use cases of 'module_function`](https://github.com/rubocop/rubocop/issues/5953#issuecomment-805921993)). Accepting new cops arriving in a new version of RuboCop can feel risky, especially when it doesn't follow SemVer.
248
+
249
+ But this gem shoehorns RuboCop into SemVer, under the watchful eye of [standard (Standard Ruby)][standardrb]... so `NewCops` is now safe(r)! If you use a dependency greening tool like GitHub's `dependabot`, or the excellent alternatives [depfu](https://depfu.com/), and [`renovate`](https://www.whitesourcesoftware.com/free-developer-tools/renovate/), then you can see the effect of a minor / major version bump in your CI Build!
250
+
251
+ ## Advanced Usage
252
+
253
+ ### Linting Ruby + RSpec
254
+
255
+ ```yaml
256
+ inherit_gem:
257
+ rubocop-ruby2_4: rubocop-lts/ruby_rspec.yml
258
+ # Note: technically the above is the same as the "Basic Usage" below, so if specificity is not your jam:
259
+ # rubocop-ruby2_4: rubocop.yml
260
+ ```
261
+
262
+ ### Linting Ruby w/o RSpec
81
263
 
82
- ## TargetRubyVersion
264
+ ```yaml
265
+ inherit_gem:
266
+ rubocop-ruby2_4: rubocop-lts/ruby.yml
267
+ ```
83
268
 
84
- Allowing this gem to manage the target ruby version means you can switch to a different gem within the family when you upgrade to the next version of Ruby, and have nothing else to change. A single line in the `Gemfile`, and you are done.
269
+ ### Linting Rails + RSpec
85
270
 
86
- ## NewCops: enable
271
+ ```yaml
272
+ inherit_gem:
273
+ rubocop-ruby2_4: rubocop-lts/rails_rspec.yml
274
+ ```
87
275
 
88
- You may not use this setting in your project yet. Upgrades to the latest Rubocop can include all kinds of changes, including removing support for the version of Ruby your project uses, or adding a cop that may not work with some of your syntax (e.g. [some use cases of 'module_function`](https://github.com/rubocop/rubocop/issues/5953#issuecomment-805921993)). Accepting new cops arriving in a new version of Rubocop can feel risky, especially when it doesn't follow SemVer.
276
+ #### Linting Rails w/o RSpec
89
277
 
90
- But this gem shoehorns rubocop into SemVer... so `NewCops` is now safe(r)! If you use a dependency greening tool like GitHub's `dependabot`, or the excellent alternatives [depfu](https://depfu.com/), and [`renovate`](https://www.whitesourcesoftware.com/free-developer-tools/renovate/), then you can see the effect of a minor / major version bumpin your CI Build!
278
+ ```yaml
279
+ inherit_gem:
280
+ rubocop-ruby2_4: rubocop-lts/rails.yml
281
+ ```
91
282
 
92
- ## Development
283
+ #### Linting a RubyGem + RSpec
93
284
 
94
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
285
+ ```yaml
286
+ inherit_gem:
287
+ rubocop-ruby2_4: rubocop-lts/rubygem_rspec.yml
288
+ ```
95
289
 
96
- 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
290
+ #### Linting a RubyGem w/o RSpec
97
291
 
98
- ## Contributing
292
+ ```yaml
293
+ inherit_gem:
294
+ rubocop-ruby2_4: rubocop-lts/rubygem.yml
295
+ ```
296
+
297
+ ## 💻 Development
298
+
299
+ After checking out the repo, run `bin/setup` to install dependencies.
300
+ Then, run `rake spec` to run the tests w/ coverage,
301
+ or `bin/rake` to run tests w/ coverage, and linting.
302
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
303
+
304
+ To install this gem onto your local machine, run `bundle exec rake install`.
305
+
306
+ ### 🚀 Release Instructions
307
+
308
+ See [CONTRIBUTING.md][contributing].
309
+
310
+ ## ⚡️ Contributing
99
311
 
100
312
  See [CONTRIBUTING.md][contributing]
101
313
 
102
- ## Contributors
314
+ ## 🌈 Contributors
103
315
 
104
- [![Contributors](https://contrib.rocks/image?repo=rubocop-semver/rubocop-ruby2_4)]("https://github.com/rubocop-semver/rubocop-ruby2_4/graphs/contributors")
316
+ [![Contributors](https://contrib.rocks/image?repo=rubocop-lts/rubocop-ruby2_4)]("https://github.com/rubocop-lts/rubocop-ruby2_4/graphs/contributors")
105
317
 
106
318
  Made with [contributors-img](https://contrib.rocks).
107
319
 
108
- ## License
320
+ ## 📄 License
109
321
 
110
322
  The gem is available as open source under the terms of
111
- the [MIT License][license] [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][license-ref].
112
- See [LICENSE][license] for the official [Copyright Notice][copyright-notice-explainer].
323
+ the [MIT License][license] [![License: MIT][license-img]][license-ref].
324
+ See [LICENSE.txt][license] for the official [Copyright Notice][copyright-notice-explainer].
113
325
 
114
326
  <details>
115
327
  <summary>Project Logos (rubocop-ruby2_4)</summary>
@@ -118,29 +330,29 @@ See [docs/images/logo/README.txt][project-logos]
118
330
  </details>
119
331
 
120
332
  <details>
121
- <summary>Organization Logo (rubocop-semver)</summary>
333
+ <summary>Organization Logo (rubocop-lts)</summary>
122
334
 
123
335
  Author: [Yusuf Evli][org-logo-author]
124
336
  Source: [Unsplash][org-logo-source]
125
337
  License: [Unsplash License][org-logo-license]
126
338
  </details>
127
339
 
128
- [project-logos]: https://github.com/rubocop-semver/rubocop-ruby2_4/blob/main/docs/images/logo/README.txt
340
+ [project-logos]: https://github.com/rubocop-lts/rubocop-ruby2_4/blob/main/docs/images/logo/README.txt
129
341
  [org-logo-author]: https://unsplash.com/@yusufevli
130
342
  [org-logo-source]: https://unsplash.com/photos/yaSLNLtKRIU
131
343
  [org-logo-license]: https://unsplash.com/license
132
344
 
133
- ### Copyright
345
+ ### © Copyright
134
346
 
135
- * Copyright (c) 2022 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
347
+ * Copyright (c) 2022 - 2023 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
136
348
 
137
- [copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
349
+ ## 🤝 Code of Conduct
138
350
 
139
- ## Code of Conduct
351
+ Everyone interacting in this project's codebases, issue trackers, [chat rooms][🏘chat] and mailing lists is expected to follow the [code of conduct][🤝conduct].
140
352
 
141
- Everyone interacting in the Rubocop::Ruby24 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rubocop-semver/rubocop-ruby2_4/blob/main/CODE_OF_CONDUCT.md).
353
+ [🤝conduct]: https://gitlab.com/rubocop-lts/rubocop-ruby2_4/-/blob/main/CODE_OF_CONDUCT.md
142
354
 
143
- ## Versioning
355
+ ## 📌 Versioning
144
356
 
145
357
  This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations of this scheme should be reported as
146
358
  bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be
@@ -153,67 +365,36 @@ the [Pessimistic Version Constraint][pvc] with two digits of precision.
153
365
  For example:
154
366
 
155
367
  ```ruby
156
- spec.add_dependency "rubocop-ruby2_4", "~> 1.0"
368
+ spec.add_dependency "rubocop-ruby2_4", "~> 2.0"
157
369
  ```
158
370
 
371
+ [aboutme]: https://about.me/peter.boling
372
+ [actions]: https://github.com/rubocop-lts/rubocop-ruby2_4/actions
373
+ [angelme]: https://angel.co/peter-boling
374
+ [blogpage]: http://www.railsbling.com/tags/rubocop-ruby2_4/
375
+ [codecov_coverage]: https://codecov.io/gh/rubocop-lts/rubocop-ruby2_4
376
+ [code_triage]: https://www.codetriage.com/rubocop-lts/rubocop-ruby2_4
377
+ [🏘chat]: https://gitter.im/rubocop-lts/community
378
+ [climate_coverage]: https://codeclimate.com/github/rubocop-lts/rubocop-ruby2_4/test_coverage
379
+ [climate_maintainability]: https://codeclimate.com/github/rubocop-lts/rubocop-ruby2_4/maintainability
159
380
  [copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
160
-
161
- [gh_discussions]: https://github.com/rubocop-semver/rubocop-ruby2_4/discussions
162
-
163
- [conduct]: https://github.com/rubocop-semver/rubocop-ruby2_4/blob/main/CODE_OF_CONDUCT.md
164
-
165
- [contributing]: https://github.com/rubocop-semver/rubocop-ruby2_4/blob/main/CONTRIBUTING.md
166
-
167
- [security]: https://github.com/rubocop-semver/rubocop-ruby2_4/blob/main/SECURITY.md
168
-
169
- [license]: https://github.com/rubocop-semver/rubocop-ruby2_4/blob/main/LICENSE.txt
170
-
381
+ [conduct]: https://github.com/rubocop-lts/rubocop-ruby2_4/blob/main/CODE_OF_CONDUCT.md
382
+ [contributing]: https://github.com/rubocop-lts/rubocop-ruby2_4/blob/main/CONTRIBUTING.md
383
+ [devto]: https://dev.to/galtzo
384
+ [documentation]: https://rubydoc.info/github/rubocop-lts/rubocop-ruby2_4/main
385
+ [followme]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
386
+ [gh_discussions]: https://github.com/rubocop-lts/rubocop-ruby2_4/discussions
387
+ [gh_sponsors]: https://github.com/sponsors/pboling
388
+ [issues]: https://github.com/rubocop-lts/rubocop-ruby2_4/issues
389
+ [liberapay_donate]: https://liberapay.com/pboling/donate
390
+ [license]: LICENSE.txt
171
391
  [license-ref]: https://opensource.org/licenses/MIT
172
-
173
- [semver]: http://semver.org/
174
-
392
+ [license-img]: https://img.shields.io/badge/License-MIT-green.svg
393
+ [peterboling]: http://www.peterboling.com
175
394
  [pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
176
-
177
395
  [railsbling]: http://www.railsbling.com
178
-
179
- [peterboling]: http://www.peterboling.com
180
-
181
- [aboutme]: https://about.me/peter.boling
182
-
183
- [angelme]: https://angel.co/peter-boling
184
-
185
- [coderme]:http://coderwall.com/pboling
186
-
187
- [followme-img]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
188
-
189
- [tweetme]: http://twitter.com/galtzo
190
-
191
- [politicme]: https://nationalprogressiveparty.org
192
-
193
- [documentation]: https://rubydoc.info/github/rubocop-semver/rubocop-ruby2_4/main
194
-
195
- [source]: https://github.com/rubocop-semver/rubocop-ruby2_4/
196
-
197
- [actions]: https://github.com/rubocop-semver/rubocop-ruby2_4/actions
198
-
199
- [issues]: https://github.com/rubocop-semver/rubocop-ruby2_4/issues
200
-
201
- [climate_maintainability]: https://codeclimate.com/github/rubocop-semver/rubocop-ruby2_4/maintainability
202
-
203
- [climate_coverage]: https://codeclimate.com/github/rubocop-semver/rubocop-ruby2_4/test_coverage
204
-
205
- [codecov_coverage]: https://codecov.io/gh/rubocop-semver/rubocop-ruby2_4
206
-
207
- [code_triage]: https://www.codetriage.com/rubocop-semver/rubocop-ruby2_4
208
-
209
- [blogpage]: http://www.railsbling.com/tags/rubocop-ruby2_4/
210
-
211
396
  [rubygems]: https://rubygems.org/gems/rubocop-ruby2_4
212
-
213
- [chat]: https://gitter.im/rubocop-semver/rubocop-ruby2_4?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
214
-
215
- [maintenancee_policy]: https://guides.rubyonrails.org/maintenance_policy.html#security-issues
216
-
217
- [liberapay_donate]: https://liberapay.com/pboling/donate
218
-
219
- [gh_sponsors]: https://github.com/sponsors/pboling
397
+ [security]: https://github.com/rubocop-lts/rubocop-ruby2_4/blob/main/SECURITY.md
398
+ [semver]: http://semver.org/
399
+ [source]: https://github.com/rubocop-lts/rubocop-ruby2_4/
400
+ [tweetme]: http://twitter.com/galtzo
data/SECURITY.md CHANGED
@@ -2,12 +2,13 @@
2
2
 
3
3
  ## Supported Versions
4
4
 
5
- | Version | Supported |
6
- | ------- | ------------------ |
7
- | 0.x | :white_check_mark: |
5
+ | Version | Supported |
6
+ |---------|-----------|
7
+ | 2.x | |
8
+ | 1.x | ❌ |
8
9
 
9
10
  ## Reporting a Vulnerability
10
11
 
11
12
  Peter Boling is the primary maintainer of this gem. Please find a way
12
13
  to [contact him directly](https://railsbling.com/contact) to report the issue. Include as much relevant information as
13
- possible.
14
+ possible.
@@ -0,0 +1,14 @@
1
+ module Rubocop
2
+ module Ruby24
3
+ class Railtie < Rails::Railtie
4
+ railtie_name :rubocop_ruby2_4
5
+
6
+ if Rails.env.test? || Rails.env.development?
7
+ rake_tasks do
8
+ path = File.expand_path(__dir__)
9
+ Dir.glob("#{path}/rakelib/**/*.rake").each { |f| load f }
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Rubocop
4
4
  module Ruby24
5
- VERSION = "1.0.2"
5
+ module Version
6
+ VERSION = "2.0.1"
7
+ end
6
8
  end
7
9
  end
@@ -1,9 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # external libs
4
+ require "version_gem"
5
+
6
+ # this gem
3
7
  require_relative "ruby2_4/version"
8
+ # :nocov:
9
+ require_relative "ruby2_4/railtie" if defined?(Rails::Railtie)
10
+ # :nocov:
4
11
 
5
12
  module Rubocop
6
13
  # Namespace of this library
7
14
  module Ruby24
15
+ module_function def install_tasks
16
+ load "rubocop/ruby2_4/tasks.rake"
17
+ end
8
18
  end
9
19
  end
20
+
21
+ Rubocop::Ruby24::Version.class_eval do
22
+ extend VersionGem::Basic
23
+ end
@@ -0,0 +1,11 @@
1
+ # Customizations/Deviations from Standard/Shopify for RuboCop-LTS Rails Coding Standards
2
+ inherit_from:
3
+ - ruby.yml
4
+ - strict/rails.yml
5
+
6
+ require:
7
+ - rubocop-rails
8
+ - standard-rails
9
+ - betterlint
10
+
11
+ # Rails specific customizations
@@ -0,0 +1,6 @@
1
+ # Customizations/Deviations from Standard/Shopify for RuboCop-LTS Rails w/ RSpec Coding Standards
2
+ inherit_from:
3
+ - rails.yml
4
+ - rspec.yml
5
+
6
+ # Rails/RSpec specific customizations
@@ -0,0 +1,9 @@
1
+ require:
2
+ # I setup RSpec on every project. Do you?
3
+ - rubocop-rspec
4
+
5
+ inherit_gem:
6
+ rspec-block_is_expected: rubocop.yml
7
+
8
+ inherit_from:
9
+ - strict/rspec.yml
@@ -0,0 +1,43 @@
1
+ # Customizations/Deviations from Standard/Shopify for Ruby Coding Standards
2
+
3
+ # We want Exclude directives from different
4
+ # config files to get merged, not overwritten
5
+ inherit_mode:
6
+ merge:
7
+ - Exclude
8
+
9
+ require:
10
+ # Loads the Standard Ruby suite of gems, and configures for rubocop-lts:
11
+ - standard-rubocop-lts
12
+ # The goal here is convention over configuration...
13
+ # In light of that, we are well past having convened on Markdown for README docs and such.
14
+ - rubocop-md
15
+ # Rubygems have Rakefile as a convention, and if they don't, why not?
16
+ - rubocop-rake
17
+ # In the vast majority of cases, we will want to be warned about thread unsafe code.
18
+ # In those cases where we intentionally have thread unsafe code,
19
+ # a rubocop:disable is the least of our concerns. :D
20
+ - rubocop-thread_safety
21
+ # RuboCop Gradual can be used in "Require mode", which is a way to replace rubocop with rubocop-gradual:
22
+ - rubocop/gradual/patch
23
+
24
+ inherit_gem:
25
+ standard-rubocop-lts: config/ruby-2.4.yml
26
+ # shopify rules will override standard's rules.
27
+ rubocop-shopify: rubocop.yml
28
+
29
+ inherit_from:
30
+ - strict/ruby.yml
31
+
32
+ AllCops:
33
+ # When the Ruby community, via RuboCop, adopts a new standard
34
+ # (with additional filtering by standard.rb and rubocop-shopify) it is good enough for us!
35
+ NewCops: enable
36
+
37
+ # Metrics cops are disabled in Standard by default
38
+ Metrics:
39
+ Enabled: true
40
+
41
+ # Ruby specific customizations
42
+ Layout/LineLength:
43
+ Max: 120
@@ -0,0 +1,6 @@
1
+ # Customizations/Deviations from Standard/Shopify for RuboCop-LTS Ruby w/ RSpec Coding Standards
2
+ inherit_from:
3
+ - ruby.yml
4
+ - rspec.yml
5
+
6
+ # Ruby/RSpec specific customizations
@@ -0,0 +1,6 @@
1
+ # Customizations/Deviations from Standard/Shopify for RubyGem Coding Standards
2
+ inherit_from:
3
+ - ruby.yml
4
+
5
+ require:
6
+ - rubocop-packaging
@@ -0,0 +1,4 @@
1
+ # Customizations/Deviations from Standard/Shopify for RubyGem w/ RSpec Coding Standards
2
+ inherit_from:
3
+ - rubygem.yml
4
+ - rspec.yml
@@ -0,0 +1,22 @@
1
+ # These Cops Must Always Be Enabled!
2
+ # These Cops check for things that are *literally* bugs,
3
+ # and no code should ever be released that fails these cops.
4
+ #
5
+ # The Exclude: [] is crucial here:
6
+ # even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here,
7
+ # thus, re-activating these cops for all the files.
8
+ #
9
+ # These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors.
10
+ # Fortunately this project doesn't rely on TODOs, instead relying on a rubocop_gradual lockfile.
11
+ #
12
+ Rails/Output: # Don't leave puts-debugging
13
+ Enabled: true
14
+ Exclude: []
15
+
16
+ Rails/FindEach: # each could severely affect the performance, use find_each
17
+ Enabled: true
18
+ Exclude: []
19
+
20
+ Rails/UniqBeforePluck: # uniq.pluck and not pluck.uniq
21
+ Enabled: true
22
+ Exclude: []
@@ -0,0 +1,14 @@
1
+ # These Cops Must Always Be Enabled!
2
+ # These Cops check for things that are *literally* bugs,
3
+ # and no code should ever be released that fails these cops.
4
+ #
5
+ # The Exclude: [] is crucial here:
6
+ # even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here,
7
+ # thus, re-activating these cops for all the files.
8
+ #
9
+ # These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors.
10
+ # Fortunately this project doesn't rely on TODOs, instead relying on a rubocop_gradual lockfile.
11
+ #
12
+ RSpec/Focus: # run ALL tests on CI
13
+ Enabled: true
14
+ Exclude: []
@@ -0,0 +1,14 @@
1
+ # These Cops Must Always Be Enabled!
2
+ # These Cops check for things that are *literally* bugs,
3
+ # and no code should ever be released that fails these cops.
4
+ #
5
+ # The Exclude: [] is crucial here:
6
+ # even if our .rubocop_todo.yml contained exclusions for strict cops, we nullify them here,
7
+ # thus, re-activating these cops for all the files.
8
+ #
9
+ # These settings must be loaded after any files of "TODOs" that instruct RuboCop to ignore errors.
10
+ # Fortunately this project doesn't rely on TODOs, instead relying on a rubocop_gradual lockfile.
11
+ #
12
+ Lint/Debugger: # don't leave binding.pry
13
+ Enabled: true
14
+ Exclude: []
data/rubocop.yml CHANGED
@@ -1,3 +1,15 @@
1
- AllCops:
2
- TargetRubyVersion: 2.4
3
- NewCops: enable
1
+ # Change the file you inherit if you:
2
+ # * use Rails,
3
+ # * are creating a RubyGem, or
4
+ # * don't use RSpec
5
+ # As follows:
6
+ # inherit_gem:
7
+ # # Pick one:
8
+ # # rubocop-ruby2_4: rubocop-lts/rails_rspec.yml # or rubocop-lts/rails.yml w/o rspec
9
+ # # rubocop-ruby2_4: rubocop-lts/ruby_rspec.yml # or rubocop-lts/ruby.yml w/o rspec
10
+ # # rubocop-ruby2_4: rubocop-lts/rubygem_rspec.yml # or rubocop-lts/rubygem.yml w/o rspec
11
+ # # Convention over configuration, hence loading this file just only Ruby and RSpec defaults:
12
+ # rubocop-ruby2_4: rubocop.yml # for the ruby + rspec
13
+
14
+ inherit_from:
15
+ - rubocop-lts/ruby_rspec.yml
@@ -1,6 +1,8 @@
1
1
  module Rubocop
2
2
  module Ruby24
3
- VERSION: String
4
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
3
+ module Version
4
+ VERSION: String
5
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
6
+ end
5
7
  end
6
8
  end
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ |��텗�̵�_�"b��!� ѓ��w�j��<���� �m�У��6�8R3�.�Aj�x]��� ��_qgr8���;w��X<�
metadata CHANGED
@@ -1,58 +1,210 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ruby2_4
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
8
8
  autorequire:
9
9
  bindir: exe
10
- cert_chain: []
11
- date: 2022-05-02 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
14
+ ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
15
+ A2NvbTAeFw0yMjA5MTgyMzEyMzBaFw0yMzA5MTgyMzEyMzBaMEMxFTATBgNVBAMM
16
+ DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
17
+ LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA2Dn1GM3W
18
+ 8K2/rvN1zz+06bQMcxD16ZKTihVwi7Pb1v3T98rM4Omnxohm3s+CwpDWGeiB9pj6
19
+ 0I/CTce0e4e3s8GKJSOrg93veImPSoH2PfsMsRsuB8wtqyiOCjLbF5o6S29x87r0
20
+ LA5EawH+Lh4xqrkkPjdffsmLk7TaCig/vlmNvnzxXKBdey/X/aEJZXzzBiWRfVdh
21
+ O1fmMbVKyieGv9HK7+pLotIoT08bjDv8NP6V7zZslwQRqW27bQc6cqC2LGIbTYO3
22
+ 3jt1kQxfMWmhOictS6SzG9VtKSrXf0L4Neq0Gh7CLBZBvJFWJYZPfb92YNITDbd8
23
+ emPOAQlXXNMN4mMXsEqtEhCPZRMnmwO+fOk/cC4AyglKi9lnQugCQoFV1XDMZST/
24
+ CYbzdQyadOdPDInTntG6V+Uw51d2QGXZ6PDDfrx9+toc/3sl5h68rCUGgE6Q3jPz
25
+ srinqmBsxv2vTpmd4FjmiAtEnwH5/ooLpQYL8UdAjEoeysxS3AwIh+5dAgMBAAGj
26
+ fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQWU6D156a2cle+
27
+ lb5RBfvVXlxTwjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
28
+ A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
29
+ ggGBAJ4SqhPlgUiLYIrphGXIaxXScHyvx4kixuvdrwhI4VoQV2qXvO7R6ZjOXVwX
30
+ f/z84BWPiTZ8lzThPbt1UV/BGwkvLw9I4RjOdzvUz3J42j9Ly6q63isall07bo3F
31
+ QWe/OBvIMBF1IbjC3q5vKPg4rq8+TkNRJNoE86U2gfR+PkW3jYYs9uiy0GloHDCP
32
+ k5xgaj0vSL0Uy5mTOPdk3K6a/sUGZyYniWK05zdhIi956ynhfGaFO988FFdVw5Jq
33
+ LHtXfIpAU8F7ES04syZSslxOluw7VlcSKyRdVIr737J92ZTduppB4PRGSKRgBsWV
34
+ hXTahRE72Kyw53Q7FAuzF3v102WxAAQ7BuMjW+MyCUT75fwPm3W4ELPL8HYkNGE7
35
+ 2oA5CPghFitRnvYS3GNrDG+9bNiRMEskeaBYwZ9UgReBQIwGYVj7LZk3UhiAsn44
36
+ gwGrEXGQGDZ0NIgBcmvMOqlXjkGQwQvugKycJ024z89+fz2332vdZIKTrSxJrXGk
37
+ 4/bR9A==
38
+ -----END CERTIFICATE-----
39
+ date: 2023-05-18 00:00:00.000000000 Z
12
40
  dependencies:
13
41
  - !ruby/object:Gem::Dependency
14
- name: rubocop
42
+ name: rubocop-gradual
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
- - - '='
45
+ - - "~>"
18
46
  - !ruby/object:Gem::Version
19
- version: 1.12.1
47
+ version: '0.3'
20
48
  type: :runtime
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
- - - '='
52
+ - - "~>"
25
53
  - !ruby/object:Gem::Version
26
- version: 1.12.1
54
+ version: '0.3'
27
55
  - !ruby/object:Gem::Dependency
28
- name: rake
56
+ name: rubocop-md
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.6'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.6'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-shopify
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.13'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.13'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-thread_safety
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.5'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.5'
111
+ - !ruby/object:Gem::Dependency
112
+ name: standard-rubocop-lts
29
113
  requirement: !ruby/object:Gem::Requirement
30
114
  requirements:
31
115
  - - ">="
32
116
  - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
117
+ version: 1.0.1
118
+ - - "<"
119
+ - !ruby/object:Gem::Version
120
+ version: '2'
121
+ type: :runtime
35
122
  prerelease: false
36
123
  version_requirements: !ruby/object:Gem::Requirement
37
124
  requirements:
38
125
  - - ">="
39
126
  - !ruby/object:Gem::Version
40
- version: '0'
127
+ version: 1.0.1
128
+ - - "<"
129
+ - !ruby/object:Gem::Version
130
+ version: '2'
41
131
  - !ruby/object:Gem::Dependency
42
- name: rspec
132
+ name: version_gem
43
133
  requirement: !ruby/object:Gem::Requirement
44
134
  requirements:
45
135
  - - ">="
46
136
  - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
137
+ version: 1.1.2
138
+ - - "<"
139
+ - !ruby/object:Gem::Version
140
+ version: '3'
141
+ type: :runtime
49
142
  prerelease: false
50
143
  version_requirements: !ruby/object:Gem::Requirement
51
144
  requirements:
52
145
  - - ">="
53
146
  - !ruby/object:Gem::Version
54
- version: '0'
55
- description: Links dependency on minimum Ruby version to maximum Rubocop version
147
+ version: 1.1.2
148
+ - - "<"
149
+ - !ruby/object:Gem::Version
150
+ version: '3'
151
+ - !ruby/object:Gem::Dependency
152
+ name: rubocop-packaging
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: '0.5'
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: '0.5'
165
+ - !ruby/object:Gem::Dependency
166
+ name: rubocop-rspec
167
+ requirement: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '2.22'
172
+ type: :development
173
+ prerelease: false
174
+ version_requirements: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - "~>"
177
+ - !ruby/object:Gem::Version
178
+ version: '2.22'
179
+ - !ruby/object:Gem::Dependency
180
+ name: standard-rails
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - "~>"
184
+ - !ruby/object:Gem::Version
185
+ version: '0.1'
186
+ type: :development
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - "~>"
191
+ - !ruby/object:Gem::Version
192
+ version: '0.1'
193
+ - !ruby/object:Gem::Dependency
194
+ name: betterlint
195
+ requirement: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - "~>"
198
+ - !ruby/object:Gem::Version
199
+ version: '1.4'
200
+ type: :development
201
+ prerelease: false
202
+ version_requirements: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - "~>"
205
+ - !ruby/object:Gem::Version
206
+ version: '1.4'
207
+ description: Configure RuboCop + a bevy of friends to gradually lint Ruby 2.4 code
56
208
  email:
57
209
  - peter.boling@gmail.com
58
210
  executables: []
@@ -66,22 +218,31 @@ files:
66
218
  - README.md
67
219
  - SECURITY.md
68
220
  - lib/rubocop/ruby2_4.rb
221
+ - lib/rubocop/ruby2_4/railtie.rb
69
222
  - lib/rubocop/ruby2_4/version.rb
223
+ - rubocop-lts/rails.yml
224
+ - rubocop-lts/rails_rspec.yml
225
+ - rubocop-lts/rspec.yml
226
+ - rubocop-lts/ruby.yml
227
+ - rubocop-lts/ruby_rspec.yml
228
+ - rubocop-lts/rubygem.yml
229
+ - rubocop-lts/rubygem_rspec.yml
230
+ - rubocop-lts/strict/rails.yml
231
+ - rubocop-lts/strict/rspec.yml
232
+ - rubocop-lts/strict/ruby.yml
70
233
  - rubocop.yml
71
234
  - sig/rubocop/ruby2_4.rbs
72
- - spec/config/rspec/rspec_core.rb
73
- - spec/rubocop/ruby2_4_spec.rb
74
- - spec/spec_helper.rb
75
- homepage: https://github.com/rubocop-semver/rubocop-ruby2_4
235
+ homepage: https://github.com/rubocop-lts/rubocop-ruby2_4
76
236
  licenses:
77
237
  - MIT
78
238
  metadata:
79
- homepage_uri: https://github.com/rubocop-semver/rubocop-ruby2_4
80
- source_code_uri: https://github.com/rubocop-semver/rubocop-ruby2_4/tree/v1.0.2
81
- changelog_uri: https://github.com/rubocop-semver/rubocop-ruby2_4/blob/v1.0.2/CHANGELOG.md
82
- bug_tracker_uri: https://github.com/rubocop-semver/rubocop-ruby2_4/issues
83
- documentation_uri: https://www.rubydoc.info/gems/rubocop-ruby2_4/1.0.2
84
- wiki_uri: https://github.com/rubocop-semver/rubocop-ruby2_4/wiki
239
+ homepage_uri: https://github.com/rubocop-lts/rubocop-ruby2_4
240
+ source_code_uri: https://github.com/rubocop-lts/rubocop-ruby2_4/tree/v2.0.1
241
+ changelog_uri: https://github.com/rubocop-lts/rubocop-ruby2_4/blob/v2.0.1/CHANGELOG.md
242
+ bug_tracker_uri: https://github.com/rubocop-lts/rubocop-ruby2_4/issues
243
+ documentation_uri: https://www.rubydoc.info/gems/rubocop-ruby2_4/2.0.1
244
+ funding_uri: https://liberapay.com/pboling
245
+ wiki_uri: https://github.com/rubocop-lts/rubocop-ruby2_4/wiki
85
246
  rubygems_mfa_required: 'true'
86
247
  post_install_message:
87
248
  rdoc_options: []
@@ -91,18 +252,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
252
  requirements:
92
253
  - - ">="
93
254
  - !ruby/object:Gem::Version
94
- version: 2.4.0
255
+ version: '2.7'
95
256
  required_rubygems_version: !ruby/object:Gem::Requirement
96
257
  requirements:
97
258
  - - ">="
98
259
  - !ruby/object:Gem::Version
99
260
  version: '0'
100
261
  requirements: []
101
- rubygems_version: 3.3.12
262
+ rubygems_version: 3.4.13
102
263
  signing_key:
103
264
  specification_version: 4
104
- summary: Semantically Versioned Rubocop Dependency
105
- test_files:
106
- - spec/config/rspec/rspec_core.rb
107
- - spec/rubocop/ruby2_4_spec.rb
108
- - spec/spec_helper.rb
265
+ summary: 'Rules for Rubies: Rubocop + Standard + Betterlint + Shopify + Gradual'
266
+ test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1,4 @@
1
+ �=�}�ہ:�����w�!��tEO>/���w��2V��Y`�M����SS�~r�A1�Q}tĈ0�� ��
2
+ PJ�d��IY�`�Cd>mL�GZ0�bL���~�v�f:A|�e�3 �@h�B��i&)lr
3
+ �AD?@K%�i��~h9��IsX]��{M��M�E���[���l'1�g��Ϙ W
4
+ ����ӏ����Q ]?G�������#fj���I����ϻ%�t��E�S�8��]4�pRHZ$�҅�_�n��p�5�
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- RSpec.configure do |config|
4
- # Enable flags like --only-failures and --next-failure
5
- config.example_status_persistence_file_path = ".rspec_status"
6
-
7
- # Disable RSpec exposing methods globally on `Module` and `main`
8
- config.disable_monkey_patching!
9
-
10
- config.expect_with :rspec do |c|
11
- c.syntax = :expect
12
- end
13
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- RSpec.describe Rubocop::Ruby24 do
4
- it "has a version number" do
5
- expect(Rubocop::Ruby24::VERSION).not_to be nil
6
- end
7
- end
data/spec/spec_helper.rb DELETED
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- DEBUG = ENV.fetch("DEBUG", nil) == "true"
4
-
5
- ruby_version = Gem::Version.new(RUBY_VERSION)
6
- minimum_version = ->(version, engine = "ruby") { ruby_version >= Gem::Version.new(version) && RUBY_ENGINE == engine }
7
- actual_version = lambda do |major, minor|
8
- actual = Gem::Version.new(ruby_version)
9
- major == actual.segments[0] && minor == actual.segments[1] && RUBY_ENGINE == "ruby"
10
- end
11
- debugging = minimum_version.call("2.7") && DEBUG
12
- RUN_COVERAGE = minimum_version.call("2.6") && (ENV.fetch("COVER_ALL",
13
- nil) || ENV.fetch("CI_CODECOV", nil) || ENV["CI"].nil?)
14
- ALL_FORMATTERS = actual_version.call(2,
15
- 7) && (ENV.fetch("COVER_ALL",
16
- nil) || ENV.fetch("CI_CODECOV", nil) || ENV.fetch("CI", nil))
17
-
18
- if DEBUG
19
- if debugging
20
- require "byebug"
21
- elsif minimum_version.call("2.7", "jruby")
22
- require "pry-debugger-jruby"
23
- end
24
- end
25
-
26
- require "simplecov" if RUN_COVERAGE
27
-
28
- # This gem
29
- require "rubocop/ruby2_4"
30
-
31
- # RSpec Configs
32
- require "config/rspec/rspec_core"