fog-core 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +2 -0
  3. data/.github/workflows/ruby.yml +1 -1
  4. data/.github/workflows/stale.yml +1 -1
  5. data/.rubocop.yml +16 -12
  6. data/.rubocop_todo.yml +724 -0
  7. data/Gemfile +1 -1
  8. data/Rakefile +2 -14
  9. data/changelog.md +14 -0
  10. data/fog-core.gemspec +10 -7
  11. data/lib/fog/compute/models/server.rb +7 -3
  12. data/lib/fog/compute.rb +2 -2
  13. data/lib/fog/core/association.rb +1 -0
  14. data/lib/fog/core/attributes/default.rb +7 -0
  15. data/lib/fog/core/attributes.rb +28 -3
  16. data/lib/fog/core/cache.rb +58 -55
  17. data/lib/fog/core/collection.rb +9 -3
  18. data/lib/fog/core/connection.rb +1 -1
  19. data/lib/fog/core/current_machine.rb +1 -1
  20. data/lib/fog/core/errors.rb +1 -1
  21. data/lib/fog/core/logger.rb +2 -2
  22. data/lib/fog/core/mock.rb +6 -1
  23. data/lib/fog/core/model.rb +34 -5
  24. data/lib/fog/core/provider.rb +7 -7
  25. data/lib/fog/core/scp.rb +15 -11
  26. data/lib/fog/core/service.rb +4 -4
  27. data/lib/fog/core/services_mixin.rb +9 -9
  28. data/lib/fog/core/ssh.rb +3 -2
  29. data/lib/fog/core/stringify_keys.rb +0 -2
  30. data/lib/fog/core/time.rb +2 -2
  31. data/lib/fog/core/uuid.rb +2 -8
  32. data/lib/fog/core/version.rb +1 -1
  33. data/lib/fog/core/wait_for.rb +2 -1
  34. data/lib/fog/core/wait_for_defaults.rb +2 -0
  35. data/lib/fog/core.rb +57 -58
  36. data/lib/fog/formatador.rb +7 -6
  37. data/lib/fog/schema/data_validator.rb +1 -0
  38. data/lib/fog/storage.rb +15 -15
  39. data/lib/fog/test_helpers/collection_helper.rb +2 -0
  40. data/lib/fog/test_helpers/formats_helper.rb +2 -2
  41. data/lib/fog/test_helpers/helper.rb +3 -3
  42. data/lib/fog/test_helpers/minitest/assertions.rb +1 -1
  43. data/lib/fog/test_helpers/minitest/expectations.rb +1 -1
  44. data/lib/fog/test_helpers/mock_helper.rb +84 -84
  45. data/lib/fog/test_helpers/types_helper.rb +1 -0
  46. data/lib/tasks/test_task.rb +2 -2
  47. data/spec/compute/models/server_spec.rb +7 -7
  48. data/spec/compute_spec.rb +6 -6
  49. data/spec/connection_spec.rb +11 -9
  50. data/spec/core/cache_spec.rb +51 -15
  51. data/spec/core/collection_spec.rb +24 -0
  52. data/spec/core/model_spec.rb +36 -3
  53. data/spec/core/stringify_keys_spec.rb +3 -3
  54. data/spec/core/whitelist_keys_spec.rb +2 -2
  55. data/spec/current_machine_spec.rb +2 -2
  56. data/spec/fog_attribute_spec.rb +183 -163
  57. data/spec/formatador_spec.rb +7 -7
  58. data/spec/identity_spec.rb +6 -6
  59. data/spec/mocking_spec.rb +3 -3
  60. data/spec/service_spec.rb +19 -19
  61. data/spec/spec_helper.rb +3 -8
  62. data/spec/storage_spec.rb +6 -6
  63. data/spec/test_helpers/formats_helper_spec.rb +8 -8
  64. data/spec/test_helpers/schema_validator_spec.rb +8 -8
  65. data/spec/utils_spec.rb +6 -6
  66. data/spec/wait_for_spec.rb +2 -2
  67. metadata +44 -53
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,724 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-06-06 13:47:39 UTC using RuboCop version 1.50.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 4
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ Layout/ElseAlignment:
12
+ Exclude:
13
+ - 'lib/fog/core/cache.rb'
14
+ - 'lib/fog/storage.rb'
15
+
16
+ # Offense count: 1
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ Layout/EmptyLineAfterMagicComment:
19
+ Exclude:
20
+ - 'lib/fog/core/cache.rb'
21
+
22
+ # Offense count: 2
23
+ # This cop supports safe autocorrection (--autocorrect).
24
+ # Configuration parameters: AllowAliasSyntax, AllowedMethods.
25
+ # AllowedMethods: alias_method, public, protected, private
26
+ Layout/EmptyLinesAroundAttributeAccessor:
27
+ Exclude:
28
+ - 'spec/compute_spec.rb'
29
+ - 'spec/identity_spec.rb'
30
+
31
+ # Offense count: 6
32
+ # This cop supports safe autocorrection (--autocorrect).
33
+ # Configuration parameters: EnforcedStyle.
34
+ # SupportedStyles: empty_lines, no_empty_lines
35
+ Layout/EmptyLinesAroundBlockBody:
36
+ Exclude:
37
+ - 'spec/compute/models/server_spec.rb'
38
+ - 'spec/core/cache_spec.rb'
39
+ - 'spec/current_machine_spec.rb'
40
+ - 'spec/test_helpers/formats_helper_spec.rb'
41
+
42
+ # Offense count: 3
43
+ # This cop supports safe autocorrection (--autocorrect).
44
+ # Configuration parameters: EnforcedStyle.
45
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
46
+ Layout/EmptyLinesAroundClassBody:
47
+ Exclude:
48
+ - 'lib/fog/core/cache.rb'
49
+ - 'lib/fog/core/connection.rb'
50
+ - 'spec/core/cache_spec.rb'
51
+
52
+ # Offense count: 1
53
+ # This cop supports safe autocorrection (--autocorrect).
54
+ Layout/EmptyLinesAroundMethodBody:
55
+ Exclude:
56
+ - 'lib/fog/core/cache.rb'
57
+
58
+ # Offense count: 6
59
+ # This cop supports safe autocorrection (--autocorrect).
60
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
61
+ Layout/ExtraSpacing:
62
+ Exclude:
63
+ - 'spec/compute/models/server_spec.rb'
64
+ - 'spec/credentials_spec.rb'
65
+ - 'spec/fog_attribute_spec.rb'
66
+ - 'spec/service_spec.rb'
67
+
68
+ # Offense count: 2
69
+ # This cop supports safe autocorrection (--autocorrect).
70
+ Layout/HeredocIndentation:
71
+ Exclude:
72
+ - 'lib/fog/core/errors.rb'
73
+ - 'lib/fog/test_helpers/helper.rb'
74
+
75
+ # Offense count: 2
76
+ # This cop supports safe autocorrection (--autocorrect).
77
+ # Configuration parameters: Width, AllowedPatterns.
78
+ Layout/IndentationWidth:
79
+ Exclude:
80
+ - 'lib/fog/core/cache.rb'
81
+ - 'lib/fog/storage.rb'
82
+
83
+ # Offense count: 2
84
+ # This cop supports safe autocorrection (--autocorrect).
85
+ Layout/SpaceAfterComma:
86
+ Exclude:
87
+ - 'lib/fog/core/provider.rb'
88
+
89
+ # Offense count: 6
90
+ # This cop supports safe autocorrection (--autocorrect).
91
+ # Configuration parameters: EnforcedStyle.
92
+ # SupportedStyles: space, no_space
93
+ Layout/SpaceAroundEqualsInParameterDefault:
94
+ Exclude:
95
+ - 'spec/compute/models/server_spec.rb'
96
+
97
+ # Offense count: 1
98
+ # This cop supports safe autocorrection (--autocorrect).
99
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
100
+ # SupportedStylesForExponentOperator: space, no_space
101
+ Layout/SpaceAroundOperators:
102
+ Exclude:
103
+ - 'spec/compute/models/server_spec.rb'
104
+
105
+ # Offense count: 16
106
+ # This cop supports safe autocorrection (--autocorrect).
107
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
108
+ # SupportedStyles: space, no_space
109
+ # SupportedStylesForEmptyBraces: space, no_space
110
+ Layout/SpaceInsideBlockBraces:
111
+ Exclude:
112
+ - 'lib/fog/test_helpers/types_helper.rb'
113
+
114
+ # Offense count: 10
115
+ # This cop supports safe autocorrection (--autocorrect).
116
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
117
+ # SupportedStyles: space, no_space, compact
118
+ # SupportedStylesForEmptyBraces: space, no_space
119
+ Layout/SpaceInsideHashLiteralBraces:
120
+ Exclude:
121
+ - 'spec/core/cache_spec.rb'
122
+ - 'spec/core/stringify_keys_spec.rb'
123
+
124
+ # Offense count: 4
125
+ # This cop supports safe autocorrection (--autocorrect).
126
+ # Configuration parameters: EnforcedStyle.
127
+ # SupportedStyles: final_newline, final_blank_line
128
+ Layout/TrailingEmptyLines:
129
+ Exclude:
130
+ - 'spec/fake_app/fake_service.rb'
131
+ - 'spec/fake_app/models/collection.rb'
132
+ - 'spec/fake_app/models/model.rb'
133
+ - 'spec/fake_app/requests/request.rb'
134
+
135
+ # Offense count: 4
136
+ # This cop supports safe autocorrection (--autocorrect).
137
+ # Configuration parameters: AllowInHeredoc.
138
+ Layout/TrailingWhitespace:
139
+ Exclude:
140
+ - 'lib/fog/core/provider.rb'
141
+ - 'spec/formatador_spec.rb'
142
+
143
+ # Offense count: 1
144
+ # This cop supports safe autocorrection (--autocorrect).
145
+ Lint/AmbiguousOperatorPrecedence:
146
+ Exclude:
147
+ - 'lib/fog/formatador.rb'
148
+
149
+ # Offense count: 23
150
+ # Configuration parameters: AllowedMethods.
151
+ # AllowedMethods: enums
152
+ Lint/ConstantDefinitionInBlock:
153
+ Exclude:
154
+ - 'spec/compute/models/server_spec.rb'
155
+ - 'spec/compute_spec.rb'
156
+ - 'spec/identity_spec.rb'
157
+ - 'spec/service_spec.rb'
158
+ - 'spec/storage_spec.rb'
159
+
160
+ # Offense count: 1
161
+ # This cop supports safe autocorrection (--autocorrect).
162
+ Lint/IdentityComparison:
163
+ Exclude:
164
+ - 'lib/fog/core/model.rb'
165
+
166
+ # Offense count: 4
167
+ Lint/MissingSuper:
168
+ Exclude:
169
+ - 'lib/fog/core/association.rb'
170
+ - 'lib/fog/core/collection.rb'
171
+ - 'lib/fog/core/service.rb'
172
+ - 'lib/tasks/test_task.rb'
173
+
174
+ # Offense count: 2
175
+ Lint/RescueException:
176
+ Exclude:
177
+ - 'lib/fog/core/scp.rb'
178
+
179
+ # Offense count: 3
180
+ # This cop supports safe autocorrection (--autocorrect).
181
+ Lint/SendWithMixinArgument:
182
+ Exclude:
183
+ - 'lib/fog/core/service.rb'
184
+
185
+ # Offense count: 1
186
+ # Configuration parameters: IgnoreImplicitReferences.
187
+ Lint/ShadowedArgument:
188
+ Exclude:
189
+ - 'lib/fog/test_helpers/minitest/assertions.rb'
190
+
191
+ # Offense count: 3
192
+ # Configuration parameters: AllowComments, AllowNil.
193
+ Lint/SuppressedException:
194
+ Exclude:
195
+ - 'lib/fog/compute.rb'
196
+ - 'lib/fog/dns.rb'
197
+ - 'lib/fog/storage.rb'
198
+
199
+ # Offense count: 2
200
+ Lint/UselessRescue:
201
+ Exclude:
202
+ - 'lib/fog/core/scp.rb'
203
+
204
+ # Offense count: 17
205
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
206
+ Metrics/AbcSize:
207
+ Max: 73
208
+
209
+ # Offense count: 43
210
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
211
+ # AllowedMethods: refine
212
+ Metrics/BlockLength:
213
+ Max: 424
214
+
215
+ # Offense count: 3
216
+ # Configuration parameters: CountComments, CountAsOne.
217
+ Metrics/ClassLength:
218
+ Max: 189
219
+
220
+ # Offense count: 8
221
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
222
+ Metrics/CyclomaticComplexity:
223
+ Max: 26
224
+
225
+ # Offense count: 31
226
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
227
+ Metrics/MethodLength:
228
+ Max: 87
229
+
230
+ # Offense count: 1
231
+ # Configuration parameters: CountComments, CountAsOne.
232
+ Metrics/ModuleLength:
233
+ Max: 105
234
+
235
+ # Offense count: 7
236
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
237
+ Metrics/PerceivedComplexity:
238
+ Max: 26
239
+
240
+ # Offense count: 7
241
+ # This cop supports safe autocorrection (--autocorrect).
242
+ # Configuration parameters: Severity, EnforcedStyle, Include.
243
+ # Include: **/test/**/*, **/*_test.rb, **/spec/**/*, **/*_spec.rb
244
+ # SupportedStyles: _, any, expect, value
245
+ Minitest/GlobalExpectations:
246
+ Exclude:
247
+ - 'spec/formatador_spec.rb'
248
+ - 'spec/service_spec.rb'
249
+
250
+ # Offense count: 1
251
+ # This cop supports safe autocorrection (--autocorrect).
252
+ Naming/BinaryOperatorParameterName:
253
+ Exclude:
254
+ - 'lib/fog/core/model.rb'
255
+
256
+ # Offense count: 33
257
+ # Configuration parameters: ForbiddenDelimiters.
258
+ # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
259
+ Naming/HeredocDelimiterNaming:
260
+ Enabled: false
261
+
262
+ # Offense count: 1
263
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
264
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
265
+ Naming/MemoizedInstanceVariableName:
266
+ Exclude:
267
+ - 'lib/fog/core/credentials.rb'
268
+
269
+ # Offense count: 2
270
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
271
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
272
+ Naming/MethodParameterName:
273
+ Exclude:
274
+ - 'lib/fog/core/cache.rb'
275
+ - 'lib/fog/core/model.rb'
276
+
277
+ # Offense count: 4
278
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
279
+ # NamePrefix: is_, has_, have_
280
+ # ForbiddenPrefixes: is_, has_, have_
281
+ # AllowedMethods: is_a?
282
+ # MethodDefinitionMacros: define_method, define_singleton_method
283
+ Naming/PredicateName:
284
+ Exclude:
285
+ - 'spec/**/*'
286
+ - 'lib/fog/core/attributes.rb'
287
+
288
+ # Offense count: 3
289
+ # This cop supports safe autocorrection (--autocorrect).
290
+ # Configuration parameters: PreferredName.
291
+ Naming/RescuedExceptionsVariableName:
292
+ Exclude:
293
+ - 'lib/fog/core/scp.rb'
294
+ - 'lib/fog/core/ssh.rb'
295
+
296
+ # Offense count: 1
297
+ # This cop supports safe autocorrection (--autocorrect).
298
+ Rake/Desc:
299
+ Exclude:
300
+ - 'Rakefile'
301
+
302
+ # Offense count: 1
303
+ Security/Eval:
304
+ Exclude:
305
+ - 'lib/fog/core/provider.rb'
306
+
307
+ # Offense count: 1
308
+ Security/MarshalLoad:
309
+ Exclude:
310
+ - 'lib/fog/core/attributes.rb'
311
+
312
+ # Offense count: 2
313
+ # This cop supports unsafe autocorrection (--autocorrect-all).
314
+ Security/YAMLLoad:
315
+ Exclude:
316
+ - 'lib/fog/core/cache.rb'
317
+
318
+ # Offense count: 4
319
+ # This cop supports safe autocorrection (--autocorrect).
320
+ # Configuration parameters: EnforcedStyle.
321
+ # SupportedStyles: prefer_alias, prefer_alias_method
322
+ Style/Alias:
323
+ Exclude:
324
+ - 'lib/fog/compute/models/server.rb'
325
+ - 'lib/fog/core/connection.rb'
326
+ - 'lib/fog/core/mock.rb'
327
+
328
+ # Offense count: 2
329
+ # This cop supports unsafe autocorrection (--autocorrect-all).
330
+ # Configuration parameters: EnforcedStyle.
331
+ # SupportedStyles: always, conditionals
332
+ Style/AndOr:
333
+ Exclude:
334
+ - 'lib/fog/core/model.rb'
335
+ - 'lib/fog/formatador.rb'
336
+
337
+ # Offense count: 3
338
+ # This cop supports safe autocorrection (--autocorrect).
339
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
340
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
341
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
342
+ # FunctionalMethods: let, let!, subject, watch
343
+ # AllowedMethods: lambda, proc, it
344
+ Style/BlockDelimiters:
345
+ Exclude:
346
+ - 'spec/core/cache_spec.rb'
347
+
348
+ # Offense count: 1
349
+ # This cop supports safe autocorrection (--autocorrect).
350
+ # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
351
+ Style/CaseEquality:
352
+ Exclude:
353
+ - 'lib/fog/schema/data_validator.rb'
354
+
355
+ # Offense count: 2
356
+ # This cop supports unsafe autocorrection (--autocorrect-all).
357
+ # Configuration parameters: EnforcedStyle.
358
+ # SupportedStyles: nested, compact
359
+ Style/ClassAndModuleChildren:
360
+ Exclude:
361
+ - 'lib/fog/test_helpers/minitest/assertions.rb'
362
+ - 'lib/fog/test_helpers/minitest/expectations.rb'
363
+
364
+ # Offense count: 1
365
+ # This cop supports safe autocorrection (--autocorrect).
366
+ # Configuration parameters: EnforcedStyle.
367
+ # SupportedStyles: is_a?, kind_of?
368
+ Style/ClassCheck:
369
+ Exclude:
370
+ - 'lib/fog/core/association.rb'
371
+
372
+ # Offense count: 1
373
+ Style/ClassVars:
374
+ Exclude:
375
+ - 'lib/fog/core/connection.rb'
376
+
377
+ # Offense count: 2
378
+ # This cop supports safe autocorrection (--autocorrect).
379
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
380
+ # SupportedStyles: assign_to_condition, assign_inside_condition
381
+ Style/ConditionalAssignment:
382
+ Exclude:
383
+ - 'lib/fog/core/service.rb'
384
+ - 'lib/fog/test_helpers/formats_helper.rb'
385
+
386
+ # Offense count: 26
387
+ Style/DocumentDynamicEvalDefinition:
388
+ Exclude:
389
+ - 'lib/fog/core/associations/many_identities.rb'
390
+ - 'lib/fog/core/associations/many_models.rb'
391
+ - 'lib/fog/core/associations/one_identity.rb'
392
+ - 'lib/fog/core/associations/one_model.rb'
393
+ - 'lib/fog/core/attributes/array.rb'
394
+ - 'lib/fog/core/attributes/boolean.rb'
395
+ - 'lib/fog/core/attributes/default.rb'
396
+ - 'lib/fog/core/attributes/float.rb'
397
+ - 'lib/fog/core/attributes/integer.rb'
398
+ - 'lib/fog/core/attributes/string.rb'
399
+ - 'lib/fog/core/attributes/time.rb'
400
+ - 'lib/fog/core/attributes/timestamp.rb'
401
+ - 'lib/fog/core/collection.rb'
402
+ - 'lib/fog/core/deprecation.rb'
403
+ - 'lib/fog/core/service.rb'
404
+
405
+ # Offense count: 52
406
+ # Configuration parameters: AllowedConstants.
407
+ Style/Documentation:
408
+ Enabled: false
409
+
410
+ # Offense count: 4
411
+ # This cop supports safe autocorrection (--autocorrect).
412
+ Style/EachWithObject:
413
+ Exclude:
414
+ - 'lib/fog/core/attributes.rb'
415
+ - 'lib/fog/core/model.rb'
416
+ - 'lib/fog/core/stringify_keys.rb'
417
+
418
+ # Offense count: 4
419
+ # This cop supports safe autocorrection (--autocorrect).
420
+ # Configuration parameters: EnforcedStyle.
421
+ # SupportedStyles: compact, expanded
422
+ Style/EmptyMethod:
423
+ Exclude:
424
+ - 'spec/fake_app/fake_service.rb'
425
+ - 'spec/fake_app/requests/request.rb'
426
+
427
+ # Offense count: 1
428
+ # This cop supports safe autocorrection (--autocorrect).
429
+ Style/Encoding:
430
+ Exclude:
431
+ - 'lib/fog/core/cache.rb'
432
+
433
+ # Offense count: 5
434
+ # This cop supports unsafe autocorrection (--autocorrect-all).
435
+ Style/EnvHome:
436
+ Exclude:
437
+ - 'lib/fog/core/cache.rb'
438
+ - 'lib/fog/core/credentials.rb'
439
+ - 'spec/credentials_spec.rb'
440
+
441
+ # Offense count: 26
442
+ # This cop supports safe autocorrection (--autocorrect).
443
+ Style/EvalWithLocation:
444
+ Exclude:
445
+ - 'lib/fog/core/associations/many_identities.rb'
446
+ - 'lib/fog/core/associations/many_models.rb'
447
+ - 'lib/fog/core/associations/one_identity.rb'
448
+ - 'lib/fog/core/associations/one_model.rb'
449
+ - 'lib/fog/core/attributes/array.rb'
450
+ - 'lib/fog/core/attributes/boolean.rb'
451
+ - 'lib/fog/core/attributes/default.rb'
452
+ - 'lib/fog/core/attributes/float.rb'
453
+ - 'lib/fog/core/attributes/integer.rb'
454
+ - 'lib/fog/core/attributes/string.rb'
455
+ - 'lib/fog/core/attributes/time.rb'
456
+ - 'lib/fog/core/attributes/timestamp.rb'
457
+ - 'lib/fog/core/collection.rb'
458
+ - 'lib/fog/core/deprecation.rb'
459
+ - 'lib/fog/core/service.rb'
460
+
461
+ # Offense count: 1
462
+ # This cop supports safe autocorrection (--autocorrect).
463
+ Style/ExplicitBlockArgument:
464
+ Exclude:
465
+ - 'lib/fog/core/collection.rb'
466
+
467
+ # Offense count: 8
468
+ # This cop supports safe autocorrection (--autocorrect).
469
+ # Configuration parameters: AllowedVars.
470
+ Style/FetchEnvVar:
471
+ Exclude:
472
+ - 'Rakefile'
473
+ - 'lib/fog/core/credentials.rb'
474
+ - 'spec/credentials_spec.rb'
475
+
476
+ # Offense count: 5
477
+ # This cop supports safe autocorrection (--autocorrect).
478
+ Style/FileWrite:
479
+ Exclude:
480
+ - 'lib/fog/core/cache.rb'
481
+ - 'spec/core/cache_spec.rb'
482
+
483
+ # Offense count: 6
484
+ # This cop supports safe autocorrection (--autocorrect).
485
+ # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
486
+ # SupportedStyles: annotated, template, unannotated
487
+ Style/FormatStringToken:
488
+ Exclude:
489
+ - 'lib/fog/core/uuid.rb'
490
+
491
+ # Offense count: 4
492
+ # This cop supports unsafe autocorrection (--autocorrect-all).
493
+ Style/GlobalStdStream:
494
+ Exclude:
495
+ - 'lib/fog/core/logger.rb'
496
+
497
+ # Offense count: 8
498
+ # This cop supports safe autocorrection (--autocorrect).
499
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
500
+ Style/GuardClause:
501
+ Exclude:
502
+ - 'lib/fog/core/cache.rb'
503
+ - 'lib/fog/core/connection.rb'
504
+ - 'lib/fog/core/model.rb'
505
+ - 'lib/fog/core/service.rb'
506
+ - 'lib/fog/core/ssh.rb'
507
+ - 'lib/fog/storage.rb'
508
+
509
+ # Offense count: 1
510
+ # This cop supports safe autocorrection (--autocorrect).
511
+ # Configuration parameters: AllowSplatArgument.
512
+ Style/HashConversion:
513
+ Exclude:
514
+ - 'lib/fog/core/whitelist_keys.rb'
515
+
516
+ # Offense count: 18
517
+ # This cop supports safe autocorrection (--autocorrect).
518
+ Style/IfUnlessModifier:
519
+ Exclude:
520
+ - 'lib/fog/core/cache.rb'
521
+ - 'lib/fog/core/collection.rb'
522
+ - 'lib/fog/core/connection.rb'
523
+ - 'lib/fog/core/scp.rb'
524
+ - 'lib/fog/core/service.rb'
525
+ - 'lib/fog/core/ssh.rb'
526
+ - 'lib/fog/core/wait_for.rb'
527
+ - 'lib/fog/schema/data_validator.rb'
528
+ - 'lib/fog/storage.rb'
529
+ - 'lib/fog/test_helpers/collection_helper.rb'
530
+ - 'lib/fog/test_helpers/compute/flavors_helper.rb'
531
+
532
+
533
+ # Offense count: 11
534
+ # This cop supports safe autocorrection (--autocorrect).
535
+ # Configuration parameters: EnforcedStyle.
536
+ # SupportedStyles: line_count_dependent, lambda, literal
537
+ Style/Lambda:
538
+ Exclude:
539
+ - 'lib/fog/core/wait_for_defaults.rb'
540
+ - 'spec/compute/models/server_spec.rb'
541
+ - 'spec/service_spec.rb'
542
+ - 'spec/wait_for_spec.rb'
543
+
544
+ # Offense count: 2
545
+ # This cop supports safe autocorrection (--autocorrect).
546
+ # Configuration parameters: EnforcedStyle.
547
+ # SupportedStyles: both, prefix, postfix
548
+ Style/NegatedIf:
549
+ Exclude:
550
+ - 'lib/fog/core/cache.rb'
551
+
552
+ # Offense count: 1
553
+ # This cop supports safe autocorrection (--autocorrect).
554
+ Style/NegatedIfElseCondition:
555
+ Exclude:
556
+ - 'lib/fog/core/utils.rb'
557
+
558
+ # Offense count: 7
559
+ # Configuration parameters: AllowedMethods.
560
+ # AllowedMethods: respond_to_missing?
561
+ Style/OptionalBooleanParameter:
562
+ Exclude:
563
+ - 'lib/fog/core/connection.rb'
564
+ - 'lib/fog/test_helpers/collection_helper.rb'
565
+ - 'lib/fog/test_helpers/compute/flavors_helper.rb'
566
+ - 'lib/fog/test_helpers/compute/server_helper.rb'
567
+ - 'lib/fog/test_helpers/compute/servers_helper.rb'
568
+ - 'lib/fog/test_helpers/formats_helper.rb'
569
+ - 'lib/fog/test_helpers/model_helper.rb'
570
+
571
+ # Offense count: 1
572
+ # This cop supports safe autocorrection (--autocorrect).
573
+ Style/OrAssignment:
574
+ Exclude:
575
+ - 'lib/fog/schema/data_validator.rb'
576
+
577
+ # Offense count: 1
578
+ # This cop supports safe autocorrection (--autocorrect).
579
+ Style/ParallelAssignment:
580
+ Exclude:
581
+ - 'lib/fog/core/cache.rb'
582
+
583
+ # Offense count: 1
584
+ # This cop supports safe autocorrection (--autocorrect).
585
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
586
+ Style/ParenthesesAroundCondition:
587
+ Exclude:
588
+ - 'lib/fog/core/model.rb'
589
+
590
+ # Offense count: 14
591
+ # This cop supports safe autocorrection (--autocorrect).
592
+ # Configuration parameters: PreferredDelimiters.
593
+ Style/PercentLiteralDelimiters:
594
+ Exclude:
595
+ - 'lib/fog/compute/models/server.rb'
596
+ - 'lib/fog/core/collection.rb'
597
+ - 'lib/fog/core/time.rb'
598
+ - 'lib/fog/test_helpers/collection_helper.rb'
599
+ - 'spec/core/whitelist_keys_spec.rb'
600
+ - 'spec/fog_attribute_spec.rb'
601
+
602
+ # Offense count: 1
603
+ # This cop supports safe autocorrection (--autocorrect).
604
+ Style/PerlBackrefs:
605
+ Exclude:
606
+ - 'lib/fog/core/logger.rb'
607
+
608
+ # Offense count: 17
609
+ # This cop supports safe autocorrection (--autocorrect).
610
+ # Configuration parameters: EnforcedStyle, AllowedCompactTypes.
611
+ # SupportedStyles: compact, exploded
612
+ Style/RaiseArgs:
613
+ Exclude:
614
+ - 'lib/fog/core/cache.rb'
615
+ - 'spec/compute/models/server_spec.rb'
616
+
617
+ # Offense count: 2
618
+ # This cop supports safe autocorrection (--autocorrect).
619
+ Style/RedundantBegin:
620
+ Exclude:
621
+ - 'lib/fog/core/credentials.rb'
622
+ - 'lib/fog/core/ssh.rb'
623
+
624
+ # Offense count: 11
625
+ # This cop supports unsafe autocorrection (--autocorrect-all).
626
+ # Configuration parameters: AllowComments.
627
+ Style/RedundantInitialize:
628
+ Exclude:
629
+ - 'spec/compute_spec.rb'
630
+ - 'spec/fake_app/fake_service.rb'
631
+ - 'spec/identity_spec.rb'
632
+ - 'spec/storage_spec.rb'
633
+
634
+ # Offense count: 5
635
+ # This cop supports safe autocorrection (--autocorrect).
636
+ Style/RedundantSelf:
637
+ Exclude:
638
+ - 'lib/fog/core/attributes.rb'
639
+ - 'lib/fog/core/cache.rb'
640
+ - 'lib/fog/core/model.rb'
641
+
642
+ # Offense count: 2
643
+ # This cop supports safe autocorrection (--autocorrect).
644
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
645
+ # SupportedStyles: slashes, percent_r, mixed
646
+ Style/RegexpLiteral:
647
+ Exclude:
648
+ - 'lib/fog/core/connection.rb'
649
+
650
+ # Offense count: 1
651
+ # This cop supports safe autocorrection (--autocorrect).
652
+ Style/RescueModifier:
653
+ Exclude:
654
+ - 'lib/fog/core/model.rb'
655
+
656
+ # Offense count: 4
657
+ # This cop supports safe autocorrection (--autocorrect).
658
+ # Configuration parameters: EnforcedStyle.
659
+ # SupportedStyles: implicit, explicit
660
+ Style/RescueStandardError:
661
+ Exclude:
662
+ - 'lib/fog/compute.rb'
663
+ - 'lib/fog/core/credentials.rb'
664
+ - 'lib/fog/dns.rb'
665
+ - 'lib/fog/storage.rb'
666
+
667
+ # Offense count: 1
668
+ # This cop supports safe autocorrection (--autocorrect).
669
+ # Configuration parameters: AllowAsExpressionSeparator.
670
+ Style/Semicolon:
671
+ Exclude:
672
+ - 'spec/wait_for_spec.rb'
673
+
674
+ # Offense count: 5
675
+ # This cop supports safe autocorrection (--autocorrect).
676
+ # Configuration parameters: AllowIfMethodIsEmpty.
677
+ Style/SingleLineMethods:
678
+ Exclude:
679
+ - 'spec/connection_spec.rb'
680
+ - 'spec/service_spec.rb'
681
+
682
+ # Offense count: 4
683
+ # This cop supports safe autocorrection (--autocorrect).
684
+ # Configuration parameters: MinSize.
685
+ # SupportedStyles: percent, brackets
686
+ Style/SymbolArray:
687
+ EnforcedStyle: brackets
688
+
689
+ # Offense count: 1
690
+ # This cop supports unsafe autocorrection (--autocorrect-all).
691
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
692
+ # AllowedMethods: define_method
693
+ Style/SymbolProc:
694
+ Exclude:
695
+ - 'lib/fog/core/cache.rb'
696
+
697
+ # Offense count: 2
698
+ # This cop supports safe autocorrection (--autocorrect).
699
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods.
700
+ # AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
701
+ Style/TrivialAccessors:
702
+ Exclude:
703
+ - 'lib/fog/core/cache.rb'
704
+
705
+ # Offense count: 1
706
+ # This cop supports safe autocorrection (--autocorrect).
707
+ Style/UnlessElse:
708
+ Exclude:
709
+ - 'lib/fog/core/model.rb'
710
+
711
+ # Offense count: 1
712
+ # This cop supports unsafe autocorrection (--autocorrect-all).
713
+ # Configuration parameters: EnforcedStyle.
714
+ # SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
715
+ Style/YodaCondition:
716
+ Exclude:
717
+ - 'spec/wait_for_spec.rb'
718
+
719
+ # Offense count: 29
720
+ # This cop supports safe autocorrection (--autocorrect).
721
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
722
+ # URISchemes: http, https
723
+ Layout/LineLength:
724
+ Max: 199