simplycop 1.4.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f566a01241a5651bbeee6ab969274e2aaddc7ae5d202a5178e69ddfb777442
4
- data.tar.gz: 6d0ae21a2f04e4a78e3abb43ae04fca74109fb84732a67d918d5c511e2465f78
3
+ metadata.gz: 75d616c33d97fb61c1d48c68af3f054a3a108c96ebcd8ccb9248c77cc1cd432b
4
+ data.tar.gz: 3044018959ad5d784e29e61cca3843fdb85f1bf972f85ec914e8d0bc652b91ee
5
5
  SHA512:
6
- metadata.gz: a0c1d3b1ab76fedf742d219b0b8c8c19380634ae2e5b0886ffbe41709e0b6a64184e4f87efae1c20fafacfe3b5b2916574b1bcddca7d47ca7c206093ffa2f5f0
7
- data.tar.gz: b64adedc727cfa74c539e8e221016764e89f8ea158fbfa910be89acc4d5fc39d70091e54ac4724612d4018e74a6f52fc2678927876e901e3430696405aa29f03
6
+ metadata.gz: db4a316359a59a88d10f18af824729a2952effb04916afba0bb4d1de285d88c27de7077eb50b64dced5ad9688a474d95bf580e11a8cd22414bee23f9fc2a562a
7
+ data.tar.gz: 9bf81c0df533b7cbc8b3e550ecb2306d8d06f611d693181d8f50c9cff68256f39899940ab0f351cc6a21cc74acacab804bfda5a8f8b0fabfd54fe583b4dc5849
@@ -16,7 +16,7 @@ jobs:
16
16
 
17
17
  strategy:
18
18
  matrix:
19
- ruby-version: [2.6.5, 2.7]
19
+ ruby-version: [2.6.5, 2.7, 3.0]
20
20
 
21
21
  steps:
22
22
  - uses: actions/checkout@v2
@@ -0,0 +1,16 @@
1
+ name: "dobby actions"
2
+ on:
3
+ issue_comment:
4
+ types: [created]
5
+ jobs:
6
+ pr_commented:
7
+ runs-on: ubuntu-20.04
8
+ if: startsWith(github.event.comment.body, '/dobby')
9
+
10
+ steps:
11
+ - name: 'bump version'
12
+ uses: simplybusiness/dobby@v2.0.0
13
+ env:
14
+ DOBBY_APP_ID: ${{ secrets.DOBBY_APP_ID }}
15
+ DOBBY_PRIVATE_KEY: ${{ secrets.DOBBY_PRIVATE_KEY }}
16
+ VERSION_FILE_PATH: lib/simplycop/version.rb
data/.simplycop.yml CHANGED
@@ -21,438 +21,302 @@ AllCops:
21
21
  ExtraDetails: true
22
22
  # Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown
23
23
 
24
- Naming/VariableName:
24
+ Layout/EmptyLineAfterMultilineCondition:
25
25
  Enabled: true
26
- EnforcedStyle: snake_case
27
- SupportedStyles:
28
- - snake_case
29
- - camelCase
30
26
 
31
- Naming/FileName:
32
- Enabled: true
33
-
34
- Layout/TrailingEmptyLines:
27
+ Layout/FirstArrayElementLineBreak:
35
28
  Enabled: true
36
- Severity: warning
37
29
 
38
- Layout/TrailingWhitespace:
30
+ Layout/FirstMethodArgumentLineBreak:
39
31
  Enabled: true
40
- Severity: warning
41
32
 
42
- Lint/DuplicateMethods:
33
+ Layout/FirstHashElementLineBreak:
43
34
  Enabled: true
44
- Severity: warning
45
35
 
46
- Style/SpecialGlobalVars:
36
+ Layout/HeredocArgumentClosingParenthesis:
47
37
  Enabled: true
48
- Severity: warning
49
38
 
50
- Style/ColonMethodCall:
39
+ Layout/SpaceBeforeBrackets:
51
40
  Enabled: true
52
- Severity: warning
53
41
 
54
- Style/RedundantReturn:
42
+ Lint/AmbiguousAssignment:
55
43
  Enabled: true
56
- Severity: warning
57
44
 
58
- Style/NestedParenthesizedCalls:
59
- Enabled: true
60
-
61
- Layout/MultilineMethodCallIndentation:
62
- Enabled: true
63
-
64
- Style/RedundantParentheses:
65
- Enabled: true
66
-
67
- Style/RedundantInterpolation:
68
- Enabled: false
45
+ Lint/AmbiguousBlockAssociation:
46
+ Exclude:
47
+ - spec/**/*
69
48
 
