puppetlabs_spec_helper 2.6.2 → 4.0.1

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
- SHA1:
3
- metadata.gz: 847f2b3b3a676bafcb358cc257baf0cbc9a8600d
4
- data.tar.gz: fa55fb32bbf5445d851105f54c933e18c2a514ae
2
+ SHA256:
3
+ metadata.gz: 0f07249eb1b0543bd0a6072bf0658b88024c85c2f10a65bbc93f435866453338
4
+ data.tar.gz: 3fb65221a13f49fe034e5704132ca06e0adfe29f99c66bda0b9b018564937baa
5
5
  SHA512:
6
- metadata.gz: 8b76ba47b2d7f7fd28d2e0b673effb951778475c6653c89c1c67b96c53caf0e076a69baadb0743f945d0f190a14eb77883d52039ae088d7ae04c304bc8b0643f
7
- data.tar.gz: 8b0e09f08ef5febe92178185eb3b24a611f3bf8f8b319df6555a221bb2f0ad828e2f75e4caf94fa31af8bcb6922d1ce95c2575ed8af636cf7e8aae5b28c2e711
6
+ metadata.gz: 80a02ec1ff937f9000cc97c184af53a0844323127d11ab86ec336abbc946b58d5058fe91d11cf23480991a0bf541fd7281980df7f845a80083f81002d1ffcf2c
7
+ data.tar.gz: 1425436924772050a6834fa3072ce749d185a9feb894fa6488b777b1c2cd82aef25890f06fba3c0df207838094be76f40caa018feda05ecb36e9280255d0b8a8
@@ -0,0 +1,15 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "13:00"
8
+ open-pull-requests-limit: 10
9
+ ignore:
10
+ - dependency-name: rubocop
11
+ versions:
12
+ - "> 0.49, < 1"
13
+ - dependency-name: rubocop
14
+ versions:
15
+ - ">= 1.a, < 2"
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
1
  --format documentation
2
- --color
2
+ --order rand
data/.rubocop.yml CHANGED
@@ -1,504 +1,155 @@
1
1
  require: rubocop-rspec
2
- AllCops:
3
- TargetRubyVersion: 1.9
4
- Include:
5
- - ./**/*.rb
6
-
7
- Lint/ConditionPosition:
8
- Enabled: True
9
-
10
- Lint/ElseLayout:
11
- Enabled: True
12
-
13
- Lint/UnreachableCode:
14
- Enabled: True
15
-
16
- Lint/UselessComparison:
17
- Enabled: True
18
-
19
- Lint/EnsureReturn:
20
- Enabled: True
21
-
22
- Lint/HandleExceptions:
23
- Enabled: True
24
-
25
- Lint/LiteralInCondition:
26
- Enabled: True
27
-
28
- Lint/ShadowingOuterLocalVariable:
29
- Enabled: True
30
-
31
- Lint/LiteralInInterpolation:
32
- Enabled: True
33
-
34
- Style/HashSyntax:
35
- Enabled: True
2
+ inherit_from: .rubocop_todo.yml
36
3
 
37
- Style/RedundantReturn:
38
- Enabled: True
39
-
40
- Lint/AmbiguousOperator:
41
- Enabled: True
42
-
43
- Lint/AssignmentInCondition:
44
- Enabled: True
45
-
46
- Style/SpaceBeforeComment:
47
- Enabled: True
48
-
49
- Style/AndOr:
50
- Enabled: True
51
-
52
- Style/RedundantSelf:
53
- Enabled: True
54
-
55
- # Method length is not necessarily an indicator of code quality
56
- Metrics/MethodLength:
57
- Enabled: False
58
-
59
- # Module length is not necessarily an indicator of code quality
60
- Metrics/ModuleLength:
4
+ AllCops:
5
+ TargetRubyVersion: 2.4
6
+ # let dependabot find the rough spots for us
7
+ NewCops: enable
8
+ Exclude:
9
+ # binstubs, and other utilities
10
+ - bin/**/*
11
+ - vendor/**/*
12
+ - vendor/**/.*
13
+ # Puppet util code follows Puppet's style, not pdk's
14
+ - lib/puppet/**/*
15
+ # package testing gems
16
+ - package-testing/vendor/**/*
17
+ - package-testing/vendor/**/.*
18
+
19
+ # Metrics, excludes complexity and sizing metrics for now, as ruby's defaults are very strict
20
+ Metrics/AbcSize:
61
21
  Enabled: False
