optimum-energy-rubocop 0.7.3 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Dockerfile +1 -1
- data/Gemfile.lock +34 -16
- data/README.md +4 -3
- data/VERSION.txt +1 -1
- data/deployment.env.encrypted +1 -1
- data/example/example.rb +5 -0
- data/optimum-energy-rubocop.gemspec +2 -1
- data/optimum_energy_rubocop.yml +41 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8a48fe93810295e73baba85384c88d9f8c65577793e958cf90d1c4a01a04378
|
4
|
+
data.tar.gz: 005de9b95f4c3b966cf57140e1df36c6b842821d147721bed594fe999aaf2410
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d9055756cdc55b425d6461b1768396a7030751bb696d4264e98c52475e1e5e82d6123f4ac493e415dc58c506abf704fddf1e229de4138cc3f593c01b8a0c322
|
7
|
+
data.tar.gz: 9756e319ec2db19a33a5021fcdaaadefb1183cbf811b104e077331c313c14ce0cf69787cc69bcbf4dcd1c449c13230fb86bb24f58add8598ff31df865a6a02b5
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.1
|
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,34 +1,52 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
optimum-energy-rubocop (0.7.
|
4
|
+
optimum-energy-rubocop (0.7.5)
|
5
5
|
rubocop (~> 0.80)
|
6
|
-
rubocop-rails (~> 2.
|
6
|
+
rubocop-rails (~> 2.7.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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.
|
20
|
-
jaro_winkler (~> 1.5.1)
|
29
|
+
rubocop (0.88.0)
|
21
30
|
parallel (~> 1.10)
|
22
|
-
parser (>= 2.7.
|
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, <
|
27
|
-
rubocop-
|
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.
|
43
|
+
rubocop (>= 0.87.0)
|
30
44
|
ruby-progressbar (1.10.1)
|
31
|
-
|
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.
|
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 [
|
28
|
-
is bumped in both the [VERSION.txt](VERSION.txt) and
|
29
|
-
version is not changed, repos consuming this gem will not
|
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
|
|
data/VERSION.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.8
|
data/deployment.env.encrypted
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
codeship:v2
|
2
|
-
|
2
|
+
IKBJYRm4ObjGLsvovpL6Ov+IwE3JgQtN2ckNn2AbftoBWh9gEKXDRD9LPhZfKPiaDTNrUWIvNFKNqGI6eMNm6r5Uu/1iHZdnmwoP5t9pv+4t8S+dYsSfzNhvJ9psisoN1hTT/8+CtxyZ13BEhS4ejF2aUZ+8IePxKLr+NTk=
|
data/example/example.rb
ADDED
@@ -1,6 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "optimum-energy-rubocop"
|
3
3
|
spec.version = File.read("VERSION.txt")
|
4
|
+
spec.required_ruby_version = "~> 2.7"
|
4
5
|
spec.authors = [ "Optimum Energy" ]
|
5
6
|
|
6
7
|
spec.summary = "The shared Rubocop configuration for Optimum Energy"
|
@@ -10,5 +11,5 @@ Gem::Specification.new do |spec|
|
|
10
11
|
spec.files = `git ls-files -z`.split("\x0")
|
11
12
|
|
12
13
|
spec.add_dependency "rubocop", "~> 0.80"
|
13
|
-
spec.add_dependency "rubocop-rails", "~> 2.
|
14
|
+
spec.add_dependency "rubocop-rails", "~> 2.7.1"
|
14
15
|
end
|
data/optimum_energy_rubocop.yml
CHANGED
@@ -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
|
|
@@ -199,9 +229,17 @@ Style/EachWithObject:
|
|
199
229
|
Style/EmptyMethod:
|
200
230
|
AutoCorrect: false
|
201
231
|
|
232
|
+
Style/ExponentialNotation:
|
233
|
+
Enabled: true
|
234
|
+
AutoCorrect: true
|
235
|
+
|
202
236
|
Style/FormatString:
|
203
237
|
EnforcedStyle: percent
|
204
238
|
|
239
|
+
# This rule is wrong for Rails validation messages.
|
240
|
+
Style/FormatStringToken:
|
241
|
+
Enabled: false
|
242
|
+
|
205
243
|
# TODO: This won't be necessary when we upgrade to Ruby 3.0. Until then, rather than adding a
|
206
244
|
# comment to every file, we should only add it to the files where it's necessary.
|
207
245
|
Style/FrozenStringLiteralComment:
|
@@ -231,6 +269,9 @@ Style/RegexpLiteral:
|
|
231
269
|
Style/ReturnNil:
|
232
270
|
Enabled: true
|
233
271
|
|
272
|
+
Style/SlicingWithRange:
|
273
|
+
Enabled: true
|
274
|
+
|
234
275
|
Style/StringLiterals:
|
235
276
|
EnforcedStyle: double_quotes
|
236
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.
|
4
|
+
version: 0.7.8
|
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-
|
11
|
+
date: 2020-12-16 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.
|
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.
|
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
|
@@ -69,9 +70,9 @@ require_paths:
|
|
69
70
|
- lib
|
70
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
71
72
|
requirements:
|
72
|
-
- - "
|
73
|
+
- - "~>"
|
73
74
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
75
|
+
version: '2.7'
|
75
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
77
|
requirements:
|
77
78
|
- - ">="
|