optimum-energy-rubocop 0.7.2 → 0.7.7

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: 0f0cd9f0166ac4ace7b49f917a78c87538580cf14af2bf62b72502b92378ca33
4
- data.tar.gz: 2d7667bd018bc5ef9eebb4e8b1ae9b36e75a0151b9e788ca8692a91540f96595
3
+ metadata.gz: 20c776d18b6b987d6b62b70e4059353cfc33a93369c3bf054b0536b3bda9df69
4
+ data.tar.gz: 63d893948684ae9a30e5ef249fa20aa94e2e8f45997dba8c645db34b6bb9f86f
5
5
  SHA512:
6
- metadata.gz: 7889df2b5efca3031974f35aa70d4b326cab878336806396ebaace3a6223f05698637fffcc98e533acdf25399af77da5fe51d79fe83d827cb23000436ecd50e2
7
- data.tar.gz: 7bbb608c029580ed08abb6bd2707d910ab444511c5545ba57d198582e97310dab43a7911463d763abc354f6696e6c1db18eaa68d7c5dcc197d05aa38ce444190
6
+ metadata.gz: 78582677dd14837e8b301ac1d435ac74d655db94a62dd08aa0d132958904ff9aa893179eb86e4ee18931a626ad3ebbac864fb4dbbf630d2eb8e63f5091891126
7
+ data.tar.gz: cfcabe6d8169de650e13c6cb2633494f8c383b14c1e5fb16d6cf4b3eb0a0d2a85ff37aae59cd67c90bf0955d96bb8bb32d7f341d6d49b7bd5ef68e9aaf7fc443
@@ -1 +1 @@
1
- 2.7.0
1
+ 2.7.1
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.7.0
1
+ FROM ruby:2.7.1
2
2
 
3
3
  # Install the dependencies
4
4
  ADD Gemfile Gemfile.lock .ruby-version optimum-energy-rubocop.gemspec VERSION.txt /app/
@@ -1,34 +1,52 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- optimum-energy-rubocop (0.7.2)
4
+ optimum-energy-rubocop (0.7.5)
5
5
  rubocop (~> 0.80)