62
22
 
63
- Style/WhileUntilModifier:
64
- Enabled: True
65
-
66
- Lint/AmbiguousRegexpLiteral:
67
- Enabled: True
68
-
69
- Lint/Eval:
70
- Enabled: True
71
-
72
- Lint/BlockAlignment:
73
- Enabled: True
74
-
75
- Lint/DefEndAlignment:
76
- Enabled: True
77
-
78
- Lint/EndAlignment:
79
- Enabled: True
80
-
81
- Lint/DeprecatedClassMethods:
82
- Enabled: True
83
-
84
- Lint/Loop:
85
- Enabled: True
86
-
87
- Lint/ParenthesesAsGroupedExpression:
88
- Enabled: True
89
-
90
- Lint/RescueException:
91
- Enabled: True
92
-
93
- Lint/StringConversionInInterpolation:
94
- Enabled: True
95
-
96
- Lint/UnusedBlockArgument:
97
- Enabled: True
98
-
99
- Lint/UnusedMethodArgument:
100
- Enabled: True
101
-
102
- Lint/UselessAccessModifier:
103
- Enabled: True
104
-
105
- Lint/UselessAssignment:
106
- Enabled: True
107
-
108
- Lint/Void:
109
- Enabled: True
110
-
111
- Style/AccessModifierIndentation:
112
- Enabled: True
113
-
114
- Style/AccessorMethodName:
115
- Enabled: True
116
-
117
- Style/Alias:
118
- Enabled: True
119
-
120
- Style/AlignArray:
121
- Enabled: True
122
-
123
- Style/AlignHash:
124
- Enabled: True
125
-
126
- Style/AlignParameters:
127
- Enabled: True
128
-
129
- Metrics/BlockNesting:
130
- Enabled: True
131
-
132
- Style/AsciiComments:
133
- Enabled: True
134
-
135
- Style/Attr:
136
- Enabled: True
137
-
138
- Style/BracesAroundHashParameters:
139
- Enabled: True
140
-
141
- Style/CaseEquality:
142
- Enabled: True
143
-
144
- Style/CaseIndentation:
145
- Enabled: True
146
-
147
- Style/CharacterLiteral:
148
- Enabled: True
149
-
150
- Style/ClassAndModuleCamelCase:
151
- Enabled: True
152
-
153
- Style/ClassAndModuleChildren:
23
+ Metrics/BlockLength:
24
+ Description: rspec uses long describe blocks, so allow long blocks under spec/
154
25
  Enabled: False
26
+ Exclude:
27
+ - 'spec/**/*.rb'
155
28
 
156
- Style/ClassCheck:
157
- Enabled: True
158
-
159
- # Class length is not necessarily an indicator of code quality
160
29
  Metrics/ClassLength:
161
30
  Enabled: False
162
31
 
