optimum-energy-rubocop 0.6.0 → 0.7.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: 67794bb0bf4239bffcd5d8098073d3e2b526685d744dd321c5a917774756f719
4
- data.tar.gz: ec01c103cb68d0d241e8c2941c7b17bee7540e8e62b16b40384b6fd9280457a9
3
+ metadata.gz: 3953de0cf2ab9f2ed23d74bb0e50eced6a4d1ed1f345131c6c27148ee62c8da1
4
+ data.tar.gz: 4434b3408b9cb0530aecc398ed9946043632799e47ae06e6ab73ddee3803fc0e
5
5
  SHA512:
6
- metadata.gz: 29a8664fc60b495fb6a31d9401de685033939651ea3cf13a00a3e71e54661628710da5c1d96b0ee3a5e519880f70d8b51e8428cf4dbf23579f5af060ea83f9da
7
- data.tar.gz: cc0bde362a48327490611af3059a276424605eb33044b95fd3a68311aba982094146c017699c4121d336a7609051dfd49082e712191941ad3c7f176208ab256f
6
+ metadata.gz: 48de0712de1a7f59adbdfed64af0c896644342914e0ca763fffc4a41a5ba1a7537c4b8a79d2bf179cc290c3ec1e652b3d65afe060f66f76409d324d98eb2d993
7
+ data.tar.gz: 1a39c1b9d255d418e7851d1deab5d5fab4c190604ba15532f82db25a629e690a4fbc18714d526c5d831cd3fb0556db8d591b141ed0877e4836810f7024e60ab4
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.4
1
+ 2.6.5
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM ruby:2.6.4
1
+ FROM ruby:2.6.5
2
2
 
3
3
  # Install the dependencies
4
4
  ADD Gemfile Gemfile.lock .ruby-version optimum-energy-rubocop.gemspec VERSION.txt /app/
data/Gemfile.lock CHANGED
@@ -1,25 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- optimum-energy-rubocop (0.6.0)
5
- rubocop (~> 0.74)
4
+ optimum-energy-rubocop (0.7.0)
5
+ rubocop (~> 0.78)
6
+ rubocop-rails (~> 2.4.0)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
11
  ast (2.4.0)
11
- jaro_winkler (1.5.3)
12
- parallel (1.17.0)
13
- parser (2.6.4.1)
12
+ jaro_winkler (1.5.4)
13
+ parallel (1.19.1)
14
+ parser (2.6.5.0)
14
15
  ast (~> 2.4.0)
16
+ rack (2.0.8)
15
17
  rainbow (3.0.0)
16
- rubocop (0.74.0)
18
+ rubocop (0.78.0)
17
19
  jaro_winkler (~> 1.5.1)
18
20
  parallel (~> 1.10)
19
21
  parser (>= 2.6)
20
22
  rainbow (>= 2.2.2, < 4.0)
21
23
  ruby-progressbar (~> 1.7)
22
24
  unicode-display_width (>= 1.4.0, < 1.7)
25
+ rubocop-rails (2.4.0)
26
+ rack (>= 1.1)
27
+ rubocop (>= 0.72.0)
23
28
  ruby-progressbar (1.10.1)
24
29
  unicode-display_width (1.6.0)
25
30
 
@@ -30,7 +35,7 @@ DEPENDENCIES
30
35
  optimum-energy-rubocop!
31
36
 
32
37
  RUBY VERSION
33
- ruby 2.6.4p104
38
+ ruby 2.6.5p114
34
39
 
35
40
  BUNDLED WITH
36
41
  1.17.2
data/README.md CHANGED
@@ -30,4 +30,4 @@ version is not changed, repos consuming this gem will not get the updates.
30
30
 
31
31
  ## Running Rubocop
32
32
 
33
- To run the cops, run `rubocop` from the command line.
33
+ To run the cops locally for this repo, run `bundle exec rubocop` from the command line.
data/VERSION.txt CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.0
@@ -9,5 +9,6 @@ Gem::Specification.new do |spec|
9
9
 
10
10
  spec.files = `git ls-files -z`.split("\x0")
11
11
 
