rubocop-ruby3_1 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +27 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/CONTRIBUTING.md +25 -0
- data/LICENSE.txt +21 -0
- data/README.md +199 -0
- data/SECURITY.md +13 -0
- data/lib/rubocop/ruby3_1/version.rb +7 -0
- data/lib/rubocop/ruby3_1.rb +9 -0
- data/spec/config/rspec/rspec_core.rb +13 -0
- data/spec/rubocop/ruby3_1_spec.rb +7 -0
- data/spec/spec_helper.rb +32 -0
- metadata +106 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3f31b8b9109d858c72930a9e5176b45be9b8667b1d314fcb36d7daa21c9714b9
|
4
|
+
data.tar.gz: 4171563827322866fbcf4397c670e74a292dabcb4904a11323d75ed9674f3bd0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '0328d757a1337f8df7ebf139512b8b640365536d7e566be70d5aa80f62be2554e69e67026b76682208aa028777ddba0a355a71c03a8dcb8134c238bad6c9aacc'
|
7
|
+
data.tar.gz: 423217b369cc2f74d41a03170e1891753e9254e060eca6ab55a9f6b2a2da157b1d2fa1b8c081bf1c2c98551394567aaaa25639757a57f2a314eceacaa68b459c
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
### Added
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
### Removed
|
15
|
+
|
16
|
+
## [0.1.0] 2022-04-30
|
17
|
+
### Added
|
18
|
+
* Initial release
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
|
24
|
+
### Removed
|
25
|
+
|
26
|
+
[Unreleased]: https://github.com/rubocop-semver/rubocop-ruby3_1/compare/.v0.1.0...HEAD
|
27
|
+
[0.1.0]: https://github.com/rubocop-semver/rubocop-ruby3_1/compare/c4cc8fb6374d338e2c328812b4f74c78dfe5cfbd...v0.1.0
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at peter.boling@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
## Contributing
|
2
|
+
|
3
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/rubocop-semver/rubocop-ruby3_1][source]
|
4
|
+
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
+
the [code of conduct][conduct].
|
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!
|
8
|
+
|
9
|
+
## Contributors
|
10
|
+
|
11
|
+
[![Contributors](https://contrib.rocks/image?repo=rubocop-semver/rubocop-ruby3_1)][contributors]
|
12
|
+
|
13
|
+
Made with [contributors-img][contrib-rocks].
|
14
|
+
|
15
|
+
[comment]: <> (Following links are used by README, CONTRIBUTING)
|
16
|
+
|
17
|
+
[conduct]: https://github.com/rubocop-semver/rubocop-ruby3_1/blob/main/CODE_OF_CONDUCT.md
|
18
|
+
|
19
|
+
[contrib-rocks]: https://contrib.rocks
|
20
|
+
|
21
|
+
[contributors]: https://github.com/rubocop-semver/rubocop-ruby3_1/graphs/contributors
|
22
|
+
|
23
|
+
[comment]: <> (Following links are used by README, CONTRIBUTING, Homepage)
|
24
|
+
|
25
|
+
[source]: https://github.com/rubocop-semver/rubocop-ruby3_1/
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 Peter Boling
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,199 @@
|
|
1
|
+
<p align="center">
|
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-ruby3_1/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">
|
4
|
+
</a>
|
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-ruby3_1/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">
|
7
|
+
</a>
|
8
|
+
<a href="https://www.ruby-lang.org/" target="_blank" rel="noopener">
|
9
|
+
<img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby3_1/raw/main/docs/images/logo/ruby-logo.svg?raw=true" alt="Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5">
|
10
|
+
</a>
|
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-ruby3_1/raw/main/docs/images/logo/semver-light.svg?raw=true" alt="SemVer.org Logo by @maxhaz">
|
13
|
+
</a>
|
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-ruby3_1/raw/main/docs/images/logo/semver-dark.svg?raw=true" alt="SemVer.org Logo by @maxhaz">
|
16
|
+
</a>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
# Rubocop::Ruby31
|
20
|
+
|
21
|
+
See the intro [blog post](https://dev.to/pboling/rubocop-ruby-matrix-gems-nj)!
|
22
|
+
|
23
|
+
This gem requires no other gems. It depends on `rubocop`, but does not `require 'rubocop'`.
|
24
|
+
|
25
|
+
Awareness of `rubocop`'s lack of [SemVer][semver] adherence isn't evenly dispersed in the Ruby community.
|
26
|
+
|
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.
|
31
|
+
|
32
|
+
<p align="left">
|
33
|
+
<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-ruby3_1/raw/main/docs/images/rubocop-not-semver.png?raw=true" alt="Explanation of non-SemVer compliance, @bbatsov">
|
35
|
+
</a>
|
36
|
+
</p>
|
37
|
+
|
38
|
+
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
|
+
minimiszing 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) (
|
45
|
+
Rubocop documentation)
|
46
|
+
|
47
|
+
## Stable
|
48
|
+
|
49
|
+
All releases of this gem are stable releases. The first version is `1.0.0`.
|
50
|
+
|
51
|
+
## Installation
|
52
|
+
|
53
|
+
Install the gem and add to the application's Gemfile by executing:
|
54
|
+
|
55
|
+
$ bundle add rubocop-ruby3_1 -r false
|
56
|
+
|
57
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
58
|
+
|
59
|
+
$ gem install rubocop-ruby3_1
|
60
|
+
|
61
|
+
## Usage
|
62
|
+
|
63
|
+
The following is optional. We'll discuss why you might want to do this after you see what it does.
|
64
|
+
|
65
|
+
Add to the top of your project's RuboCop configuration file:
|
66
|
+
|
67
|
+
```yaml
|
68
|
+
inherit_gem:
|
69
|
+
rubocop-ruby3_1: rubocop.yml
|
70
|
+
```
|
71
|
+
|
72
|
+
This has the same effect as you declaring the following in your `.rubocop.yml`:
|
73
|
+
|
74
|
+
```yaml
|
75
|
+
AllCops:
|
76
|
+
# remove if already present in your `.rubocop.yml` to gain the full benefit of this gem!
|
77
|
+
TargetRubyVersion: 3.1
|
78
|
+
NewCops: enable
|
79
|
+
```
|
80
|
+
|
81
|
+
Let's talk about these settings.
|
82
|
+
|
83
|
+
## TargetRubyVersion
|
84
|
+
|
85
|
+
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.
|
86
|
+
|
87
|
+
## NewCops: enable
|
88
|
+
|
89
|
+
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.
|
90
|
+
|
91
|
+
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!
|
92
|
+
|
93
|
+
## Development
|
94
|
+
|
95
|
+
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.
|
96
|
+
|
97
|
+
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).
|
98
|
+
|
99
|
+
## Contributing
|
100
|
+
|
101
|
+
See [CONTRIBUTING.md][contributing]
|
102
|
+
|
103
|
+
## Contributors
|
104
|
+
|
105
|
+
[![Contributors](https://contrib.rocks/image?repo=rubocop-semver/rubocop-ruby3_1)]("https://github.com/rubocop-semver/rubocop-ruby3_1/graphs/contributors")
|
106
|
+
|
107
|
+
Made with [contributors-img](https://contrib.rocks).
|
108
|
+
|
109
|
+
## License
|
110
|
+
|
111
|
+
The gem is available as open source under the terms of
|
112
|
+
the [MIT License][license] [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][license-ref].
|
113
|
+
See [LICENSE][license] for the official [Copyright Notice][copyright-notice-explainer].
|
114
|
+
|
115
|
+
* Copyright (c) 2022 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
|
116
|
+
|
117
|
+
[copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
118
|
+
|
119
|
+
## Code of Conduct
|
120
|
+
|
121
|
+
Everyone interacting in the Rubocop::Ruby31 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rubocop-semver/rubocop-ruby3_1/blob/main/CODE_OF_CONDUCT.md).
|
122
|
+
|
123
|
+
## Versioning
|
124
|
+
|
125
|
+
This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations of this scheme should be reported as
|
126
|
+
bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be
|
127
|
+
immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new
|
128
|
+
major versions.
|
129
|
+
|
130
|
+
As a result of this policy, you can (and should) specify a dependency on this gem using
|
131
|
+
the [Pessimistic Version Constraint][pvc] with two digits of precision.
|
132
|
+
|
133
|
+
For example:
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
spec.add_dependency "rubocop-ruby3_1", "~> 0.1"
|
137
|
+
```
|
138
|
+
|
139
|
+
[copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
140
|
+
|
141
|
+
[gh_discussions]: https://github.com/rubocop-semver/rubocop-ruby3_1/discussions
|
142
|
+
|
143
|
+
[conduct]: https://github.com/rubocop-semver/rubocop-ruby3_1/blob/main/CODE_OF_CONDUCT.md
|
144
|
+
|
145
|
+
[contributing]: https://github.com/rubocop-semver/rubocop-ruby3_1/blob/main/CONTRIBUTING.md
|
146
|
+
|
147
|
+
[security]: https://github.com/rubocop-semver/rubocop-ruby3_1/blob/main/SECURITY.md
|
148
|
+
|
149
|
+
[license]: https://github.com/rubocop-semver/rubocop-ruby3_1/blob/main/LICENSE.txt
|
150
|
+
|
151
|
+
[license-ref]: https://opensource.org/licenses/MIT
|
152
|
+
|
153
|
+
[semver]: http://semver.org/
|
154
|
+
|
155
|
+
[pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
156
|
+
|
157
|
+
[railsbling]: http://www.railsbling.com
|
158
|
+
|
159
|
+
[peterboling]: http://www.peterboling.com
|
160
|
+
|
161
|
+
[aboutme]: https://about.me/peter.boling
|
162
|
+
|
163
|
+
[angelme]: https://angel.co/peter-boling
|
164
|
+
|
165
|
+
[coderme]:http://coderwall.com/pboling
|
166
|
+
|
167
|
+
[followme-img]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
|
168
|
+
|
169
|
+
[tweetme]: http://twitter.com/galtzo
|
170
|
+
|
171
|
+
[politicme]: https://nationalprogressiveparty.org
|
172
|
+
|
173
|
+
[documentation]: https://rubydoc.info/github/rubocop-semver/rubocop-ruby3_1/main
|
174
|
+
|
175
|
+
[source]: https://github.com/rubocop-semver/rubocop-ruby3_1/
|
176
|
+
|
177
|
+
[actions]: https://github.com/rubocop-semver/rubocop-ruby3_1/actions
|
178
|
+
|
179
|
+
[issues]: https://github.com/rubocop-semver/rubocop-ruby3_1/issues
|
180
|
+
|
181
|
+
[climate_maintainability]: https://codeclimate.com/github/rubocop-semver/rubocop-ruby3_1/maintainability
|
182
|
+
|
183
|
+
[climate_coverage]: https://codeclimate.com/github/rubocop-semver/rubocop-ruby3_1/test_coverage
|
184
|
+
|
185
|
+
[codecov_coverage]: https://codecov.io/gh/rubocop-semver/rubocop-ruby3_1
|
186
|
+
|
187
|
+
[code_triage]: https://www.codetriage.com/rubocop-semver/rubocop-ruby3_1
|
188
|
+
|
189
|
+
[blogpage]: http://www.railsbling.com/tags/rubocop-ruby3_1/
|
190
|
+
|
191
|
+
[rubygems]: https://rubygems.org/gems/rubocop-ruby3_1
|
192
|
+
|
193
|
+
[chat]: https://gitter.im/rubocop-semver/rubocop-ruby3_1?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
194
|
+
|
195
|
+
[maintenancee_policy]: https://guides.rubyonrails.org/maintenance_policy.html#security-issues
|
196
|
+
|
197
|
+
[liberapay_donate]: https://liberapay.com/pboling/donate
|
198
|
+
|
199
|
+
[gh_sponsors]: https://github.com/sponsors/pboling
|
data/SECURITY.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
| Version | Supported |
|
6
|
+
| ------- | ------------------ |
|
7
|
+
| 0.x | :white_check_mark: |
|
8
|
+
|
9
|
+
## Reporting a Vulnerability
|
10
|
+
|
11
|
+
Peter Boling is the primary maintainer of this gem. Please find a way
|
12
|
+
to [contact him directly](https://railsbling.com/contact) to report the issue. Include as much relevant information as
|
13
|
+
possible.
|
@@ -0,0 +1,13 @@
|
|
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
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,32 @@
|
|
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/ruby3_1"
|
30
|
+
|
31
|
+
# RSpec Configs
|
32
|
+
require "config/rspec/rspec_core"
|
metadata
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-ruby3_1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Peter Boling
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-05-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.28.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.28.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Links dependency on minimum Ruby version to maximum Rubocop version
|
56
|
+
email:
|
57
|
+
- peter.boling@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- CHANGELOG.md
|
63
|
+
- CODE_OF_CONDUCT.md
|
64
|
+
- CONTRIBUTING.md
|
65
|
+
- LICENSE.txt
|
66
|
+
- README.md
|
67
|
+
- SECURITY.md
|
68
|
+
- lib/rubocop/ruby3_1.rb
|
69
|
+
- lib/rubocop/ruby3_1/version.rb
|
70
|
+
- spec/config/rspec/rspec_core.rb
|
71
|
+
- spec/rubocop/ruby3_1_spec.rb
|
72
|
+
- spec/spec_helper.rb
|
73
|
+
homepage: https://github.com/rubocop-semver/rubocop-ruby3_1
|
74
|
+
licenses:
|
75
|
+
- MIT
|
76
|
+
metadata:
|
77
|
+
homepage_uri: https://github.com/rubocop-semver/rubocop-ruby3_1
|
78
|
+
source_code_uri: https://github.com/rubocop-semver/rubocop-ruby3_1/tree/v1.0.0
|
79
|
+
changelog_uri: https://github.com/rubocop-semver/rubocop-ruby3_1/blob/v1.0.0/CHANGELOG.md
|
80
|
+
bug_tracker_uri: https://github.com/rubocop-semver/rubocop-ruby3_1/issues
|
81
|
+
documentation_uri: https://www.rubydoc.info/gems/rubocop-ruby3_1/1.0.0
|
82
|
+
wiki_uri: https://github.com/rubocop-semver/rubocop-ruby3_1/wiki
|
83
|
+
rubygems_mfa_required: 'true'
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 3.1.0
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubygems_version: 3.3.12
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: Semantically Versioned Rubocop Dependency
|
103
|
+
test_files:
|
104
|
+
- spec/config/rspec/rspec_core.rb
|
105
|
+
- spec/rubocop/ruby3_1_spec.rb
|
106
|
+
- spec/spec_helper.rb
|