70
- Layout/AssignmentIndentation:
49
+ Lint/DeprecatedConstants:
71
50
  Enabled: true
72
51
 
73
- Style/MutableConstant:
74
- Enabled: false
75
-
76
- Style/ZeroLengthPredicate:
77
- Enabled: true
78
-
79
- Style/ConditionalAssignment:
52
+ Lint/DuplicateBranch:
80
53
  Enabled: true
81
54
 
82
- Style/NestedModifier:
55
+ Lint/DuplicateRegexpCharacterClassElement:
83
56
  Enabled: true
84
57
 
85
- Style/IfInsideElse:
58
+ Lint/EmptyBlock:
86
59
  Enabled: true
87
60
 
88
- Lint/IneffectiveAccessModifier:
89
- Enabled: false
90
-
91
- Lint/ImplicitStringConcatenation:
61
+ Lint/EmptyClass:
92
62
  Enabled: true
93
63
 
94
- Lint/UselessAssignment:
64
+ Lint/HeredocMethodCallPosition:
95
65
  Enabled: true
96
- Severity: warning
97
66
 
98
- Lint/UnusedBlockArgument:
67
+ Lint/LambdaWithoutLiteralBlock:
99
68
  Enabled: true
100
- Severity: warning
101
69
 
102
- Lint/UnderscorePrefixedVariableName:
70
+ Lint/NoReturnInBeginEndBlocks:
103
71
  Enabled: true
104
- Severity: warning
105
-
106
- Style/Documentation:
107
- Enabled: false
108
72
 
109
- Layout/SpaceInsideBlockBraces:
110
- Enabled: false
111
-
112
- Layout/SpaceInsideArrayLiteralBrackets:
73
+ Lint/NumberedParameterAssignment:
113
74
  Enabled: true
114
75
 
115
- Layout/SpaceInsideReferenceBrackets:
76
+ Lint/OrAssignmentToConstant:
116
77
  Enabled: true
117
78
 
118
- Layout/SpaceInsideHashLiteralBraces:
119
- Enabled: false
120
-
121
- Layout/SpaceInsideParens:
79
+ Lint/RedundantDirGlobSort:
122
80
  Enabled: true
123
81
 
124
- Layout/SpaceBeforeComma:
82
+ Lint/SymbolConversion:
125
83
  Enabled: true
126
84
 
127
- Layout/IndentationConsistency:
85
+ Lint/ToEnumArguments:
128
86
  Enabled: true
129
87
 
130
- Layout/CaseIndentation:
88
+ Lint/TripleQuotes:
131
89
  Enabled: true
132
90
 
133
- Style/MethodDefParentheses:
91
+ Lint/UnexpectedBlockArity:
134
92
  Enabled: true
135
93
 
136
- Style/MultilineTernaryOperator:
94
+ Lint/UnmodifiedReduceAccumulator:
137
95
  Enabled: true
138
96
 
139
- Style/NestedTernaryOperator:
140
- Enabled: true
97
+ ###### COPS REVIEWED ABOVE THIS LINE ######
141
98
 
142
- Style/UnlessElse:
99
+ Metrics/BlockLength:
100
+ Exclude:
101
+ - spec/**/*.rb
102
+ -
103
+ Metrics/ClassLength:
104
+ Max: 512
143
105
  Enabled: true
144
106
 
145
- Style/SymbolArray:
146
- EnforcedStyle: brackets
147
-
148
- Style/WordArray:
149
- EnforcedStyle: brackets
150
-
151
- Style/ParenthesesAroundCondition:
107
+ Metrics/ModuleLength:
152
108
  Enabled: true
153
109
 
154
- Layout/MultilineBlockLayout:
110
+ Naming/FileName:
155
111
  Enabled: true
156
112
 
157
- Layout/InitialIndentation:
113
+ Naming/VariableName:
158
114
  Enabled: true
115
+ EnforcedStyle: snake_case
116
+ SupportedStyles:
117
+ - snake_case
118
+ - camelCase
159
119
 
160
- Style/OptionalArguments:
120
+ Style/AccessorGrouping:
161
121
  Enabled: true
162
122
 
163
- Lint/DuplicateHashKey:
123
+ Style/Alias:
164
124
  Enabled: false