12
- spec.add_dependency "rubocop", "~> 0.74"
12
+ spec.add_dependency "rubocop", "~> 0.78"
13
+ spec.add_dependency "rubocop-rails", "~> 2.4.0"
13
14
  end
@@ -1,31 +1,36 @@
1
1
  # This styleguide is built on top of the default Rubocop styleguide, located here:
2
2
  # https://github.com/bbatsov/rubocop/blob/master/config/default.yml.
3
3
 
4
+ require: rubocop-rails
5
+
4
6
  AllCops:
5
7
  Exclude:
6
8
  - 'db/schema.rb'
7
9
  - 'bin/*'
8
10
 
9
- Rails:
10
- Enabled: true
11
-
12
- Metrics/AbcSize:
13
- Enabled: false
14
-
15
- Layout/AlignHash:
16
- Enabled: false
11
+ ##########
12
+ # LAYOUT #
13
+ ##########
17
14
 
18
- Layout/AlignArguments:
15
+ Layout/ArgumentAlignment:
19
16
  EnforcedStyle: with_fixed_indentation
20
17
 
18
+ Layout/BlockAlignment:
19
+ EnforcedStyleAlignWith: start_of_block
20
+
21
21
  Layout/CaseIndentation:
22
22
  EnforcedStyle: end
23
23
 
24
+ # Unfortuantely, this rule can't be refined to the point of being useful.
25
+ Layout/EmptyLinesAroundMethodBody:
26
+ Enabled: false
27
+
28
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
29
+ Enabled: false
30
+
24
31
  Layout/EmptyLineAfterGuardClause:
25
32
  Enabled: false
26
33
 
27
- # Ideally, I would like to insert empty lines at the beginning on a class definition, but not at the
28
- # end. https://github.com/bbatsov/rubocop/issues/4812
29
34
  Layout/EmptyLinesAroundClassBody:
30
35
  Enabled: false
31
36
 
@@ -39,6 +44,8 @@ Layout/EmptyLineBetweenDefs:
39
44
  AllowAdjacentOneLineDefs: true
40
45
  NumberOfEmptyLines: 1
41
46
 
47
+ Layout/EndAlignment:
48
+ EnforcedStyleAlignWith: start_of_line
42
49
 
43
50
  Layout/EndOfLine:
44
51
  EnforcedStyle: lf
@@ -46,15 +53,23 @@ Layout/EndOfLine:
46
53
  Layout/ExtraSpacing:
47
54
  AllowForAlignment: false
48
55
 
49
- Layout/IndentFirstArgument:
56
+ Layout/FirstArgumentIndentation:
50
57
  EnforcedStyle: consistent
51
58
 
52
- Layout/IndentFirstArrayElement:
59
+ Layout/FirstArrayElementIndentation:
53
60
  EnforcedStyle: consistent
54
61
 
55
- Layout/IndentFirstHashElement:
62
+ Layout/FirstHashElementIndentation:
56
63
  EnforcedStyle: consistent
57
64
 
65
+ Layout/HashAlignment:
66
+ Enabled: false
67
+
68
+ Layout/LineLength:
69
+ Max: 100
70
+ AllowHeredoc: false
71
+ AllowURI: false
72
+
58
73
  Layout/MultilineMethodCallIndentation:
59
74
  EnforcedStyle: indented
60
75
 
@@ -73,6 +88,39 @@ Layout/SpaceBeforeFirstArg:
73
88
  Layout/SpaceInsideStringInterpolation:
74
89
  EnforcedStyle: space
75
90
 
91
+ ###########
92
+ # METRICS #
93
+ ###########
94
+
95
+ Metrics/AbcSize:
96
+ Enabled: false
97
+
98
+ Metrics/BlockLength:
99
+ Enabled: true
100
+ Max: 100
101
+ Exclude:
102
+ - 'spec/**/*'
103
+
104
+ Metrics/ClassLength:
105
+ Enabled: true
106
+ Max: 300
107
+
108
+ Metrics/CyclomaticComplexity:
109
+ Enabled: false
110
+
111
+ Metrics/MethodLength:
112
+ Max: 50
113
+
114
+ Metrics/ModuleLength:
115
+ Enabled: false
116
+
117
+ Metrics/PerceivedComplexity:
118
+ Enabled: false
119
+
120
+ ##########
121
+ # NAMING #
122
+ ##########
123
+
76
124
  Naming/FileName:
