rubocop_plus 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Rakefile +1 -0
- data/bin/console +0 -1
- data/config/group/rspec.yml +1 -1
- data/config/rubocop.yml +1 -0
- data/lib/commands/rubo/helpers/misc.rb +1 -1
- data/lib/commands/rubo/helpers/output.rb +1 -1
- data/lib/commands/rubo/helpers/validations.rb +1 -1
- data/lib/rubocop_plus.rb +0 -2
- data/lib/rubocop_plus/version.rb +2 -2
- data/rubocop_plus.gemspec +3 -3
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65897caabe5f4017874f4532a1259c2b9b90541e2f1dfc4c2de3ce047f2df299
|
4
|
+
data.tar.gz: 29a23d79a0d879e362e05507ec0a8434a17e7b745ba34270d034c488467b3027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ebc33894ac564b44eb5a63bc97dc1c7c2441c6b35c35a17e5f60da1e632045f739707a4a8fe9e250228770ac99db76995dfc448858a33c98e87be748bababbb
|
7
|
+
data.tar.gz: 622da0f0635ee48b543059a69bc1ab1e34975c7bcfe767b647edb587baa1599c94385496030cd1b74783281f84d1078c5344985e18e53f1c1cbdd6f32487b5e8
|
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.1.0 (Dec 21, 2020)
|
6
|
+
|
7
|
+
1. [#94](../../issues/94): Use `rubocop-rails` `2.9.1`.
|
8
|
+
1. [#96](../../issues/96): Use `rubocop` `1.6.1`.
|
9
|
+
1. [#98](../../issues/98): Change `Capybara/FeatureMethods` to `RSpec/Capybara`.
|
10
|
+
1. [#102](../../issues/102): Use `rubocop-rspec` `2.1.0`.
|
11
|
+
1. [#105](../../issues/105): Use `rubocop-performance` `1.9.1`.
|
12
|
+
1. [#109](../../issues/109): Require `rubocop-rake`.
|
13
|
+
|
5
14
|
## 2.0.0 (Nov 29, 2020)
|
6
15
|
|
7
16
|
1. [#79](../../issues/79): Use `rubocop` `1.4.2`.
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -6,7 +6,6 @@ require "rubocop_plus"
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
8
8
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
9
|
require "pry"
|
11
10
|
Pry.start
|
12
11
|
|
data/config/group/rspec.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Blocks the use of Capybara style methods like `feature`, `scenario, `given`, etc... Allow the use of some of these methods.
|
2
2
|
# https://github.com/rubocop-hq/rubocop-rspec/blob/v1.37.1/lib/rubocop/cop/rspec/capybara/feature_methods.rb
|
3
|
-
Capybara
|
3
|
+
RSpec/Capybara:
|
4
4
|
EnabledMethods:
|
5
5
|
- feature
|
6
6
|
- scenario
|
data/config/rubocop.yml
CHANGED
@@ -18,7 +18,7 @@ module RubocopPlus
|
|
18
18
|
# \s* - match 0-N white space characters
|
19
19
|
# rubocop_plus - match the gem_name exactly once
|
20
20
|
# \s - match one white space character (it will always be a space or a \n)
|
21
|
-
File.foreach("Gemfile.lock") { |line| return true if
|
21
|
+
File.foreach("Gemfile.lock") { |line| return true if /^\s*rubocop_plus\s/.match?(line) }
|
22
22
|
false
|
23
23
|
end
|
24
24
|
|
@@ -19,7 +19,7 @@ module RubocopPlus
|
|
19
19
|
def determine_total_violations_count
|
20
20
|
total_line = ""
|
21
21
|
File.readlines(style_counts_text_file_name).each { |line| total_line = line if line.include?("Total") }
|
22
|
-
@total_violations = total_line.empty? ? 0 : total_line.split
|
22
|
+
@total_violations = total_line.empty? ? 0 : total_line.split.first.to_i
|
23
23
|
end
|
24
24
|
|
25
25
|
# Return the total violations count from the last rubocop run and remember the result. This result should not do
|
@@ -50,7 +50,7 @@ module RubocopPlus
|
|
50
50
|
raise error, "#{prefix} The #{file_name} file is empty." if violations.nil? || violations.strip.empty?
|
51
51
|
|
52
52
|
violations = violations.strip
|
53
|
-
raise error, "#{prefix} The #{file_name} file contains non-digit characters." unless
|
53
|
+
raise error, "#{prefix} The #{file_name} file contains non-digit characters." unless /^\d*$/.match?(violations)
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
data/lib/rubocop_plus.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
require "rubocop_plus/version"
|
2
2
|
require "rubocop_plus/core_ext/string"
|
3
3
|
require "rubocop"
|
4
|
-
# require "rubocop-performance"
|
5
|
-
# require "rubocop-rails"
|
6
4
|
|
7
5
|
# Setup pry for development when running "rake console". Guard against load
|
8
6
|
# errors in production (since pry is not a runtime dependency in the .gemspec)
|
data/lib/rubocop_plus/version.rb
CHANGED
data/rubocop_plus.gemspec
CHANGED
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
|
|
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", "
|
33
|
-
spec.add_dependency "rubocop-rails", "
|
32
|
+
spec.add_dependency "rubocop-performance", "1.9.1"
|
33
|
+
spec.add_dependency "rubocop-rails", "2.9.1"
|
34
34
|
spec.add_dependency "rubocop-rake", "0.5.1"
|
35
|
-
spec.add_dependency "rubocop-rspec", "
|
35
|
+
spec.add_dependency "rubocop-rspec", "2.1.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.1.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-
|
11
|
+
date: 2020-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,42 +86,42 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: 1.6.1
|
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.6.1
|
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
103
|
version: 1.9.1
|
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
110
|
version: 1.9.1
|
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.9.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.9.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rubocop-rake
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,16 +140,16 @@ dependencies:
|
|
140
140
|
name: rubocop-rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2.
|
145
|
+
version: 2.1.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.1.0
|
153
153
|
description: Enhancements to the standard rubocop gem.
|
154
154
|
email:
|
155
155
|
- roberts@corlewsolutions.com
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
|
-
rubygems_version: 3.
|
217
|
+
rubygems_version: 3.2.0
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: Enhancements to the standard rubocop gem.
|