rubocop_plus 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/CHANGELOG.md +9 -0
- data/README.md +41 -23
- data/bin/setup +1 -2
- data/lib/rubocop_plus/version.rb +2 -2
- data/rubocop_plus.gemspec +5 -5
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2a5a3f7096bc2cc65ad56ea55001eca69499179a70438ee5180daca45847d48
|
4
|
+
data.tar.gz: 7d54cf03fe39f2d52eb25a6cbe7e64fc96907d013010b23e557e3003a325157f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6dc50ba8c07766287a025ef1fed3810cfbe958662360bb117cd258ce66b2dc3e0b14f1a076b209d98891de757f474548cf03198b02e4d78d812127877a2cae8
|
7
|
+
data.tar.gz: f88de6bb68e29536d8b08956e5790b0487825eac4a48171c0f22679b00bb564bad9d91d637893ff16f54419bbcb4f295430ca6669193c715a2a185d61811af25
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
Issues are tracked at https://github.com/roberts1000/rubocop_plus/issues. Changes marked as **(Internal)** support development or refactoring.
|
4
4
|
|
5
|
+
## 2.2.0 (May 16, 2021)
|
6
|
+
|
7
|
+
1. [#113](../../issues/113): Require `rubocop-rake`.
|
8
|
+
1. [#115](../../issues/115): Use `rubocop-performance` `1.11.3`.
|
9
|
+
1. [#116](../../issues/116): Drop support for Ruby 2.5.
|
10
|
+
1. [#118](../../issues/118): Use `rubocop` `1.14.0`.
|
11
|
+
1. [#121](../../issues/121): Use `rubocop-rails` `2.10.1`.
|
12
|
+
1. [#123](../../issues/123): Use `pry` `~> 0.14.1`. **(Internal)**
|
13
|
+
|
5
14
|
## 2.1.0 (Dec 21, 2020)
|
6
15
|
|
7
16
|
1. [#94](../../issues/94): Use `rubocop-rails` `2.9.1`.
|
data/README.md
CHANGED
@@ -1,72 +1,90 @@
|
|
1
1
|
# rubocop_plus
|
2
2
|
|
3
|
-
rubocop_plus is a gem that wraps around the community [rubocop
|
3
|
+
`rubocop_plus` is a Ruby gem that wraps around the community [rubocop](https://github.com/bbatsov/rubocop) gem. It makes changes and enhancements to the base `rubocop` gem by altering configuration and code. All configuration changes can be found in the `config` folder.
|
4
4
|
|
5
5
|
#### Disclaimer
|
6
6
|
|
7
|
-
rubocop_plus was built
|
7
|
+
`rubocop_plus` was built to store **my preferred** `rubocop` configuration and enhancements. **There is absolutely no association with the base rubocop project.** `rubocop_plus` was made public so it could be used by projects that I support, and to serve as a reference gem to anyone who wants to do something similar.
|
8
8
|
|
9
9
|
## Version Policy
|
10
10
|
|
11
11
|
Releases are versioned using [semver 2.0.0](https://semver.org/spec/v2.0.0.html).
|
12
12
|
|
13
|
+
Ruby versions that reach EOL will be removed without a major version bump.
|
14
|
+
|
15
|
+
## Supported Ruby Versions
|
16
|
+
|
17
|
+
Ruby 2.6.0+ is supported.
|
18
|
+
|
13
19
|
## Installation
|
14
20
|
|
15
|
-
|
21
|
+
Install `rubocop_plus` manually by executing:
|
16
22
|
|
17
23
|
$ gem install rubocop_plus
|
18
24
|
|
19
|
-
You can also place rubocop_plus
|
25
|
+
You can also place `rubocop_plus` into the `:development` group of your project's `Gemfile`:
|
20
26
|
|
21
27
|
```ruby
|
22
|
-
gem 'rubocop_plus'
|
28
|
+
gem 'rubocop_plus', group: :development
|
23
29
|
```
|
24
30
|
|
25
|
-
|
31
|
+
If the `rubocop` gem is listed in the `Gemfile`, remove it. `rubocop_plus` will install the version of `rubocop` that it wants to use.
|
26
32
|
|
27
|
-
|
33
|
+
Next, bundle the app:
|
28
34
|
|
29
35
|
$ bundle
|
30
36
|
|
31
|
-
Initialize your project's rubocop configuration
|
37
|
+
Initialize your project's `rubocop` configuration
|
32
38
|
|
33
39
|
$ rubo --init
|
34
40
|
|
35
41
|
This will create a specially configured `.rubocop.yml` inside the project root.
|
36
42
|
|
37
|
-
**Note:** Keep in mind, if you place rubocop_plus in a projects Gemfile, it will **lock** your project to the version of rubocop_plus that gets written to the Gemfile.lock file.
|
43
|
+
**Note:** Keep in mind, if you place `rubocop_plus` in a projects Gemfile, it will **lock** your project to the version of `rubocop_plus` that gets written to the Gemfile.lock file. If you're using a continuous integration platform, like Jenkins or Travis, this will likely restrict the CI tool to that same version - which is not always ideal. Some people prefer to have the CI platform **tell** the project which version of `rubocop_plus` to use. In that case, you should not put the `rubocop_plus` in the project's Gemfile.
|
38
44
|
|
39
45
|
## Usage
|
40
46
|
|
41
|
-
`rubocop_plus` provides a `rubo` command that you can
|
47
|
+
`rubocop_plus` provides a `rubo` command that you can use run to invoke `rubocop` in a standard manner. It will write all output to the `rubocop` folder inside the project. You can run `rubo --help` to see a list of commands. If `rubocop_plus` is included the project's Gemfile, rubo will execute the locked version. Otherwise, it will execute the latest version on the system.
|
42
48
|
|
43
49
|
#### Total Violation Count
|
44
50
|
|
45
|
-
The `rubo` command will create a `rubocop/total-violations-count.txt file` as part of the output.
|
51
|
+
The `rubo` command will create a `rubocop/total-violations-count.txt file` as part of the output. This file holds a single number that represents the total number of violations that were found by `rubocop`. This file was created so continuous integration tools like Jenkins or Travis could be configured to fail builds that have "too many" violations.
|
46
52
|
|
47
|
-
|
53
|
+
## Development
|
48
54
|
|
49
|
-
|
55
|
+
### Setup
|
50
56
|
|
51
|
-
|
52
|
-
1. Create a `.ruby-version` file and define your ruby version inside this file. The file should have a single value specifying the full ruby version (i.e 2.5.0).
|
53
|
-
1. Specify the `ruby` version in the Gemfile by adding `ruby File.read('.ruby-version', mode: 'rb').chomp` to the Gemfile. This will avoid duplication by reading the value out of the `.ruby-version` file.
|
57
|
+
Checkout the repo, `cd` into the project and run:
|
54
58
|
|
55
|
-
|
59
|
+
$ bin/setup
|
56
60
|
|
57
|
-
|
61
|
+
### Run the Test Suite
|
62
|
+
|
63
|
+
Run the test suite:
|
64
|
+
|
65
|
+
$ bin/start_rspec
|
66
|
+
|
67
|
+
### Start a Development Console
|
68
|
+
|
69
|
+
Start an interactive prompt that will allow you to experiment:
|
70
|
+
|
71
|
+
$ bin/console
|
72
|
+
|
73
|
+
### Workflow Advice
|
74
|
+
|
75
|
+
The easiest way to develop with the gem locally is to `cd` into another ruby project that can serve as a test bed. From the sample project's root folder, execute `../path/to/rubocop_rspec/exe/rubo`.
|
58
76
|
|
59
|
-
|
77
|
+
### Release a New Version
|
60
78
|
|
61
|
-
|
79
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`. This will create a git tag for the version, push git commits and tags, and push the gem to [rubygems.org](https://rubygems.org).
|
62
80
|
|
63
|
-
|
81
|
+
### Run rubocop_plus on Itself
|
64
82
|
|
65
|
-
To run rubocop_plus on itself, `cd` to the root of `rubocop_plus` and run `exe/rubo`. If you just run `rubo`, you
|
83
|
+
To run `rubocop_plus` on itself, `cd` to the root of `rubocop_plus` and run `exe/rubo`. If you just run `rubo`, you will invoke the installed version of `rubo` and not the version of `rubo` within the cloned project folder.
|
66
84
|
|
67
85
|
## Contributing
|
68
86
|
|
69
|
-
Contributions are welcome, but please be aware that rubocop_plus was created to serve the projects and teams that I directly support.
|
87
|
+
Contributions are welcome, but please be aware that `rubocop_plus` was created to serve the projects and teams that I directly support. Their needs and style preferences will always come first. To contribute, create an issue on the [GitHub Issue board](https://github.com/roberts1000/rubocop_plus/issues) and wait for feedback. Once the idea is approved, submit a Pull Request.
|
70
88
|
|
71
89
|
## License
|
72
90
|
|
data/bin/setup
CHANGED
data/lib/rubocop_plus/version.rb
CHANGED
data/rubocop_plus.gemspec
CHANGED
@@ -20,17 +20,17 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.required_ruby_version = ">= 2.
|
23
|
+
spec.required_ruby_version = ">= 2.6.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 2.0"
|
26
|
-
spec.add_development_dependency "pry", "~> 0.
|
26
|
+
spec.add_development_dependency "pry", "~> 0.14.1"
|
27
27
|
spec.add_development_dependency "rake", "~> 13.0"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.10.0"
|
29
29
|
|
30
30
|
spec.add_dependency "cri", "~> 2.0"
|
31
31
|
spec.add_dependency "rubocop", RubocopPlus::RUBOCOP_VERSION.to_s
|
32
|
-
spec.add_dependency "rubocop-performance", "1.
|
33
|
-
spec.add_dependency "rubocop-rails", "2.
|
32
|
+
spec.add_dependency "rubocop-performance", "1.11.3"
|
33
|
+
spec.add_dependency "rubocop-rails", "2.10.1"
|
34
34
|
spec.add_dependency "rubocop-rake", "0.5.1"
|
35
|
-
spec.add_dependency "rubocop-rspec", "2.
|
35
|
+
spec.add_dependency "rubocop-rspec", "2.3.0"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- roberts1000
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.14.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.14.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,42 +86,42 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.14.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: 1.14.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rubocop-performance
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.11.3
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
110
|
+
version: 1.11.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rubocop-rails
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 2.
|
117
|
+
version: 2.10.1
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 2.
|
124
|
+
version: 2.10.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop-rake
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2.
|
145
|
+
version: 2.3.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 2.
|
152
|
+
version: 2.3.0
|
153
153
|
description: Enhancements to the standard rubocop gem.
|
154
154
|
email:
|
155
155
|
- roberts@corlewsolutions.com
|
@@ -207,14 +207,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
207
|
requirements:
|
208
208
|
- - ">="
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
version: 2.
|
210
|
+
version: 2.6.0
|
211
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
|
-
rubygems_version: 3.2.
|
217
|
+
rubygems_version: 3.2.17
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: Enhancements to the standard rubocop gem.
|