163
- Style/ClassMethods:
164
- Enabled: True
165
-
166
- Style/ClassVars:
167
- Enabled: True
168
-
169
- Style/WhenThen:
170
- Enabled: True
171
-
172
- Style/WordArray:
173
- Enabled: True
174
-
175
- Style/UnneededPercentQ:
176
- Enabled: True
177
-
178
- Style/Tab:
179
- Enabled: True
180
-
181
- Style/SpaceBeforeSemicolon:
182
- Enabled: True
183
-
184
- Style/TrailingBlankLines:
185
- Enabled: True
186
-
187
- Style/SpaceInsideBlockBraces:
188
- Enabled: True
189
-
190
- Style/SpaceInsideBrackets:
191
- Enabled: True
192
-
193
- Style/SpaceInsideHashLiteralBraces:
194
- Enabled: True
195
-
196
- Style/SpaceInsideParens:
197
- Enabled: True
198
-
199
- Style/LeadingCommentSpace:
200
- Enabled: True
201
-
202
- Style/SpaceBeforeFirstArg:
203
- Enabled: True
204
-
205
- Style/SpaceAfterColon:
206
- Enabled: True
207
-
208
- Style/SpaceAfterComma:
209
- Enabled: True
210
-
211
- Style/SpaceAfterMethodName:
212
- Enabled: True
213
-
214
- Style/SpaceAfterNot:
215
- Enabled: True
216
-
217
- Style/SpaceAfterSemicolon:
218
- Enabled: True
219
-
220
- Style/SpaceAroundEqualsInParameterDefault:
221
- Enabled: True
222
-
223
- Style/SpaceAroundOperators:
224
- Enabled: True
225
-
226
- Style/SpaceBeforeBlockBraces:
227
- Enabled: True
228
-
229
- Style/SpaceBeforeComma:
230
- Enabled: True
231
-
232
- Style/CollectionMethods:
233
- Enabled: True
234
-
235
- Style/CommentIndentation:
236
- Enabled: True
237
-
238
- Style/ColonMethodCall:
239
- Enabled: True
240
-
241
- Style/CommentAnnotation:
242
- Enabled: True
243
-
244
- # 'Complexity' is very relative
245
32
  Metrics/CyclomaticComplexity:
246
33
  Enabled: False
247
34
 
248
- Style/ConstantName:
249
- Enabled: True
35
+ Metrics/LineLength:
36
+ Description: People have wide screens, use them.
37
+ Max: 200
250
38
 
251
- Style/Documentation:
39
+ Metrics/MethodLength:
252
40
  Enabled: False
253
41
 
254
- Style/DefWithParentheses:
255
- Enabled: True
256
-
257
- Style/PreferredHashMethods:
258
- Enabled: True
259
-
260
- Style/DotPosition:
261
- EnforcedStyle: trailing
262
-
263
- Style/DoubleNegation:
264
- Enabled: True
265
-
266
- Style/EachWithObject:
267
- Enabled: True
268
-
269
- Style/EmptyLineBetweenDefs:
270
- Enabled: True
271
-
272
- Style/IndentArray:
273
- Enabled: True
42
+ Metrics/ModuleLength:
43
+ Enabled: False
274
44
 
275
- Style/IndentHash:
276
- Enabled: True
45
+ Metrics/ParameterLists:
46
+ Enabled: False
277
47
 
278
- Style/IndentationConsistency:
279
- Enabled: True
48
+ Metrics/PerceivedComplexity:
49
+ Enabled: False
280
50
 
281
- Style/IndentationWidth:
282
- Enabled: True
51
+ # RSpec cops
52
+ RSpec/BeforeAfterAll:
53
+ Description: Beware of using after(:all) as it may cause state to leak between tests. A necessary evil in acceptance testing.
54
+ Exclude:
55
+ - 'spec/acceptance/**/*.rb'
56
+ - 'package-testing/spec/package/**/*.rb'
283
57
 
284
- Style/EmptyLines:
285
- Enabled: True
58
+ RSpec/DescribeClass:
59
+ Description: This cop does not account for rspec-puppet, and beaker-rspec usage.
60
+ Enabled: False
286
61
 
287
- Style/EmptyLinesAroundAccessModifier:
288
- Enabled: True
62
+ RSpec/HookArgument:
63
+ Description: Prefer explicit :each argument, matching existing module's style
64
+ EnforcedStyle: each
289
65
 
290
- Style/EmptyLiteral:
291
- Enabled: True
66
+ RSpec/NestedGroups:
67
+ Description: Nested groups can lead to cleaner tests with less duplication
68
+ Max: 10
292
69
 
293
- # Configuration parameters: AllowURI, URISchemes.
294
- Metrics/LineLength:
70
+ RSpec/ExampleLength:
71
+ Description: Forcing short examples leads to the creation of one-time use let() helpers
295
72
  Enabled: False
296
73
 