165
125
 
166
- Lint/CircularArgumentReference:
126
+ Style/ArgumentsForwarding:
167
127
  Enabled: true
168
128
 
169
- Lint/AmbiguousOperator:
129
+ Style/ArrayCoercion:
170
130
  Enabled: true
171
131
 
172
- Lint/AmbiguousRegexpLiteral:
132
+ Style/BisectedAttrAccessor:
173
133
  Enabled: true
174
134
 
175
- Layout/BlockAlignment:
135
+ Style/CaseLikeIf:
176
136
  Enabled: true
177
137
 
178
- Layout/DefEndAlignment:
138
+ Style/CollectionCompact:
179
139
  Enabled: true
180
140
 
181
- Lint/DeprecatedClassMethods:
141
+ Style/ColonMethodCall:
182
142
  Enabled: true
143
+ Severity: warning
183
144
 
184
- Layout/EndAlignment:
145
+ Style/CombinableLoops:
185
146
  Enabled: true
186
147
 
187
- Lint/UselessAccessModifier:
188
- Enabled: false
189
-
190
- Lint/Void:
148
+ Style/ConditionalAssignment:
191
149
  Enabled: true
192
150
 
193
- Style/Alias:
151
+ Style/DocumentDynamicEvalDefinition:
194
152
  Enabled: false
195
153
 
196
- Layout/SpaceAroundBlockParameters:
197
- Enabled: true
198
-
199
- Layout/SpaceAroundEqualsInParameterDefault:
200
- Enabled: true
201
-
202
- Style/RedundantBegin:
203
- Enabled: true
204
-
205
- Style/RedundantException:
206
- Enabled: true
207
-
208
- Layout/EmptyLines:
209
- Enabled: true
210
-
211
- Style/SelfAssignment:
212
- Enabled: true
154
+ Style/Documentation:
155
+ Enabled: false
213
156
 
214
- Style/LambdaCall:
157
+ Style/EndlessMethod:
215
158
  Enabled: true
216
159
 
217
- Metrics/ModuleLength:
160
+ Style/ExplicitBlockArgument:
218
161
  Enabled: true
219
162
 
220
- Metrics/BlockLength:
221
- Exclude:
222
- - spec/**/*.rb
163
+ Style/ExponentialNotation:
164
+ Enabled: false
223
165
 
224
166
  Style/For:
225
167
  Enabled: true
226
168
 
227
- Layout/ExtraSpacing:
169
+ Style/FormatString:
228
170
  Enabled: false
229
171
 
230
- Style/GuardClause:
172
+ Style/FormatStringToken:
231
173
  Enabled: false
232
174
 
233
175
  Style/FrozenStringLiteralComment:
234
176
  Enabled: false
235
177
 
236
- Style/StringLiterals:
237
- Enabled: false
238
-
239
- Metrics/ClassLength:
240
- Max: 512
178
+ Style/GlobalStdStream:
241
179
  Enabled: true
242
180
 
243
- Layout/LineLength:
244
- Enabled: true
245
- Max: 120
181
+ Style/GuardClause:
182
+ Enabled: false
246
183
 
247
- Layout/ArgumentAlignment:
184
+ Style/HashAsLastArrayItem:
248
185
  Enabled: true
249
186
 
250
187
  Style/HashEachMethods:
251
188
  Enabled: false
252
189
 
253
- Style/HashTransformKeys:
254
- Enabled: true
255
-
256
- Style/HashTransformValues:
190
+ Style/HashExcept:
257
191
  Enabled: true
258
192
 
259
- Layout/EmptyLinesAroundAttributeAccessor:
260
- Enabled: true
261
-
262
- Layout/SpaceAroundMethodCallOperator:
263
- Enabled: true
264
-
265
- Lint/DeprecatedOpenSSLConstant:
266
- Enabled: true
267
-
268
- Lint/DuplicateElsifCondition:
269
- Enabled: true
193
+ Style/HashLikeCase:
194
+ Enabled: false
270
195
 
271
- Lint/MixedRegexpCaptureTypes:
196
+ Style/HashTransformKeys:
272
197
  Enabled: true
273
198
 
274
- Lint/RaiseException:
199
+ Style/HashTransformValues:
275
200
  Enabled: true
276
201
 
277
- Lint/StructNewOverride:
202
+ Style/IfInsideElse:
278
203
  Enabled: true