6
- rubocop-rails (~> 2.4.2)
6
+ rubocop-rails (~> 2.7.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ast (2.4.0)
12
- jaro_winkler (1.5.4)
13
- parallel (1.19.1)
14
- parser (2.7.0.2)
15
- ast (~> 2.4.0)
16
- rack (2.2.2)
11
+ activesupport (6.0.3.2)
12
+ concurrent-ruby (~> 1.0, >= 1.0.2)
13
+ i18n (>= 0.7, < 2)
14
+ minitest (~> 5.1)
15
+ tzinfo (~> 1.1)
16
+ zeitwerk (~> 2.2, >= 2.2.2)
17
+ ast (2.4.1)
18
+ concurrent-ruby (1.1.6)
19
+ i18n (1.8.5)
20
+ concurrent-ruby (~> 1.0)
21
+ minitest (5.14.1)
22
+ parallel (1.19.2)
23
+ parser (2.7.1.4)
24
+ ast (~> 2.4.1)
25
+ rack (2.2.3)
17
26
  rainbow (3.0.0)
27
+ regexp_parser (1.7.1)
18
28
  rexml (3.2.4)
19
- rubocop (0.80.0)
20
- jaro_winkler (~> 1.5.1)
29
+ rubocop (0.88.0)
21
30
  parallel (~> 1.10)
22
- parser (>= 2.7.0.1)
31
+ parser (>= 2.7.1.1)
23
32
  rainbow (>= 2.2.2, < 4.0)
33
+ regexp_parser (>= 1.7)
24
34
  rexml
35
+ rubocop-ast (>= 0.1.0, < 1.0)
25
36
  ruby-progressbar (~> 1.7)
26
- unicode-display_width (>= 1.4.0, < 1.7)
27
- rubocop-rails (2.4.2)
37
+ unicode-display_width (>= 1.4.0, < 2.0)
38
+ rubocop-ast (0.2.0)
39
+ parser (>= 2.7.0.1)
40
+ rubocop-rails (2.7.1)
41
+ activesupport (>= 4.2.0)
28
42
  rack (>= 1.1)
29
- rubocop (>= 0.72.0)
43
+ rubocop (>= 0.87.0)
30
44
  ruby-progressbar (1.10.1)
31
- unicode-display_width (1.6.1)
45
+ thread_safe (0.3.6)
46
+ tzinfo (1.2.7)
47
+ thread_safe (~> 0.1)
48
+ unicode-display_width (1.7.0)
49
+ zeitwerk (2.4.0)
32
50
 
33
51
  PLATFORMS
34
52
  ruby
@@ -37,7 +55,7 @@ DEPENDENCIES
37
55
  optimum-energy-rubocop!
38
56
 
39
57
  RUBY VERSION
40
- ruby 2.7.0p0
58
+ ruby 2.7.1p83
41
59
 
42
60
  BUNDLED WITH
43
61
  2.1.4
data/README.md CHANGED
@@ -24,9 +24,10 @@ inherit_from:
24
24
 
25
25
  ## Updating This Gem
26
26
 
27
- After making changes to the rules in the [default.yml](default.yml) file, be sure that the version
28
- is bumped in both the [VERSION.txt](VERSION.txt) and [Gemfile.lock](Gemfile.lock) files. If the
29
- version is not changed, repos consuming this gem will not get the updates.
27
+ After making changes to the rules in the [optimum_energy_rubocop.yml](optimum_energy_rubocop.yml)
28
+ file, be sure that the version is bumped in both the [VERSION.txt](VERSION.txt) and
29
+ [Gemfile.lock](Gemfile.lock) files. If the version is not changed, repos consuming this gem will not
30
+ get the updates.
30
31
 
31
32
  ## Running Rubocop
32
33
 
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.7.7
@@ -0,0 +1,5 @@
1
+ # Rubocop ignores some rules when it only lints the Gemfile and gemspec files. This file serves as
2
+ # an example of a Ruby file so we can ensure all of the linter rules run without warnings or errors.
3
+ module Example
4
+ def example; end
5
+ end
@@ -10,5 +10,5 @@ Gem::Specification.new do |spec|
10
10
  spec.files = `git ls-files -z`.split("\x0")
11
11
 
12
12
  spec.add_dependency "rubocop", "~> 0.80"
13
- spec.add_dependency "rubocop-rails", "~> 2.4.2"
13
+ spec.add_dependency "rubocop-rails", "~> 2.7.1"
14
14
  end
@@ -4,6 +4,12 @@
4
4
  require: rubocop-rails
5
5
 
6
6
  AllCops:
7
+
8
+ # By default, Rubocop now displays warnings for all cops that are going to be enabled in the next
9
+ # minor version. This disables those cops. We'll pick them up when Rubocop decided they're good
10
+ # enough to enable by default for everyone.
11
+ NewCops: disable
12
+
7
13
  Exclude:
8
14
  - 'db/schema.rb'
9
15
  - 'bin/*'
@@ -21,6 +27,9 @@ Layout/BlockAlignment:
21
27
  Layout/CaseIndentation:
22
28
  EnforcedStyle: end
23
29
 
30
+ Layout/EmptyLinesAroundAttributeAccessor:
31
+ Enabled: true
32
+
24
33
  # Unfortuantely, this rule can't be refined to the point of being useful.
25
34
  Layout/EmptyLinesAroundMethodBody:
26
35
  Enabled: false
@@ -76,9 +85,19 @@ Layout/MultilineMethodCallIndentation:
76
85
  Layout/MultilineOperationIndentation:
77
86
  EnforcedStyle: indented
78
87
 
88
+ # Ideally we'd be able to configure begin/rescue blocks to align how our other blocks do, but for
89
+ # now there doesn't seem to be an option for it.
90
+ #
91
+ # TODO: Move this rule change to optimum-energy-rubocop-config.
92
+ Layout/RescueEnsureAlignment:
93
+ Enabled: false
94
+
79
95
  Layout/SpaceInsideArrayLiteralBrackets:
80
96
  EnforcedStyle: space
81
97
 
98
+ Layout/SpaceAroundMethodCallOperator:
99
+ Enabled: true
100
+
82
101
  Layout/SpaceAroundOperators:
83
102
  AllowForAlignment: false
84
103
 
@@ -92,11 +111,17 @@ Layout/SpaceInsideStringInterpolation:
92
111
  # LINT #
93
112
  ########
94
113
 
114
+ Lint/RaiseException:
115
+ Enabled: true
116
+
95
117
  # Rubocop has a nasty habit of removing inline rule declarations, even when they're necessary. This
96
118
  # disables that behavior.
97
119
  Lint/RedundantCopEnableDirective:
98
120
  AutoCorrect: false
99
121
 
122
+ Lint/StructNewOverride:
123
+ Enabled: true
124
+
100
125
  Lint/UnusedBlockArgument:
101
126
  AutoCorrect: false
102
127
 
@@ -165,6 +190,11 @@ Rails/Date:
165
190
  Rails/FilePath:
166
191
  Enabled: false
167
192
 
193
+ # By default, the Rubocop Rails rules warn against using has_and_belongs_to_many. This disables that
194
+ # behavior. Don't you tell me what to do Rubocop.
195
+ Rails/HasAndBelongsToMany:
196
+ Enabled: false
197
+
168
198
  Rails/NotNullColumn:
169
199
  Enabled: false
170
200
 
@@ -193,12 +223,23 @@ Style/Documentation:
193
223
  Style/DoubleNegation:
194
224
  Enabled: false
195
225
 
226
+ Style/EachWithObject:
227
+ Enabled: false
228
+
196
229
  Style/EmptyMethod:
197
230
  AutoCorrect: false
198
231
 
232
+ Style/ExponentialNotation:
233
+ Enabled: true
234
+ AutoCorrect: true
235
+
199
236
  Style/FormatString:
200
237
  EnforcedStyle: percent
201
238
 
239
+ # This rule is wrong for Rails validation messages.
240
+ Style/FormatStringToken:
241
+ Enabled: false
242
+
202
243
  # TODO: This won't be necessary when we upgrade to Ruby 3.0. Until then, rather than adding a
203
244
  # comment to every file, we should only add it to the files where it's necessary.
204
245
  Style/FrozenStringLiteralComment:
@@ -228,6 +269,9 @@ Style/RegexpLiteral:
228
269
  Style/ReturnNil:
229
270
  Enabled: true
230
271
 
272
+ Style/SlicingWithRange:
273
+ Enabled: true
274
+
231
275
  Style/StringLiterals:
232
276
  EnforcedStyle: double_quotes
233
277
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimum-energy-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Optimum Energy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-25 00:00:00.000000000 Z
11
+ date: 2020-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.4.2
33
+ version: 2.7.1
34
34
  type: :runtime
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: 2.4.2
40
+ version: 2.7.1
41
41
  description:
42
42
  email:
43
43
  executables: []
@@ -57,6 +57,7 @@ files:
57
57
  - codeship-services.yml
58
58
  - codeship-steps.yml
59
59
  - deployment.env.encrypted
60
+ - example/example.rb
60
61
  - optimum-energy-rubocop.gemspec
61
62
  - optimum_energy_rubocop.yml
62
63
  homepage: https://github.com/optimiumenergyco/optimum-energy-rubocop