297
- Style/MethodCallParentheses:
298
- Enabled: True
299
-
300
- Style/MethodDefParentheses:
301
- Enabled: True
74
+ RSpec/MessageSpies:
75
+ EnforcedStyle: receive
302
76
 
303
- Style/LineEndConcatenation:
304
- Enabled: True
305
-
306
- Style/TrailingWhitespace:
307
- Enabled: True
77
+ # Style Cops
78
+ Style/AsciiComments:
79
+ Description: Names, non-english speaking communities.
80
+ Enabled: False
308
81
 
309
- Style/StringLiterals:
310
- Enabled: True
82
+ Style/BlockDelimiters:
83
+ Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to be consistent then.
84
+ EnforcedStyle: braces_for_chaining
311
85
 
312
- Style/TrailingCommaInArguments:
313
- Enabled: True
86
+ Style/ClassAndModuleChildren:
87
+ Description: Compact style reduces the required amount of indentation.
88
+ EnforcedStyle: compact
314
89
 
315
- Style/TrailingCommaInLiteral:
316
- Enabled: True
90
+ Style/EmptyElse:
91
+ Description: Enforce against empty else clauses, but allow `nil` for clarity.
92
+ EnforcedStyle: empty
317
93
 
318
- Style/GlobalVars:
319
- Enabled: True
94
+ Style/FormatString:
95
+ Description: Following the main puppet project's style, prefer the % format format.
96
+ EnforcedStyle: percent
320
97
 
321
- Style/GuardClause:
322
- Enabled: True
98
+ Style/FormatStringToken:
99
+ Description: Following the main puppet project's style, prefer the simpler template tokens over annotated ones.
100
+ EnforcedStyle: template
323
101
 
324
102
  Style/IfUnlessModifier:
325
- Enabled: True
326
-
327
- Style/MultilineIfThen:
328
- Enabled: True
329
-
330
- Style/NegatedIf:
331
- Enabled: True
332
-
333
- Style/NegatedWhile:
334
- Enabled: True
335
-
336
- Style/Next:
337
- Enabled: True
338
-
339
- Style/SingleLineBlockParams:
340
- Enabled: True
341
-
342
- Style/SingleLineMethods:
343
- Enabled: True
344
-
345
- Style/SpecialGlobalVars:
346
- Enabled: True
347
-
348
- Style/TrivialAccessors:
349
- Enabled: True
350
-
351
- Style/UnlessElse:
352
- Enabled: True
353
-
354
- Style/VariableInterpolation:
355
- Enabled: True
356
-
357
- Style/VariableName:
358
- Enabled: True
359
-
360
- Style/WhileUntilDo:
361
- Enabled: True
362
-
363
- Style/EvenOdd:
364
- Enabled: True
365
-
366
- Style/FileName:
367
- Enabled: True
368
-
369
- Style/For:
370
- Enabled: True
103
+ Description: Post-fix `if` modifiers are hard to parse for newcomers. We don't want to encourage them. Post-fix `unless` modifiers could be nice in some cases, but the Cop doesn't differentiate.
104
+ Enabled: false
371
105
 
372
106
  Style/Lambda:
373
- Enabled: True
374
-
375
- Style/MethodName:
376
- Enabled: True
377
-
378
- Style/MultilineTernaryOperator:
379
- Enabled: True
380
-
381
- Style/NestedTernaryOperator:
382
- Enabled: True
383
-
384
- Style/NilComparison:
385
- Enabled: True
386
-
387
- Style/FormatString:
388
- Enabled: True
389
-
390
- Style/MultilineBlockChain:
391
- Enabled: True
392
-
393
- Style/Semicolon:
394
- Enabled: True
107
+ Description: Prefer the keyword for easier discoverability.
108
+ EnforcedStyle: literal
395
109
 
396
- Style/SignalException:
397
- Enabled: True
110
+ Style/MethodCalledOnDoEndBlock:
111
+ Enabled: true
398
112
 