279
204
 
280
- Style/AccessorGrouping:
205
+ Style/IfWithBooleanLiteralBranches:
281
206
  Enabled: true
282
207
 
283
- Style/ArrayCoercion:
208
+ Style/KeywordParametersOrder:
284
209
  Enabled: true
285
210
 
286
- Style/BisectedAttrAccessor:
211
+ Style/LambdaCall:
287
212
  Enabled: true
288
213
 
289
- Style/CaseLikeIf:
214
+ Style/MethodDefParentheses:
290
215
  Enabled: true
291
216
 
292
- Style/ExponentialNotation:
293
- Enabled: false
294
-
295
- Style/HashAsLastArrayItem:
217
+ Style/MultilineTernaryOperator:
296
218
  Enabled: true
297
219
 
298
- Style/HashLikeCase:
220
+ Style/MutableConstant:
299
221
  Enabled: false
300
222
 
301
- Style/RedundantAssignment:
223
+ Style/NegatedIfElseCondition:
302
224
  Enabled: true
303
225
 
304
- Style/RedundantFetchBlock:
226
+ Style/NestedModifier:
305
227
  Enabled: true
306
228
 
307
- Style/RedundantFileExtensionInRequire:
229
+ Style/NestedParenthesizedCalls:
308
230
  Enabled: true
309
231
 
310
- Style/RedundantRegexpCharacterClass:
232
+ Style/NestedTernaryOperator:
311
233
  Enabled: true
312
234
 
313
- Style/RedundantRegexpEscape:
235
+ Style/NilLambda:
314
236
  Enabled: true
315
237
 
316
- Style/SlicingWithRange:
238
+ Style/NumericPredicate:
317
239
  Enabled: false
318
240
 
319
- Layout/BeginEndAlignment:
241
+ Style/OptionalArguments:
320
242
  Enabled: true
321
243
 
322
- Lint/BinaryOperatorWithIdenticalOperands:
244
+ Style/OptionalBooleanParameter:
323
245
  Enabled: true
324
246
 
325
- Lint/ConstantDefinitionInBlock:
247
+ Style/ParenthesesAroundCondition:
326
248
  Enabled: true
327
- Exclude:
328
- - spec/**/*.rb
329
249
 
330
- Lint/DuplicateRequire:
250
+ Style/RedundantArgument:
331
251
  Enabled: true
332
252
 
333
- Lint/DuplicateRescueException:
253
+ Style/RedundantAssignment:
334
254
  Enabled: true
335
255
 
336
- Lint/EmptyConditionalBody:
256
+ Style/RedundantBegin:
337
257
  Enabled: true
338
258
 
339
- Lint/EmptyFile:
259
+ Style/RedundantException:
340
260
  Enabled: true
341
261
 
342
- Lint/FloatComparison:
262
+ Style/RedundantFetchBlock:
343
263
  Enabled: true
344
264
 
345
- Lint/IdentityComparison:
265
+ Style/RedundantFileExtensionInRequire:
346
266
  Enabled: true
347
267
 
348
- Lint/MissingSuper:
268
+ Style/RedundantInterpolation:
349
269
  Enabled: false
350
270
 
351
- Lint/OutOfRangeRegexpRef:
352
- Enabled: true
353
-
354
- Lint/SelfAssignment:
355
- Enabled: true
356
-
357
- Lint/TopLevelReturnWithArgument:
358
- Enabled: true
359
-
360
- Lint/TrailingCommaInAttributeDeclaration:
361
- Enabled: true
362
-
363
- Lint/UnreachableLoop:
364
- Enabled: true
365
-
366
- Lint/UselessMethodDefinition:
367
- Enabled: true
368
-
369
- Lint/UselessTimes:
370
- Enabled: true
371
-
372
- Style/CombinableLoops:
373
- Enabled: true
374
-
375
- Style/ExplicitBlockArgument:
271
+ Style/RedundantParentheses:
376
272
  Enabled: true
377
273
 
378
- Style/GlobalStdStream:
274
+ Style/RedundantRegexpCharacterClass:
379
275
  Enabled: true
380
276
 
381
- Style/KeywordParametersOrder:
277
+ Style/RedundantRegexpEscape:
382
278
  Enabled: true
383
279
 
384
- Style/OptionalBooleanParameter:
280
+ Style/RedundantReturn:
385
281
  Enabled: true
282
+ Severity: warning
386
283
 
