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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65897caabe5f4017874f4532a1259c2b9b90541e2f1dfc4c2de3ce047f2df299
4
- data.tar.gz: 29a23d79a0d879e362e05507ec0a8434a17e7b745ba34270d034c488467b3027
3
+ metadata.gz: a2a5a3f7096bc2cc65ad56ea55001eca69499179a70438ee5180daca45847d48
4
+ data.tar.gz: 7d54cf03fe39f2d52eb25a6cbe7e64fc96907d013010b23e557e3003a325157f
5
5
  SHA512:
6
- metadata.gz: 8ebc33894ac564b44eb5a63bc97dc1c7c2441c6b35c35a17e5f60da1e632045f739707a4a8fe9e250228770ac99db76995dfc448858a33c98e87be748bababbb
7
- data.tar.gz: 622da0f0635ee48b543059a69bc1ab1e34975c7bcfe767b647edb587baa1599c94385496030cd1b74783281f84d1078c5344985e18e53f1c1cbdd6f32487b5e8
6
+ metadata.gz: e6dc50ba8c07766287a025ef1fed3810cfbe958662360bb117cd258ce66b2dc3e0b14f1a076b209d98891de757f474548cf03198b02e4d78d812127877a2cae8
7
+ data.tar.gz: f88de6bb68e29536d8b08956e5790b0487825eac4a48171c0f22679b00bb564bad9d91d637893ff16f54419bbcb4f295430ca6669193c715a2a185d61811af25
data/.travis.yml CHANGED
@@ -2,10 +2,9 @@ sudo: false
2
2
  cache: bundler
3
3
  language: ruby
4
4
  rvm:
5
- - 2.5
6
5
  - 2.6
7
6
  - 2.7
8
- before_install: gem install bundler -v 2.1.4
7
+ before_install: gem install bundler -v 2.2.2
9
8
  notifications:
10
9
  email:
11
10
  on_success: never # default: change
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 gem](https://github.com/bbatsov/rubocop). 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.
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 as a place to store **my preferred** rubocop configuration and enhancements, in a single location. **There is absolutely no association with the base rubocop project.** rubocop_plus was made public so it could be shared between multiple organizations that I support, and to serve as a reference gem to anyone who wants to do some similar.
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
- You can install rubocop_plus manually by performing
21
+ Install `rubocop_plus` manually by executing:
16
22
 
17
23
  $ gem install rubocop_plus
18
24
 
19
- You can also place rubocop_plus in your project's Gemfile
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
- Remove rubocop from the project's Gemfile and Gemfile.lock. rubocop_plus will install the version of rubocop that it wants to use.
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
- Then run
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. 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.
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 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.
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. 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.
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
- #### Specifying the Correct Ruby
53
+ ## Development
48
54
 
49
- rubocop needs to know which version of ruby to use to have a basis for evaluating your application. rubocop_plus does not perform any magic here, but we offer a recommendation on how to proceed:
55
+ ### Setup
50
56
 
51
- 1. Make sure your `.rubocop.yml` does not include the `TargetRubyVersion` key under `AllCops:`. If it is present, rubocop will always use that value.
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
- As of rubocop 0.52.1 (01/15/2018), rubocop does not look at the Gemfile to determine the ruby version. Hopefully that will change in the future. Until then, rubocop will pull the value out of the `.ruby-version` file and other services can read the value from `.ruby-version` or the `Gemfile`.
59
+ $ bin/setup
56
60
 
57
- ## Development
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
- 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.
77
+ ### Release a New Version
60
78
 
61
- The easiest way to test the gem locally is to `cd` into a ruby project that can serve as a test bed. From the sample project's root folder, execute `rubo` by typing the relative (or full path) to the `rubo` command where you cloned the rubocop_plus project. If your sample_app and rubocop_plus folder were in the same parent folder, your command would look like `../rubocop_plus/exe/rubo`.
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
- To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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'll be invoking the version of `rubo` that was installed by the latest installed version of the gem...not the version of `rubo` within the development folder of the gem.
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. 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.
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
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env bash
2
+
2
3
  set -euo pipefail
3
4
  IFS=$'\n\t'
4
5
  set -vx
5
6
 
6
7
  bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,4 +1,4 @@
1
1
  module RubocopPlus
2
- VERSION = "2.1.0".freeze
3
- RUBOCOP_VERSION = '1.6.1'.freeze
2
+ VERSION = "2.2.0".freeze
3
+ RUBOCOP_VERSION = '1.14.0'.freeze
4
4
  end
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.5.0"
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.13.1"
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.9.1"
33
- spec.add_dependency "rubocop-rails", "2.9.1"
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.1.0"
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.1.0
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: 2020-12-21 00:00:00.000000000 Z
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.13.1
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.13.1
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.6.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.6.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.9.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.9.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.9.1
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.9.1
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.1.0
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.1.0
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.5.0
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.0
217
+ rubygems_version: 3.2.17
218
218
  signing_key:
219
219
  specification_version: 4
220
220
  summary: Enhancements to the standard rubocop gem.