399
- Style/NonNilCheck:
400
- Enabled: True
401
-
402
- Style/Not:
403
- Enabled: True
404
-
405
- Style/NumericLiterals:
406
- Enabled: True
407
-
408
- Style/OneLineConditional:
409
- Enabled: True
410
-
411
- Style/OpMethod:
412
- Enabled: True
413
-
414
- Style/ParenthesesAroundCondition:
415
- Enabled: True
416
-
417
- Style/PercentLiteralDelimiters:
418
- Enabled: True
419
-
420
- Style/PerlBackrefs:
421
- Enabled: True
422
-
423
- Style/PredicateName:
424
- Enabled: True
425
-
426
- Style/RedundantException:
427
- Enabled: True
428
-
429
- Style/SelfAssignment:
430
- Enabled: True
431
-
432
- Style/Proc:
433
- Enabled: True
434
-
435
- Style/RaiseArgs:
436
- Enabled: True
437
-
438
- Style/RedundantBegin:
439
- Enabled: True
440
-
441
- Style/RescueModifier:
442
- Enabled: True
443
-
444
- # based on https://github.com/voxpupuli/modulesync_config/issues/168
445
113
  Style/RegexpLiteral:
114
+ Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
446
115
  EnforcedStyle: percent_r
447
- Enabled: True
448
-
449
- Lint/UnderscorePrefixedVariableName:
450
- Enabled: True
451
-
452
- Metrics/ParameterLists:
453
- Enabled: False
454
-
455
- Lint/RequireParentheses:
456
- Enabled: True
457
-
458
- Style/SpaceBeforeFirstArg:
459
- Enabled: True
460
-
461
- Style/ModuleFunction:
462
- Enabled: True
463
116
 
464
- Lint/Debugger:
465
- Enabled: True
117
+ Style/SymbolProc:
118
+ Description: SymbolProc notation is not discoverable
119
+ Enabled: false
466
120
 
467
- Style/IfWithSemicolon:
468
- Enabled: True
121
+ Style/TernaryParentheses:
122
+ Description: Checks for use of parentheses around ternary conditions. Enforce parentheses on complex expressions for better readability, but seriously consider breaking it up.
123
+ EnforcedStyle: require_parentheses_when_complex
469
124
 
470
- Style/Encoding:
471
- Enabled: True
472
-
473
- Style/BlockDelimiters:
474
- Enabled: True
475
-
476
- Style/MultilineBlockLayout:
477
- Enabled: True
478
-
479
- # 'Complexity' is very relative
480
- Metrics/AbcSize:
481
- Enabled: False
482
-
483
- # 'Complexity' is very relative
484
- Metrics/PerceivedComplexity:
485
- Enabled: False
486
-
487
- Lint/UselessAssignment:
488
- Enabled: True
489
-
490
- Style/ClosingParenthesisIndentation:
491
- Enabled: False
492
-
493
- # RSpec
494
-
495
- # We don't use rspec in this way
496
- RSpec/DescribeClass:
497
- Enabled: False
498
-
499
- # Example length is not necessarily an indicator of code quality
500
- RSpec/ExampleLength:
501
- Enabled: False
502
-
503
- RSpec/NamedSubject:
504
- Enabled: False
125
+ Style/TrailingCommaInArguments:
126
+ Description: Prefer always trailing comma on multiline argument lists. This makes diffs, and re-ordering nicer.
127
+ EnforcedStyleForMultiline: comma
128
+
129
+ Style/TrailingCommaInArrayLiteral:
130
+ Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer.
131
+ EnforcedStyleForMultiline: comma
132
+
133
+ Style/TrailingCommaInHashLiteral:
134
+ Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer.
135
+ EnforcedStyleForMultiline: comma
136
+
137
+ Style/SymbolArray:
138
+ Description: Using percent style obscures symbolic intent of array's contents.
139
+ Enabled: true
140
+ EnforcedStyle: brackets
141
+
142
+ # Enforce LF line endings, even when on Windows
143
+ Layout/EndOfLine:
144
+ EnforcedStyle: lf
145
+
146
+ Style/AccessModifierDeclarations:
147
+ EnforcedStyle: inline
148
+
149
+ RSpec/ContextWording:
150
+ Prefixes:
151
+ - and
152
+ - but
153
+ - when
154
+ - with
155
+ - without