387
284
  Style/RedundantSelfAssignment:
388
285
  Enabled: true
389
286
 
390
- Style/SingleArgumentDig:
391
- Enabled: true
392
-
393
- Style/SoleNestedConditional:
394
- Enabled: true
395
-
396
- Style/StringConcatenation:
287
+ Style/SelfAssignment:
397
288
  Enabled: true
398
289
 
399
- Lint/DuplicateRegexpCharacterClassElement:
290
+ Style/SingleArgumentDig:
400
291
  Enabled: true
401
292
 
402
- Lint/EmptyBlock:
403
- Enabled: true
293
+ Style/SlicingWithRange:
294
+ Enabled: false
404
295
 
405
- Lint/ToEnumArguments:
296
+ Style/SoleNestedConditional:
406
297
  Enabled: true
407
298
 
408
- Lint/UnmodifiedReduceAccumulator:
299
+ Style/SpecialGlobalVars:
409
300
  Enabled: true
301
+ Severity: warning
410
302
 
411
- Style/ArgumentsForwarding:
303
+ Style/StringConcatenation:
412
304
  Enabled: true
413
305
 
414
- Style/DocumentDynamicEvalDefinition:
306
+ Style/StringLiterals:
415
307
  Enabled: false
416
308
 
417
309
  Style/SwapValues:
418
310
  Enabled: true
419
311
 
420
- Lint/AmbiguousBlockAssociation:
421
- Exclude:
422
- - spec/**/*
423
-
424
- Layout/FirstHashElementIndentation:
425
- EnforcedStyle: consistent
426
-
427
- Style/FormatString:
428
- Enabled: false
429
-
430
- Style/FormatStringToken:
431
- Enabled: false
432
-
433
- Style/NumericPredicate:
434
- Enabled: false
435
-
436
- Lint/NoReturnInBeginEndBlocks:
437
- Enabled: true
438
-
439
- Style/CollectionCompact:
440
- Enabled: true
441
-
442
- Style/NegatedIfElseCondition:
443
- Enabled: true
444
-
445
- Lint/DuplicateBranch:
446
- Enabled: true
312
+ Style/SymbolArray:
313
+ EnforcedStyle: brackets
447
314
 
448
- Lint/EmptyClass:
449
- Enabled: true
450
-
451
- Style/NilLambda:
315
+ Style/UnlessElse:
452
316
  Enabled: true
453
317
 
454
- Lint/UnexpectedBlockArity:
455
- Enabled: true
318
+ Style/WordArray:
319
+ EnforcedStyle: brackets
456
320
 
457
- Style/RedundantArgument:
321
+ Style/ZeroLengthPredicate:
458
322
  Enabled: true
@@ -1,6 +1,3 @@
1
- AllCops:
2
- ExtraDetails: true
3
-
4
1
  require:
5
2
  - './lib/simplycop/custom_cops/constantize.rb'
6
3
  - './lib/simplycop/custom_cops/define_method.rb'
@@ -7,5 +7,5 @@
7
7
  #
8
8
 
9
9
  module Simplycop
10
- VERSION = '1.4.2'
10
+ VERSION = '1.6.3'
11
11
  end
data/simplycop.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_dependency 'rubocop', '~> 1.6.1'
20
+ spec.add_dependency 'rubocop', '~> 1.9.1'
21
21
  spec.add_dependency 'rubocop-rails', '~> 2.9.0'
22
22
  spec.add_dependency 'rubocop-rspec', '~> 2.1.0'
23
23
  spec.add_development_dependency 'bundler'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplycop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simply Business
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.1
19
+ version: 1.9.1
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: 1.6.1
26
+ version: 1.9.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -105,6 +105,7 @@ files:
105
105
  - ".custom_simplycop.yml"
106
106
  - ".github/dependabot.yml"
107
107
  - ".github/workflows/ci.yml"
108
+ - ".github/workflows/dobby-actions.yml"
108
109
  - ".github/workflows/publish_gem.yml"
109
110
  - ".github/workflows/version_forget_me_not.yml"
110
111
  - ".gitignore"
@@ -154,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
155
  - !ruby/object:Gem::Version
155
156
  version: '0'
156
157
  requirements: []
157
- rubygems_version: 3.1.4
158
+ rubygems_version: 3.2.3
158
159
  signing_key:
159
160
  specification_version: 4
160
161
  summary: Provides a single point of reference for common rubocop rules.