77
125
  ExpectMatchingDefinition: true
78
126
  Exclude:
@@ -86,9 +134,35 @@ Naming/FileName:
86
134
  Naming/RescuedExceptionsVariableName:
87
135
  PreferredName: exception
88
136
 
137
+ #########
138
+ # RAILS #
139
+ #########
140
+
141
+ Rails:
142
+ Enabled: true
143
+
89
144
  Rails/BulkChangeTable:
90
145
  Enabled: false
91
146
 
147
+ Rails/Date:
148
+ EnforcedStyle: strict
149
+
150
+ Rails/FilePath:
151
+ Enabled: false
152
+
153
+ Rails/NotNullColumn:
154
+ Enabled: false
155
+
156
+ Rails/RequestReferer:
157
+ EnforcedStyle: referrer
158
+
159
+ Rails/TimeZone:
160
+ EnforcedStyle: strict
161
+
162
+ #########
163
+ # STYLE #
164
+ #########
165
+
92
166
  Style/AccessModifierDeclarations:
93
167
  EnforcedStyle: inline
94
168
 
@@ -98,8 +172,6 @@ Style/ConditionalAssignment:
98
172
  Style/Copyright:
99
173
  Enabled: false
100
174
 
101
- # TODO: Consider turning this on for controller methods in the future if we extract Swagger
102
- # documentation from them.
103
175
  Style/Documentation:
104
176
  Enabled: false
105
177
 
@@ -109,8 +181,8 @@ Style/DoubleNegation:
109
181
  Style/FormatString:
110
182
  EnforcedStyle: percent
111
183
 
112
- # This won't be necessary when we upgrade to Ruby 3.0. Until then, rather than adding a comment to
113
- # every file, we should not mutate strings.
184
+ # TODO: This won't be necessary when we upgrade to Ruby 3.0. Until then, rather than adding a
185
+ # comment to every file, we should only add it to the files where it's necessary.
114
186
  Style/FrozenStringLiteralComment:
115
187
  EnforcedStyle: never
116
188
 
@@ -137,52 +209,3 @@ Style/SymbolArray:
137
209
 
138
210
  Style/WordArray:
139
211
  MinSize: 3
140
-
141
- Metrics/BlockLength:
142
- Enabled: true
143
- Max: 100
144
- Exclude:
145
- - 'spec/**/*'
146
-
147
- Metrics/ClassLength:
148
- Enabled: true
149
- Max: 300
150
-
151
- Metrics/CyclomaticComplexity:
152
- Enabled: false
153
-
154
- Metrics/MethodLength:
155
- Max: 50
156
-
157
- Metrics/LineLength:
158
- Max: 100
159
- AllowHeredoc: false
160
- AllowURI: false
161
-
162
- Metrics/PerceivedComplexity:
163
- Enabled: false
164
-
165
- Layout/BlockAlignment:
166
- EnforcedStyleAlignWith: start_of_block
167
-
168
- Layout/EndAlignment:
169
- EnforcedStyleAlignWith: start_of_line
170
-
171
- Rails/Date:
172
- EnforcedStyle: strict
173
-
174
- Rails/FilePath:
175
- Enabled: false
176
-
177
- # TODO: Enable once this is fixed: https://github.com/bbatsov/rubocop/issues/5236
178
- Rails/InverseOf:
179
- Enabled: false
180
-
181
- Rails/NotNullColumn:
182
- Enabled: false
183
-
184
- Rails/RequestReferer:
185
- EnforcedStyle: referrer
186
-
187
- Rails/TimeZone:
188
- EnforcedStyle: strict
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.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Optimum Energy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-12 00:00:00.000000000 Z
11
+ date: 2020-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.74'
19
+ version: '0.78'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.74'
26
+ version: '0.78'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.4.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.4.0
27
41
  description:
28
42
  email:
29
43
  executables: []