ibm_vpc 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 730473c688bff9377c4e2690f3c09b37b7c74b4818510e9be76499713c1ef97f
4
+ data.tar.gz: '06289ceb7e6aeab8b56b0a5687d792c789842bf1d8c5284771ae2683325ad3ca'
5
+ SHA512:
6
+ metadata.gz: 81a6a3227ba1598dd1e8baa13a5b0d0c662e058249e584d4ede56a563301b03148477f54537c9c107ceb47c96e53da636528972a658196e33a0ff264d5735025
7
+ data.tar.gz: ae6825818101c7d02fcdeaac54adae0fe3d40a9ad93f42f778ef85384e51e74ec13a01c9fb7215a8e59a0798d047162a141da6775a7b571ae6aeb3a0fa43afff
data/.bumpversion.cfg ADDED
@@ -0,0 +1,13 @@
1
+ [bumpversion]
2
+ current_version = 0.0.1
3
+ commit = True
4
+ message = Update version {current_version} -> {new_version}
5
+
6
+ [bumpversion:file:lib/ibm_vpc/version.rb]
7
+ search = VERSION = '{current_version}'
8
+ replace = VERSION = '{new_version}'
9
+
10
+ [bumpversion:file:README.md]
11
+ search = {current_version}
12
+ replace = {new_version}
13
+
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /*.gem
2
+ /.bundle/
3
+ /.yardoc
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /Gemfile.lock
11
+ /test/html_reports/
12
+
13
+ # rspec failure tracking
14
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,1609 @@
1
+ # Common configuration.
2
+ AllCops:
3
+ RubyInterpreters:
4
+ - ruby
5
+ - rake
6
+ # Include common Ruby source files.
7
+ Include:
8
+ - '**/*.rb'
9
+ - '**/*.gemfile'
10
+ - '**/*.gemspec'
11
+ - '**/*.rake'
12
+ - '**/Gemfile'
13
+ - '**/Rakefile'
14
+ Exclude:
15
+ - 'node_modules/**/*'
16
+ - 'vendor/**/*'
17
+ - '.git/**/*'
18
+ - 'scripts/**/*'
19
+ # Default formatter will be used if no `-f/--format` option is given.
20
+ DefaultFormatter: progress
21
+ # Cop names are displayed in offense messages by default. Change behavior
22
+ # by overriding DisplayCopNames, or by giving the `--no-display-cop-names`
23
+ # option.
24
+ DisplayCopNames: true
25
+ # Style guide URLs are not displayed in offense messages by default. Change
26
+ # behavior by overriding `DisplayStyleGuide`, or by giving the
27
+ # `-S/--display-style-guide` option.
28
+ DisplayStyleGuide: false
29
+ # When specifying style guide URLs, any paths and/or fragments will be
30
+ # evaluated relative to the base URL.
31
+ StyleGuideBaseURL: https://github.com/rubocop-hq/ruby-style-guide
32
+ # Extra details are not displayed in offense messages by default. Change
33
+ # behavior by overriding ExtraDetails, or by giving the
34
+ # `-E/--extra-details` option.
35
+ ExtraDetails: false
36
+ # Additional cops that do not reference a style guide rule may be enabled by
37
+ # default. Change behavior by overriding `StyleGuideCopsOnly`, or by giving
38
+ # the `--only-guide-cops` option.
39
+ StyleGuideCopsOnly: false
40
+ # All cops except the ones in disabled.yml are enabled by default. Change
41
+ # this behavior by overriding either `DisabledByDefault` or `EnabledByDefault`.
42
+ # When `DisabledByDefault` is `true`, all cops in the default configuration
43
+ # are disabled, and only cops in user configuration are enabled. This makes
44
+ # cops opt-in instead of opt-out. Note that when `DisabledByDefault` is `true`,
45
+ # cops in user configuration will be enabled even if they don't set the
46
+ # Enabled parameter.
47
+ # When `EnabledByDefault` is `true`, all cops, even those in disabled.yml,
48
+ # are enabled by default. Cops can still be disabled in user configuration.
49
+ # Note that it is invalid to set both EnabledByDefault and DisabledByDefault
50
+ # to true in the same configuration.
51
+ EnabledByDefault: false
52
+ DisabledByDefault: false
53
+ # Enables the result cache if `true`. Can be overridden by the `--cache` command
54
+ # line option.
55
+ UseCache: true
56
+ # Threshold for how many files can be stored in the result cache before some
57
+ # of the files are automatically removed.
58
+ MaxFilesInCache: 20000
59
+ # The cache will be stored in "rubocop_cache" under this directory. If
60
+ # CacheRootDirectory is ~ (nil), which it is by default, the root will be
61
+ # taken from the environment variable `$XDG_CACHE_HOME` if it is set, or if
62
+ # `$XDG_CACHE_HOME` is not set, it will be `$HOME/.cache/`.
63
+ CacheRootDirectory: ~
64
+ # It is possible for a malicious user to know the location of RuboCop's cache
65
+ # directory by looking at CacheRootDirectory, and create a symlink in its
66
+ # place that could cause RuboCop to overwrite unintended files, or read
67
+ # malicious input. If you are certain that your cache location is secure from
68
+ # this kind of attack, and wish to use a symlinked cache location, set this
69
+ # value to "true".
70
+ AllowSymlinksInCacheRootDirectory: false
71
+ # What MRI version of the Ruby interpreter is the inspected code intended to
72
+ # run on? (If there is more than one, set this to the lowest version.)
73
+ # If a value is specified for TargetRubyVersion then it is used. Acceptable
74
+ # values are specificed as a float (i.e. 2.5); the teeny version of Ruby
75
+ # should not be included. If the project specifies a Ruby version in the
76
+ # .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
77
+ # the desired version of Ruby by inspecting the .ruby-version file first,
78
+ # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
79
+ # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
80
+ # from the lock file.) If the Ruby version is still unresolved, RuboCop will
81
+ # use the oldest officially supported Ruby version (currently Ruby 2.2).
82
+ TargetRubyVersion: 2.3
83
+ # What version of Rails is the inspected code using? If a value is specified
84
+ # for TargetRailsVersion then it is used. Acceptable values are specificed
85
+ # as a float (i.e. 5.1); the patch version of Rails should not be included.
86
+ # If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
87
+ # gems.locked file to find the version of Rails that has been bound to the
88
+ # application. If neither of those files exist, RuboCop will use Rails 5.0
89
+ # as the default.
90
+ TargetRailsVersion: ~
91
+
92
+ #################### Layout ###########################
93
+
94
+ # Indent private/protected/public as deep as method definitions
95
+ Layout/AccessModifierIndentation:
96
+ EnforcedStyle: indent
97
+ SupportedStyles:
98
+ - outdent
99
+ - indent
100
+ # By default, the indentation width from Layout/IndentationWidth is used
101
+ # But it can be overridden by setting this parameter
102
+ IndentationWidth: ~
103
+
104
+ # Align the elements of a hash literal if they span more than one line.
105
+ Layout/AlignHash:
106
+ # Alignment of entries using hash rocket as separator. Valid values are:
107
+ #
108
+ # key - left alignment of keys
109
+ # 'a' => 2
110
+ # 'bb' => 3
111
+ # separator - alignment of hash rockets, keys are right aligned
112
+ # 'a' => 2
113
+ # 'bb' => 3
114
+ # table - left alignment of keys, hash rockets, and values
115
+ # 'a' => 2
116
+ # 'bb' => 3
117
+ EnforcedHashRocketStyle: key
118
+ SupportedHashRocketStyles:
119
+ - key
120
+ - separator
121
+ - table
122
+ # Alignment of entries using colon as separator. Valid values are:
123
+ #
124
+ # key - left alignment of keys
125
+ # a: 0
126
+ # bb: 1
127
+ # separator - alignment of colons, keys are right aligned
128
+ # a: 0
129
+ # bb: 1
130
+ # table - left alignment of keys and values
131
+ # a: 0
132
+ # bb: 1
133
+ EnforcedColonStyle: key
134
+ SupportedColonStyles:
135
+ - key
136
+ - separator
137
+ - table
138
+ # Select whether hashes that are the last argument in a method call should be
139
+ # inspected? Valid values are:
140
+ #
141
+ # always_inspect - Inspect both implicit and explicit hashes.
142
+ # Registers an offense for:
143
+ # function(a: 1,
144
+ # b: 2)
145
+ # Registers an offense for:
146
+ # function({a: 1,
147
+ # b: 2})
148
+ # always_ignore - Ignore both implicit and explicit hashes.
149
+ # Accepts:
150
+ # function(a: 1,
151
+ # b: 2)
152
+ # Accepts:
153
+ # function({a: 1,
154
+ # b: 2})
155
+ # ignore_implicit - Ignore only implicit hashes.
156
+ # Accepts:
157
+ # function(a: 1,
158
+ # b: 2)
159
+ # Registers an offense for:
160
+ # function({a: 1,
161
+ # b: 2})
162
+ # ignore_explicit - Ignore only explicit hashes.
163
+ # Accepts:
164
+ # function({a: 1,
165
+ # b: 2})
166
+ # Registers an offense for:
167
+ # function(a: 1,
168
+ # b: 2)
169
+ EnforcedLastArgumentHashStyle: always_inspect
170
+ SupportedLastArgumentHashStyles:
171
+ - always_inspect
172
+ - always_ignore
173
+ - ignore_implicit
174
+ - ignore_explicit
175
+
176
+ Layout/AlignParameters:
177
+ # Alignment of parameters in multi-line method calls.
178
+ #
179
+ # The `with_first_parameter` style aligns the following lines along the same
180
+ # column as the first parameter.
181
+ #
182
+ # method_call(a,
183
+ # b)
184
+ #
185
+ # The `with_fixed_indentation` style aligns the following lines with one
186
+ # level of indentation relative to the start of the line with the method call.
187
+ #
188
+ # method_call(a,
189
+ # b)
190
+ EnforcedStyle: with_first_parameter
191
+ SupportedStyles:
192
+ - with_first_parameter
193
+ - with_fixed_indentation
194
+ # By default, the indentation width from Layout/IndentationWidth is used
195
+ # But it can be overridden by setting this parameter
196
+ IndentationWidth: ~
197
+
198
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
199
+ Layout/BlockAlignment:
200
+ # The value `start_of_block` means that the `end` should be aligned with line
201
+ # where the `do` keyword appears.
202
+ # The value `start_of_line` means it should be aligned with the whole
203
+ # expression's starting line.
204
+ # The value `either` means both are allowed.
205
+ EnforcedStyleAlignWith: either
206
+ SupportedStylesAlignWith:
207
+ - either
208
+ - start_of_block
209
+ - start_of_line
210
+
211
+ # Indentation of `when`.
212
+ Layout/CaseIndentation:
213
+ EnforcedStyle: case
214
+ SupportedStyles:
215
+ - case
216
+ - end
217
+ IndentOneStep: false
218
+ # By default, the indentation width from `Layout/IndentationWidth` is used.
219
+ # But it can be overridden by setting this parameter.
220
+ # This only matters if `IndentOneStep` is `true`
221
+ IndentationWidth: ~
222
+
223
+ Layout/DefEndAlignment:
224
+ # The value `def` means that `end` should be aligned with the def keyword.
225
+ # The value `start_of_line` means that `end` should be aligned with method
226
+ # calls like `private`, `public`, etc, if present in front of the `def`
227
+ # keyword on the same line.
228
+ EnforcedStyleAlignWith: start_of_line
229
+ SupportedStylesAlignWith:
230
+ - start_of_line
231
+ - def
232
+ AutoCorrect: false
233
+ Severity: warning
234
+
235
+ # Multi-line method chaining should be done with leading dots.
236
+ Layout/DotPosition:
237
+ EnforcedStyle: leading
238
+ SupportedStyles:
239
+ - leading
240
+ - trailing
241
+
242
+ Layout/EmptyComment:
243
+ AllowBorderComment: true
244
+ AllowMarginComment: true
245
+
246
+ # Use empty lines between defs.
247
+ Layout/EmptyLineBetweenDefs:
248
+ # If `true`, this parameter means that single line method definitions don't
249
+ # need an empty line between them.
250
+ AllowAdjacentOneLineDefs: false
251
+ # Can be array to specify minimum and maximum number of empty lines, e.g. [1, 2]
252
+ NumberOfEmptyLines: 1
253
+
254
+ Layout/EmptyLinesAroundBlockBody:
255
+ EnforcedStyle: no_empty_lines
256
+ SupportedStyles:
257
+ - empty_lines
258
+ - no_empty_lines
259
+
260
+ Layout/EmptyLinesAroundClassBody:
261
+ EnforcedStyle: no_empty_lines
262
+ SupportedStyles:
263
+ - empty_lines
264
+ - empty_lines_except_namespace
265
+ - empty_lines_special
266
+ - no_empty_lines
267
+ - beginning_only
268
+ - ending_only
269
+
270
+ Layout/EmptyLinesAroundModuleBody:
271
+ EnforcedStyle: no_empty_lines
272
+ SupportedStyles:
273
+ - empty_lines
274
+ - empty_lines_except_namespace
275
+ - empty_lines_special
276
+ - no_empty_lines
277
+
278
+ Lint/UnderscorePrefixedVariableName:
279
+ Enabled: false
280
+
281
+ # Align ends correctly.
282
+ Layout/EndAlignment:
283
+ # The value `keyword` means that `end` should be aligned with the matching
284
+ # keyword (`if`, `while`, etc.).
285
+ # The value `variable` means that in assignments, `end` should be aligned
286
+ # with the start of the variable on the left hand side of `=`. In all other
287
+ # situations, `end` should still be aligned with the keyword.
288
+ # The value `start_of_line` means that `end` should be aligned with the start
289
+ # of the line which the matching keyword appears on.
290
+ EnforcedStyleAlignWith: keyword
291
+ SupportedStylesAlignWith:
292
+ - keyword
293
+ - variable
294
+ - start_of_line
295
+ AutoCorrect: false
296
+ Severity: warning
297
+
298
+ Layout/EndOfLine:
299
+ # The `native` style means that CR+LF (Carriage Return + Line Feed) is
300
+ # enforced on Windows, and LF is enforced on other platforms. The other styles
301
+ # mean LF and CR+LF, respectively.
302
+ EnforcedStyle: lf
303
+ SupportedStyles:
304
+ - native
305
+ - lf
306
+ - crlf
307
+
308
+ Layout/ExtraSpacing:
309
+ # When true, allows most uses of extra spacing if the intent is to align
310
+ # things with the previous or next line, not counting empty lines or comment
311
+ # lines.
312
+ AllowForAlignment: true
313
+ # When true, forces the alignment of `=` in assignments on consecutive lines.
314
+ ForceEqualSignAlignment: false
315
+
316
+ Layout/FirstParameterIndentation:
317
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
318
+ SupportedStyles:
319
+ # The first parameter should always be indented one step more than the
320
+ # preceding line.
321
+ - consistent
322
+ # The first parameter should always be indented one level relative to the
323
+ # parent that is receiving the parameter
324
+ - consistent_relative_to_receiver
325
+ # The first parameter should normally be indented one step more than the
326
+ # preceding line, but if it's a parameter for a method call that is itself
327
+ # a parameter in a method call, then the inner parameter should be indented
328
+ # relative to the inner method.
329
+ - special_for_inner_method_call
330
+ # Same as `special_for_inner_method_call` except that the special rule only
331
+ # applies if the outer method call encloses its arguments in parentheses.
332
+ - special_for_inner_method_call_in_parentheses
333
+ # By default, the indentation width from `Layout/IndentationWidth` is used
334
+ # But it can be overridden by setting this parameter
335
+ IndentationWidth: ~
336
+
337
+ Layout/IndentationConsistency:
338
+ # The difference between `rails` and `normal` is that the `rails` style
339
+ # prescribes that in classes and modules the `protected` and `private`
340
+ # modifier keywords shall be indented the same as public methods and that
341
+ # protected and private members shall be indented one step more than the
342
+ # modifiers. Other than that, both styles mean that entities on the same
343
+ # logical depth shall have the same indentation.
344
+ EnforcedStyle: normal
345
+ SupportedStyles:
346
+ - normal
347
+ - rails
348
+
349
+ Layout/IndentationWidth:
350
+ # Number of spaces for each indentation level.
351
+ Width: 2
352
+ IgnoredPatterns: []
353
+
354
+ # Checks the indentation of the first element in an array literal.
355
+ Layout/IndentArray:
356
+ # The value `special_inside_parentheses` means that array literals with
357
+ # brackets that have their opening bracket on the same line as a surrounding
358
+ # opening round parenthesis, shall have their first element indented relative
359
+ # to the first position inside the parenthesis.
360
+ #
361
+ # The value `consistent` means that the indentation of the first element shall
362
+ # always be relative to the first position of the line where the opening
363
+ # bracket is.
364
+ #
365
+ # The value `align_brackets` means that the indentation of the first element
366
+ # shall always be relative to the position of the opening bracket.
367
+ EnforcedStyle: special_inside_parentheses
368
+ SupportedStyles:
369
+ - special_inside_parentheses
370
+ - consistent
371
+ - align_brackets
372
+ # By default, the indentation width from `Layout/IndentationWidth` is used
373
+ # But it can be overridden by setting this parameter
374
+ IndentationWidth: ~
375
+
376
+ # Checks the indentation of assignment RHS, when on a different line from LHS
377
+ Layout/IndentAssignment:
378
+ # By default, the indentation width from `Layout/IndentationWidth` is used
379
+ # But it can be overridden by setting this parameter
380
+ IndentationWidth: ~
381
+
382
+ # Checks the indentation of the first key in a hash literal.
383
+ Layout/IndentHash:
384
+ # The value `special_inside_parentheses` means that hash literals with braces
385
+ # that have their opening brace on the same line as a surrounding opening
386
+ # round parenthesis, shall have their first key indented relative to the
387
+ # first position inside the parenthesis.
388
+ #
389
+ # The value `consistent` means that the indentation of the first key shall
390
+ # always be relative to the first position of the line where the opening
391
+ # brace is.
392
+ #
393
+ # The value `align_braces` means that the indentation of the first key shall
394
+ # always be relative to the position of the opening brace.
395
+ EnforcedStyle: special_inside_parentheses
396
+ SupportedStyles:
397
+ - special_inside_parentheses
398
+ - consistent
399
+ - align_braces
400
+ # By default, the indentation width from `Layout/IndentationWidth` is used
401
+ # But it can be overridden by setting this parameter
402
+ IndentationWidth: ~
403
+
404
+ Layout/IndentHeredoc:
405
+ EnforcedStyle: auto_detection
406
+ SupportedStyles:
407
+ - auto_detection
408
+ - squiggly
409
+ - active_support
410
+ - powerpack
411
+ - unindent
412
+
413
+ Layout/SpaceInLambdaLiteral:
414
+ EnforcedStyle: require_no_space
415
+ SupportedStyles:
416
+ - require_no_space
417
+ - require_space
418
+
419
+ Layout/MultilineArrayBraceLayout:
420
+ EnforcedStyle: symmetrical
421
+ SupportedStyles:
422
+ # symmetrical: closing brace is positioned in same way as opening brace
423
+ # new_line: closing brace is always on a new line
424
+ # same_line: closing brace is always on the same line as last element
425
+ - symmetrical
426
+ - new_line
427
+ - same_line
428
+
429
+ Layout/MultilineAssignmentLayout:
430
+ # The types of assignments which are subject to this rule.
431
+ SupportedTypes:
432
+ - block
433
+ - case
434
+ - class
435
+ - if
436
+ - kwbegin
437
+ - module
438
+ EnforcedStyle: new_line
439
+ SupportedStyles:
440
+ # Ensures that the assignment operator and the rhs are on the same line for
441
+ # the set of supported types.
442
+ - same_line
443
+ # Ensures that the assignment operator and the rhs are on separate lines
444
+ # for the set of supported types.
445
+ - new_line
446
+
447
+ Layout/MultilineHashBraceLayout:
448
+ EnforcedStyle: symmetrical
449
+ SupportedStyles:
450
+ # symmetrical: closing brace is positioned in same way as opening brace
451
+ # new_line: closing brace is always on a new line
452
+ # same_line: closing brace is always on same line as last element
453
+ - symmetrical
454
+ - new_line
455
+ - same_line
456
+
457
+ Layout/MultilineMethodCallBraceLayout:
458
+ EnforcedStyle: symmetrical
459
+ SupportedStyles:
460
+ # symmetrical: closing brace is positioned in same way as opening brace
461
+ # new_line: closing brace is always on a new line
462
+ # same_line: closing brace is always on the same line as last argument
463
+ - symmetrical
464
+ - new_line
465
+ - same_line
466
+
467
+ Layout/MultilineMethodCallIndentation:
468
+ EnforcedStyle: aligned
469
+ SupportedStyles:
470
+ - aligned
471
+ - indented
472
+ - indented_relative_to_receiver
473
+ # By default, the indentation width from Layout/IndentationWidth is used
474
+ # But it can be overridden by setting this parameter
475
+ IndentationWidth: ~
476
+
477
+ Layout/MultilineMethodDefinitionBraceLayout:
478
+ EnforcedStyle: symmetrical
479
+ SupportedStyles:
480
+ # symmetrical: closing brace is positioned in same way as opening brace
481
+ # new_line: closing brace is always on a new line
482
+ # same_line: closing brace is always on the same line as last parameter
483
+ - symmetrical
484
+ - new_line
485
+ - same_line
486
+
487
+ Layout/MultilineOperationIndentation:
488
+ EnforcedStyle: aligned
489
+ SupportedStyles:
490
+ - aligned
491
+ - indented
492
+ # By default, the indentation width from `Layout/IndentationWidth` is used
493
+ # But it can be overridden by setting this parameter
494
+ IndentationWidth: ~
495
+
496
+ Layout/SpaceAroundBlockParameters:
497
+ EnforcedStyleInsidePipes: no_space
498
+ SupportedStylesInsidePipes:
499
+ - space
500
+ - no_space
501
+
502
+ Layout/SpaceAroundEqualsInParameterDefault:
503
+ EnforcedStyle: space
504
+ SupportedStyles:
505
+ - space
506
+ - no_space
507
+
508
+ Layout/SpaceAroundOperators:
509
+ # When `true`, allows most uses of extra spacing if the intent is to align
510
+ # with an operator on the previous or next line, not counting empty lines
511
+ # or comment lines.
512
+ AllowForAlignment: true
513
+
514
+ Layout/SpaceBeforeBlockBraces:
515
+ EnforcedStyle: space
516
+ SupportedStyles:
517
+ - space
518
+ - no_space
519
+ EnforcedStyleForEmptyBraces: space
520
+ SupportedStylesForEmptyBraces:
521
+ - space
522
+ - no_space
523
+
524
+ Layout/SpaceBeforeFirstArg:
525
+ # When `true`, allows most uses of extra spacing if the intent is to align
526
+ # things with the previous or next line, not counting empty lines or comment
527
+ # lines.
528
+ AllowForAlignment: true
529
+
530
+ Layout/SpaceInsideArrayLiteralBrackets:
531
+ EnforcedStyle: no_space
532
+ SupportedStyles:
533
+ - space
534
+ - no_space
535
+ # 'compact' normally requires a space inside the brackets, with the exception
536
+ # that successive left brackets or right brackets are collapsed together
537
+ - compact
538
+ EnforcedStyleForEmptyBrackets: no_space
539
+ SupportedStylesForEmptyBrackets:
540
+ - space
541
+ - no_space
542
+
543
+ Layout/SpaceInsideBlockBraces:
544
+ EnforcedStyle: space
545
+ SupportedStyles:
546
+ - space
547
+ - no_space
548
+ EnforcedStyleForEmptyBraces: no_space
549
+ SupportedStylesForEmptyBraces:
550
+ - space
551
+ - no_space
552
+ # Space between `{` and `|`. Overrides `EnforcedStyle` if there is a conflict.
553
+ SpaceBeforeBlockParameters: true
554
+
555
+ Layout/SpaceInsideHashLiteralBraces:
556
+ EnforcedStyle: space
557
+ SupportedStyles:
558
+ - space
559
+ - no_space
560
+ # 'compact' normally requires a space inside hash braces, with the exception
561
+ # that successive left braces or right braces are collapsed together
562
+ - compact
563
+ EnforcedStyleForEmptyBraces: no_space
564
+ SupportedStylesForEmptyBraces:
565
+ - space
566
+ - no_space
567
+
568
+ Layout/SpaceInsideParens:
569
+ EnforcedStyle: no_space
570
+ SupportedStyles:
571
+ - space
572
+ - no_space
573
+
574
+ Layout/SpaceInsideReferenceBrackets:
575
+ EnforcedStyle: no_space
576
+ SupportedStyles:
577
+ - space
578
+ - no_space
579
+ EnforcedStyleForEmptyBrackets: no_space
580
+ SupportedStylesForEmptyBrackets:
581
+ - space
582
+ - no_space
583
+
584
+ Layout/SpaceInsideStringInterpolation:
585
+ EnforcedStyle: no_space
586
+ SupportedStyles:
587
+ - space
588
+ - no_space
589
+
590
+ Layout/ClassStructure:
591
+ Categories:
592
+ module_inclusion:
593
+ - include
594
+ - prepend
595
+ - extend
596
+ ExpectedOrder:
597
+ - module_inclusion
598
+ - constants
599
+ - public_class_methods
600
+ - initializer
601
+ - public_methods
602
+ - protected_methods
603
+ - private_methods
604
+
605
+ Layout/Tab:
606
+ # By default, the indentation width from Layout/IndentationWidth is used
607
+ # But it can be overridden by setting this parameter
608
+ # It is used during auto-correction to determine how many spaces should
609
+ # replace each tab.
610
+ IndentationWidth: ~
611
+
612
+ Layout/TrailingBlankLines:
613
+ EnforcedStyle: final_newline
614
+ SupportedStyles:
615
+ - final_newline
616
+ - final_blank_line
617
+
618
+ Layout/TrailingWhitespace:
619
+ AllowInHeredoc: false
620
+
621
+ #################### Naming ##########################
622
+
623
+ Naming/FileName:
624
+ # File names listed in `AllCops:Include` are excluded by default. Add extra
625
+ # excludes here.
626
+ Exclude: []
627
+ # When `true`, requires that each source file should define a class or module
628
+ # with a name which matches the file name (converted to ... case).
629
+ # It further expects it to be nested inside modules which match the names
630
+ # of subdirectories in its path.
631
+ ExpectMatchingDefinition: false
632
+ # If non-`nil`, expect all source file names to match the following regex.
633
+ # Only the file name itself is matched, not the entire file path.
634
+ # Use anchors as necessary if you want to match the entire name rather than
635
+ # just a part of it.
636
+ Regex: ~
637
+ # With `IgnoreExecutableScripts` set to `true`, this cop does not
638
+ # report offending filenames for executable scripts (i.e. source
639
+ # files with a shebang in the first line).
640
+ IgnoreExecutableScripts: true
641
+ AllowedAcronyms:
642
+ - CLI
643
+ - DSL
644
+ - ACL
645
+ - API
646
+ - ASCII
647
+ - CPU
648
+ - CSS
649
+ - DNS
650
+ - EOF
651
+ - GUID
652
+ - HTML
653
+ - HTTP
654
+ - HTTPS
655
+ - ID
656
+ - IP
657
+ - JSON
658
+ - LHS
659
+ - QPS
660
+ - RAM
661
+ - RHS
662
+ - RPC
663
+ - SLA
664
+ - SMTP
665
+ - SQL
666
+ - SSH
667
+ - TCP
668
+ - TLS
669
+ - TTL
670
+ - UDP
671
+ - UI
672
+ - UID
673
+ - UUID
674
+ - URI
675
+ - URL
676
+ - UTF8
677
+ - VM
678
+ - XML
679
+ - XMPP
680
+ - XSRF
681
+ - XSS
682
+
683
+ Naming/HeredocDelimiterNaming:
684
+ Blacklist:
685
+ - !ruby/regexp '/(^|\s)(EO[A-Z]{1}|END)(\s|$)/'
686
+
687
+ Naming/HeredocDelimiterCase:
688
+ EnforcedStyle: uppercase
689
+ SupportedStyles:
690
+ - lowercase
691
+ - uppercase
692
+
693
+ Naming/MethodName:
694
+ EnforcedStyle: snake_case
695
+ SupportedStyles:
696
+ - snake_case
697
+ - camelCase
698
+
699
+ Naming/PredicateName:
700
+ # Predicate name prefixes.
701
+ NamePrefix:
702
+ - is_
703
+ - has_
704
+ - have_
705
+ # Predicate name prefixes that should be removed.
706
+ NamePrefixBlacklist:
707
+ - is_
708
+ - has_
709
+ - have_
710
+ # Predicate names which, despite having a blacklisted prefix, or no `?`,
711
+ # should still be accepted
712
+ NameWhitelist:
713
+ - is_a?
714
+ # Method definition macros for dynamically generated methods.
715
+ MethodDefinitionMacros:
716
+ - define_method
717
+ - define_singleton_method
718
+ # Exclude Rspec specs because there is a strong convention to write spec
719
+ # helpers in the form of `have_something` or `be_something`.
720
+ Exclude:
721
+ - 'spec/**/*'
722
+
723
+ Naming/UncommunicativeBlockParamName:
724
+ # Parameter names may be equal to or greater than this value
725
+ MinNameLength: 1
726
+ AllowNamesEndingInNumbers: true
727
+ # Whitelisted names that will not register an offense
728
+ AllowedNames: []
729
+ # Blacklisted names that will register an offense
730
+ ForbiddenNames: []
731
+
732
+ Naming/UncommunicativeMethodParamName:
733
+ # Parameter names may be equal to or greater than this value
734
+ MinNameLength: 3
735
+ AllowNamesEndingInNumbers: true
736
+ # Whitelisted names that will not register an offense
737
+ AllowedNames:
738
+ - io
739
+ - id
740
+ - to
741
+ - by
742
+ - 'on'
743
+ - in
744
+ - at
745
+ # Blacklisted names that will register an offense
746
+ ForbiddenNames: []
747
+
748
+ Naming/VariableName:
749
+ EnforcedStyle: snake_case
750
+ SupportedStyles:
751
+ - snake_case
752
+ - camelCase
753
+
754
+ Naming/VariableNumber:
755
+ EnforcedStyle: snake_case
756
+ SupportedStyles:
757
+ - snake_case
758
+ - normalcase
759
+ - non_integer
760
+
761
+ #################### Style ###########################
762
+
763
+ Style/AccessModifierDeclarations:
764
+ EnforcedStyle: group
765
+ SupportedStyles:
766
+ - inline
767
+ - group
768
+
769
+ Style/Alias:
770
+ EnforcedStyle: prefer_alias
771
+ SupportedStyles:
772
+ - prefer_alias
773
+ - prefer_alias_method
774
+
775
+ Style/AndOr:
776
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
777
+ # or completely (always).
778
+ EnforcedStyle: always
779
+ SupportedStyles:
780
+ - always
781
+ - conditionals
782
+
783
+ Style/AsciiComments:
784
+ AllowedChars: []
785
+
786
+ # Checks if usage of `%()` or `%Q()` matches configuration.
787
+ Style/BarePercentLiterals:
788
+ EnforcedStyle: bare_percent
789
+ SupportedStyles:
790
+ - percent_q
791
+ - bare_percent
792
+
793
+ Style/BlockDelimiters:
794
+ EnforcedStyle: line_count_based
795
+ SupportedStyles:
796
+ # The `line_count_based` style enforces braces around single line blocks and
797
+ # do..end around multi-line blocks.
798
+ - line_count_based
799
+ # The `semantic` style enforces braces around functional blocks, where the
800
+ # primary purpose of the block is to return a value and do..end for
801
+ # procedural blocks, where the primary purpose of the block is its
802
+ # side-effects.
803
+ #
804
+ # This looks at the usage of a block's method to determine its type (e.g. is
805
+ # the result of a `map` assigned to a variable or passed to another
806
+ # method) but exceptions are permitted in the `ProceduralMethods`,
807
+ # `FunctionalMethods` and `IgnoredMethods` sections below.
808
+ - semantic
809
+ # The `braces_for_chaining` style enforces braces around single line blocks
810
+ # and do..end around multi-line blocks, except for multi-line blocks whose
811
+ # return value is being chained with another method (in which case braces
812
+ # are enforced).
813
+ - braces_for_chaining
814
+ ProceduralMethods:
815
+ # Methods that are known to be procedural in nature but look functional from
816
+ # their usage, e.g.
817
+ #
818
+ # time = Benchmark.realtime do
819
+ # foo.bar
820
+ # end
821
+ #
822
+ # Here, the return value of the block is discarded but the return value of
823
+ # `Benchmark.realtime` is used.
824
+ - benchmark
825
+ - bm
826
+ - bmbm
827
+ - create
828
+ - each_with_object
829
+ - measure
830
+ - new
831
+ - realtime
832
+ - tap
833
+ - with_object
834
+ FunctionalMethods:
835
+ # Methods that are known to be functional in nature but look procedural from
836
+ # their usage, e.g.
837
+ #
838
+ # let(:foo) { Foo.new }
839
+ #
840
+ # Here, the return value of `Foo.new` is used to define a `foo` helper but
841
+ # doesn't appear to be used from the return value of `let`.
842
+ - let
843
+ - let!
844
+ - subject
845
+ - watch
846
+ IgnoredMethods:
847
+ # Methods that can be either procedural or functional and cannot be
848
+ # categorised from their usage alone, e.g.
849
+ #
850
+ # foo = lambda do |x|
851
+ # puts "Hello, #{x}"
852
+ # end
853
+ #
854
+ # foo = lambda do |x|
855
+ # x * 100
856
+ # end
857
+ #
858
+ # Here, it is impossible to tell from the return value of `lambda` whether
859
+ # the inner block's return value is significant.
860
+ - lambda
861
+ - proc
862
+ - it
863
+
864
+ Style/BracesAroundHashParameters:
865
+ EnforcedStyle: no_braces
866
+ SupportedStyles:
867
+ # The `braces` style enforces braces around all method parameters that are
868
+ # hashes.
869
+ - braces
870
+ # The `no_braces` style checks that the last parameter doesn't have braces
871
+ # around it.
872
+ - no_braces
873
+ # The `context_dependent` style checks that the last parameter doesn't have
874
+ # braces around it, but requires braces if the second to last parameter is
875
+ # also a hash literal.
876
+ - context_dependent
877
+
878
+ Style/ClassAndModuleChildren:
879
+ # Checks the style of children definitions at classes and modules.
880
+ #
881
+ # Basically there are two different styles:
882
+ #
883
+ # `nested` - have each child on a separate line
884
+ # class Foo
885
+ # class Bar
886
+ # end
887
+ # end
888
+ #
889
+ # `compact` - combine definitions as much as possible
890
+ # class Foo::Bar
891
+ # end
892
+ #
893
+ # The compact style is only forced, for classes or modules with one child.
894
+ EnforcedStyle: nested
895
+ SupportedStyles:
896
+ - nested
897
+ - compact
898
+
899
+ Style/ClassCheck:
900
+ EnforcedStyle: is_a?
901
+ SupportedStyles:
902
+ - is_a?
903
+ - kind_of?
904
+
905
+ # Align with the style guide.
906
+ Style/CollectionMethods:
907
+ # Mapping from undesired method to desired_method
908
+ # e.g. to use `detect` over `find`:
909
+ #
910
+ # CollectionMethods:
911
+ # PreferredMethods:
912
+ # find: detect
913
+ PreferredMethods:
914
+ collect: 'map'
915
+ collect!: 'map!'
916
+ inject: 'reduce'
917
+ detect: 'find'
918
+ find_all: 'select'
919
+
920
+ # Use '`' or '%x' around command literals.
921
+ Style/CommandLiteral:
922
+ EnforcedStyle: backticks
923
+ # backticks: Always use backticks.
924
+ # percent_x: Always use `%x`.
925
+ # mixed: Use backticks on single-line commands, and `%x` on multi-line commands.
926
+ SupportedStyles:
927
+ - backticks
928
+ - percent_x
929
+ - mixed
930
+ # If `false`, the cop will always recommend using `%x` if one or more backticks
931
+ # are found in the command string.
932
+ AllowInnerBackticks: false
933
+
934
+ # Checks formatting of special comments
935
+ Style/CommentAnnotation:
936
+ Keywords:
937
+ - TODO
938
+ - FIXME
939
+ - OPTIMIZE
940
+ - HACK
941
+ - REVIEW
942
+
943
+ Style/ConditionalAssignment:
944
+ EnforcedStyle: assign_to_condition
945
+ SupportedStyles:
946
+ - assign_to_condition
947
+ - assign_inside_condition
948
+ # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
949
+ # will only register an offense when all branches of a condition are
950
+ # a single line.
951
+ # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
952
+ # will only register an offense for assignment to a condition that has
953
+ # at least one multiline branch.
954
+ SingleLineConditionsOnly: true
955
+ IncludeTernaryExpressions: true
956
+ Enabled: false
957
+
958
+ # Checks that you have put a copyright in a comment before any code.
959
+ #
960
+ # You can override the default Notice in your .rubocop.yml file.
961
+ #
962
+ # In order to use autocorrect, you must supply a value for the
963
+ # `AutocorrectNotice` key that matches the regexp Notice. A blank
964
+ # `AutocorrectNotice` will cause an error during autocorrect.
965
+ #
966
+ # Autocorrect will add a copyright notice in a comment at the top
967
+ # of the file immediately after any shebang or encoding comments.
968
+ #
969
+ # Example rubocop.yml:
970
+ #
971
+ # Style/Copyright:
972
+ # Enabled: true
973
+ # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
974
+ # AutocorrectNotice: '# Copyright (c) 2015 Yahoo! Inc.'
975
+ #
976
+ Style/Copyright:
977
+ Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
978
+ AutocorrectNotice: ''
979
+
980
+ Style/DocumentationMethod:
981
+ RequireForNonPublicMethods: false
982
+
983
+ # Warn on empty else statements
984
+ # empty - warn only on empty `else`
985
+ # nil - warn on `else` with nil in it
986
+ # both - warn on empty `else` and `else` with `nil` in it
987
+ Style/EmptyElse:
988
+ EnforcedStyle: both
989
+ SupportedStyles:
990
+ - empty
991
+ - nil
992
+ - both
993
+
994
+ Style/EmptyMethod:
995
+ EnforcedStyle: compact
996
+ SupportedStyles:
997
+ - compact
998
+ - expanded
999
+
1000
+ # Checks use of for or each in multiline loops.
1001
+ Style/For:
1002
+ EnforcedStyle: each
1003
+ SupportedStyles:
1004
+ - each
1005
+ - for
1006
+
1007
+ # Enforce the method used for string formatting.
1008
+ Style/FormatString:
1009
+ EnforcedStyle: percent
1010
+ SupportedStyles:
1011
+ - format
1012
+ - sprintf
1013
+ - percent
1014
+
1015
+ # Enforce using either `%<token>s` or `%{token}`
1016
+ Style/FormatStringToken:
1017
+ EnforcedStyle: unannotated
1018
+ SupportedStyles:
1019
+ # Prefer tokens which contain a sprintf like type annotation like
1020
+ # `%<name>s`, `%<age>d`, `%<score>f`
1021
+ - annotated
1022
+ # Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
1023
+ - template
1024
+ - unannotated
1025
+
1026
+ Style/FrozenStringLiteralComment:
1027
+ EnforcedStyle: when_needed
1028
+ SupportedStyles:
1029
+ # `when_needed` will add the frozen string literal comment to files
1030
+ # only when the `TargetRubyVersion` is set to 2.3+.
1031
+ - when_needed
1032
+ # `always` will always add the frozen string literal comment to a file
1033
+ # regardless of the Ruby version or if `freeze` or `<<` are called on a
1034
+ # string literal. If you run code against multiple versions of Ruby, it is
1035
+ # possible that this will create errors in Ruby 2.3.0+.
1036
+ - always
1037
+ # `never` will enforce that the frozen string literal comment does not
1038
+ # exist in a file.
1039
+ - never
1040
+
1041
+ # Built-in global variables are allowed by default.
1042
+ Style/GlobalVars:
1043
+ AllowedVariables: []
1044
+
1045
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
1046
+ # needs to have to trigger this cop
1047
+ Style/GuardClause:
1048
+ MinBodyLength: 1
1049
+
1050
+ Style/HashSyntax:
1051
+ EnforcedStyle: ruby19
1052
+ SupportedStyles:
1053
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
1054
+ - ruby19
1055
+ # checks for hash rocket syntax for all hashes
1056
+ - hash_rockets
1057
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
1058
+ - no_mixed_keys
1059
+ # enforces both ruby19 and no_mixed_keys styles
1060
+ - ruby19_no_mixed_keys
1061
+ # Force hashes that have a symbol value to use hash rockets
1062
+ UseHashRocketsWithSymbolValues: false
1063
+ # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
1064
+ PreferHashRocketsForNonAlnumEndingSymbols: false
1065
+
1066
+ Style/InverseMethods:
1067
+ # `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
1068
+ # The relationship of inverse methods only needs to be defined in one direction.
1069
+ # Keys and values both need to be defined as symbols.
1070
+ InverseMethods:
1071
+ :any?: :none?
1072
+ :even?: :odd?
1073
+ :==: :!=
1074
+ :=~: :!~
1075
+ :<: :>=
1076
+ :>: :<=
1077
+ # `ActiveSupport` defines some common inverse methods. They are listed below,
1078
+ # and not enabled by default.
1079
+ #:present?: :blank?,
1080
+ #:include?: :exclude?
1081
+ # `InverseBlocks` are methods that are inverted by inverting the return
1082
+ # of the block that is passed to the method
1083
+ InverseBlocks:
1084
+ :select: :reject
1085
+ :select!: :reject!
1086
+
1087
+ Style/Lambda:
1088
+ EnforcedStyle: line_count_dependent
1089
+ SupportedStyles:
1090
+ - line_count_dependent
1091
+ - lambda
1092
+ - literal
1093
+
1094
+ Style/LambdaCall:
1095
+ EnforcedStyle: call
1096
+ SupportedStyles:
1097
+ - call
1098
+ - braces
1099
+
1100
+ Style/MethodCallWithArgsParentheses:
1101
+ IgnoreMacros: true
1102
+ IgnoredMethods: []
1103
+
1104
+ Style/MethodCallWithoutArgsParentheses:
1105
+ IgnoredMethods: []
1106
+
1107
+ Style/MethodDefParentheses:
1108
+ EnforcedStyle: require_parentheses
1109
+ SupportedStyles:
1110
+ - require_parentheses
1111
+ - require_no_parentheses
1112
+ - require_no_parentheses_except_multiline
1113
+
1114
+ Style/MissingElse:
1115
+ EnforcedStyle: both
1116
+ SupportedStyles:
1117
+ # if - warn when an if expression is missing an else branch
1118
+ # case - warn when a case expression is missing an else branch
1119
+ # both - warn when an if or case expression is missing an else branch
1120
+ - if
1121
+ - case
1122
+ - both
1123
+
1124
+ # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
1125
+ # `module` bodies.
1126
+ Style/MixinGrouping:
1127
+ EnforcedStyle: separated
1128
+ SupportedStyles:
1129
+ # separated: each mixed in module goes in a separate statement.
1130
+ # grouped: mixed in modules are grouped into a single statement.
1131
+ - separated
1132
+ - grouped
1133
+
1134
+ Style/ModuleFunction:
1135
+ EnforcedStyle: module_function
1136
+ SupportedStyles:
1137
+ - module_function
1138
+ - extend_self
1139
+
1140
+ Style/MultilineMemoization:
1141
+ EnforcedStyle: keyword
1142
+ SupportedStyles:
1143
+ - keyword
1144
+ - braces
1145
+
1146
+ Style/NegatedIf:
1147
+ EnforcedStyle: both
1148
+ SupportedStyles:
1149
+ # both: prefix and postfix negated `if` should both use `unless`
1150
+ # prefix: only use `unless` for negated `if` statements positioned before the body of the statement
1151
+ # postfix: only use `unless` for negated `if` statements positioned after the body of the statement
1152
+ - both
1153
+ - prefix
1154
+ - postfix
1155
+
1156
+ Style/NestedParenthesizedCalls:
1157
+ Whitelist:
1158
+ - be
1159
+ - be_a
1160
+ - be_an
1161
+ - be_between
1162
+ - be_falsey
1163
+ - be_kind_of
1164
+ - be_instance_of
1165
+ - be_truthy
1166
+ - be_within
1167
+ - eq
1168
+ - eql
1169
+ - end_with
1170
+ - include
1171
+ - match
1172
+ - raise_error
1173
+ - respond_to
1174
+ - start_with
1175
+
1176
+ Style/Next:
1177
+ # With `always` all conditions at the end of an iteration needs to be
1178
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
1179
+ # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
1180
+ EnforcedStyle: skip_modifier_ifs
1181
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
1182
+ # needs to have to trigger this cop
1183
+ MinBodyLength: 3
1184
+ SupportedStyles:
1185
+ - skip_modifier_ifs
1186
+ - always
1187
+
1188
+ Style/NonNilCheck:
1189
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
1190
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
1191
+ # **usually** OK, but might change behavior.
1192
+ #
1193
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
1194
+ # offenses for `!x.nil?` and does no changes that might change behavior.
1195
+ IncludeSemanticChanges: false
1196
+
1197
+ Style/NumericLiterals:
1198
+ MinDigits: 5
1199
+ Strict: false
1200
+
1201
+ Style/NumericLiteralPrefix:
1202
+ EnforcedOctalStyle: zero_with_o
1203
+ SupportedOctalStyles:
1204
+ - zero_with_o
1205
+ - zero_only
1206
+
1207
+ Style/NumericPredicate:
1208
+ EnforcedStyle: predicate
1209
+ SupportedStyles:
1210
+ - predicate
1211
+ - comparison
1212
+ # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
1213
+ # false positives.
1214
+ Exclude:
1215
+ - 'spec/**/*'
1216
+
1217
+ Style/OptionHash:
1218
+ # A list of parameter names that will be flagged by this cop.
1219
+ SuspiciousParamNames:
1220
+ - options
1221
+ - opts
1222
+ - args
1223
+ - params
1224
+ - parameters
1225
+
1226
+ # Allow safe assignment in conditions.
1227
+ Style/ParenthesesAroundCondition:
1228
+ AllowSafeAssignment: true
1229
+ AllowInMultilineConditions: false
1230
+
1231
+ Style/PercentLiteralDelimiters:
1232
+ # Specify the default preferred delimiter for all types with the 'default' key
1233
+ # Override individual delimiters (even with default specified) by specifying
1234
+ # an individual key
1235
+ PreferredDelimiters:
1236
+ default: ()
1237
+ '%i': '[]'
1238
+ '%I': '[]'
1239
+ '%r': '{}'
1240
+ '%w': '[]'
1241
+ '%W': '[]'
1242
+
1243
+ Style/PercentQLiterals:
1244
+ EnforcedStyle: lower_case_q
1245
+ SupportedStyles:
1246
+ - lower_case_q # Use `%q` when possible, `%Q` when necessary
1247
+ - upper_case_q # Always use `%Q`
1248
+
1249
+ Style/PreferredHashMethods:
1250
+ EnforcedStyle: short
1251
+ SupportedStyles:
1252
+ - short
1253
+ - verbose
1254
+
1255
+ Style/RaiseArgs:
1256
+ EnforcedStyle: compact
1257
+ SupportedStyles:
1258
+ - compact # raise Exception.new(msg)
1259
+ - exploded # raise Exception, msg
1260
+
1261
+ Style/RedundantReturn:
1262
+ # When `true` allows code like `return x, y`.
1263
+ AllowMultipleReturnValues: false
1264
+
1265
+ # Use `/` or `%r` around regular expressions.
1266
+ Style/RegexpLiteral:
1267
+ EnforcedStyle: slashes
1268
+ # slashes: Always use slashes.
1269
+ # percent_r: Always use `%r`.
1270
+ # mixed: Use slashes on single-line regexes, and `%r` on multi-line regexes.
1271
+ SupportedStyles:
1272
+ - slashes
1273
+ - percent_r
1274
+ - mixed
1275
+ # If `false`, the cop will always recommend using `%r` if one or more slashes
1276
+ # are found in the regexp string.
1277
+ AllowInnerSlashes: false
1278
+
1279
+ Style/RescueStandardError:
1280
+ EnforcedStyle: explicit
1281
+ # implicit: Do not include the error class, `rescue`
1282
+ # explicit: Require an error class `rescue StandardError`
1283
+ SupportedStyles:
1284
+ - implicit
1285
+ - explicit
1286
+
1287
+ Style/ReturnNil:
1288
+ EnforcedStyle: return
1289
+ SupportedStyles:
1290
+ - return
1291
+ - return_nil
1292
+
1293
+ Style/SafeNavigation:
1294
+ # Safe navigation may cause a statement to start returning `nil` in addition
1295
+ # to whatever it used to return.
1296
+ ConvertCodeThatCanStartToReturnNil: false
1297
+ Whitelist:
1298
+ - present?
1299
+ - blank?
1300
+ - presence
1301
+ - try
1302
+ - try!
1303
+
1304
+ Style/Semicolon:
1305
+ # Allow `;` to separate several expressions on the same line.
1306
+ AllowAsExpressionSeparator: false
1307
+
1308
+ Style/SignalException:
1309
+ EnforcedStyle: only_raise
1310
+ SupportedStyles:
1311
+ - only_raise
1312
+ - only_fail
1313
+ - semantic
1314
+
1315
+ Style/SingleLineBlockParams:
1316
+ Methods:
1317
+ - reduce:
1318
+ - acc
1319
+ - elem
1320
+ - inject:
1321
+ - acc
1322
+ - elem
1323
+
1324
+ Style/SingleLineMethods:
1325
+ AllowIfMethodIsEmpty: true
1326
+
1327
+ Style/SpecialGlobalVars:
1328
+ EnforcedStyle: use_english_names
1329
+ SupportedStyles:
1330
+ - use_perl_names
1331
+ - use_english_names
1332
+
1333
+ Style/StabbyLambdaParentheses:
1334
+ EnforcedStyle: require_parentheses
1335
+ SupportedStyles:
1336
+ - require_parentheses
1337
+ - require_no_parentheses
1338
+
1339
+ Style/StringLiterals:
1340
+ EnforcedStyle: double_quotes
1341
+ SupportedStyles:
1342
+ - single_quotes
1343
+ - double_quotes
1344
+ # If `true`, strings which span multiple lines using `\` for continuation must
1345
+ # use the same type of quotes on each line.
1346
+ ConsistentQuotesInMultiline: false
1347
+ Enabled: true
1348
+
1349
+ Style/StringLiteralsInInterpolation:
1350
+ EnforcedStyle: double_quotes
1351
+ SupportedStyles:
1352
+ - single_quotes
1353
+ - double_quotes
1354
+
1355
+ Style/StringMethods:
1356
+ # Mapping from undesired method to desired_method
1357
+ # e.g. to use `to_sym` over `intern`:
1358
+ #
1359
+ # StringMethods:
1360
+ # PreferredMethods:
1361
+ # intern: to_sym
1362
+ PreferredMethods:
1363
+ intern: to_sym
1364
+
1365
+ Style/SymbolArray:
1366
+ EnforcedStyle: percent
1367
+ MinSize: 2
1368
+ SupportedStyles:
1369
+ - percent
1370
+ - brackets
1371
+
1372
+ Style/SymbolProc:
1373
+ # A list of method names to be ignored by the check.
1374
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
1375
+ IgnoredMethods:
1376
+ - respond_to
1377
+ - define_method
1378
+
1379
+ Style/TernaryParentheses:
1380
+ EnforcedStyle: require_no_parentheses
1381
+ SupportedStyles:
1382
+ - require_parentheses
1383
+ - require_no_parentheses
1384
+ - require_parentheses_when_complex
1385
+ AllowSafeAssignment: true
1386
+
1387
+ Style/TrailingCommaInArguments:
1388
+ # If `comma`, the cop requires a comma after the last argument, but only for
1389
+ # parenthesized method calls where each argument is on its own line.
1390
+ # If `consistent_comma`, the cop requires a comma after the last argument,
1391
+ # for all parenthesized method calls with arguments.
1392
+ EnforcedStyleForMultiline: no_comma
1393
+ SupportedStylesForMultiline:
1394
+ - comma
1395
+ - consistent_comma
1396
+ - no_comma
1397
+
1398
+ Style/TrailingCommaInArrayLiteral:
1399
+ # If `comma`, the cop requires a comma after the last item in an array,
1400
+ # but only when each item is on its own line.
1401
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1402
+ # non-empty array literals.
1403
+ EnforcedStyleForMultiline: no_comma
1404
+ SupportedStylesForMultiline:
1405
+ - comma
1406
+ - consistent_comma
1407
+ - no_comma
1408
+
1409
+ Style/TrailingCommaInHashLiteral:
1410
+ # If `comma`, the cop requires a comma after the last item in a hash,
1411
+ # but only when each item is on its own line.
1412
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1413
+ # non-empty hash literals.
1414
+ EnforcedStyleForMultiline: no_comma
1415
+ SupportedStylesForMultiline:
1416
+ - comma
1417
+ - consistent_comma
1418
+ - no_comma
1419
+
1420
+ # `TrivialAccessors` requires exact name matches and doesn't allow
1421
+ # predicated methods by default.
1422
+ Style/TrivialAccessors:
1423
+ # When set to `false` the cop will suggest the use of accessor methods
1424
+ # in situations like:
1425
+ #
1426
+ # def name
1427
+ # @other_name
1428
+ # end
1429
+ #
1430
+ # This way you can uncover "hidden" attributes in your code.
1431
+ ExactNameMatch: true
1432
+ AllowPredicates: true
1433
+ # Allows trivial writers that don't end in an equal sign. e.g.
1434
+ #
1435
+ # def on_exception(action)
1436
+ # @on_exception=action
1437
+ # end
1438
+ # on_exception :restart
1439
+ #
1440
+ # Commonly used in DSLs
1441
+ AllowDSLWriters: false
1442
+ IgnoreClassMethods: false
1443
+ Whitelist:
1444
+ - to_ary
1445
+ - to_a
1446
+ - to_c
1447
+ - to_enum
1448
+ - to_h
1449
+ - to_hash
1450
+ - to_i
1451
+ - to_int
1452
+ - to_io
1453
+ - to_open
1454
+ - to_path
1455
+ - to_proc
1456
+ - to_r
1457
+ - to_regexp
1458
+ - to_str
1459
+ - to_s
1460
+ - to_sym
1461
+
1462
+ # `WordArray` enforces how array literals of word-like strings should be expressed.
1463
+ Style/WordArray:
1464
+ EnforcedStyle: percent
1465
+ SupportedStyles:
1466
+ # percent style: %w(word1 word2)
1467
+ - percent
1468
+ # bracket style: ['word1', 'word2']
1469
+ - brackets
1470
+ # The `MinSize` option causes the `WordArray` rule to be ignored for arrays
1471
+ # smaller than a certain size. The rule is only applied to arrays
1472
+ # whose element count is greater than or equal to `MinSize`.
1473
+ MinSize: 2
1474
+ # The regular expression `WordRegex` decides what is considered a word.
1475
+ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1476
+
1477
+ Style/YodaCondition:
1478
+ EnforcedStyle: all_comparison_operators
1479
+ SupportedStyles:
1480
+ # check all comparison operators
1481
+ - all_comparison_operators
1482
+ # check only equality operators: `!=` and `==`
1483
+ - equality_operators_only
1484
+
1485
+ #################### Metrics ###############################
1486
+
1487
+ Metrics/AbcSize:
1488
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1489
+ # a Float.
1490
+ Enabled: false
1491
+
1492
+ Metrics/BlockLength:
1493
+ Enabled: false
1494
+
1495
+ Metrics/BlockNesting:
1496
+ Enabled: false
1497
+
1498
+ Metrics/ClassLength:
1499
+ Enabled: false
1500
+
1501
+ # Avoid complex methods.
1502
+ Metrics/CyclomaticComplexity:
1503
+ Enabled: false
1504
+
1505
+ Metrics/LineLength:
1506
+ Max: 160
1507
+ # To make it possible to copy or click on URIs in the code, we allow lines
1508
+ # containing a URI to be longer than Max.
1509
+ AllowHeredoc: true
1510
+ AllowURI: true
1511
+ URISchemes:
1512
+ - http
1513
+ - https
1514
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
1515
+ # directives like '# rubocop: enable ...' when calculating a line's length.
1516
+ IgnoreCopDirectives: false
1517
+ # The IgnoredPatterns option is a list of !ruby/regexp and/or string
1518
+ # elements. Strings will be converted to Regexp objects. A line that matches
1519
+ # any regular expression listed in this option will be ignored by LineLength.
1520
+ IgnoredPatterns: []
1521
+ Enabled: false
1522
+
1523
+ Metrics/MethodLength:
1524
+ Enabled: false
1525
+
1526
+ Metrics/ModuleLength:
1527
+ Enabled: false
1528
+
1529
+ Metrics/ParameterLists:
1530
+ Enabled: false
1531
+
1532
+ Metrics/PerceivedComplexity:
1533
+ Enabled: false
1534
+
1535
+ #################### Lint ##################################
1536
+
1537
+ # Allow safe assignment in conditions.
1538
+ Lint/AssignmentInCondition:
1539
+ AllowSafeAssignment: true
1540
+
1541
+ Lint/InheritException:
1542
+ # The default base class in favour of `Exception`.
1543
+ EnforcedStyle: runtime_error
1544
+ SupportedStyles:
1545
+ - runtime_error
1546
+ - standard_error
1547
+
1548
+ Lint/MissingCopEnableDirective:
1549
+ # Maximum number of consecutive lines the cop can be disabled for.
1550
+ # 0 allows only single-line disables
1551
+ # 1 would mean the maximum allowed is the following:
1552
+ # # rubocop:disable SomeCop
1553
+ # a = 1
1554
+ # # rubocop:enable SomeCop
1555
+ # .inf for any size
1556
+ MaximumRangeSize: .inf
1557
+
1558
+ Lint/SafeNavigationChain:
1559
+ Whitelist:
1560
+ - present?
1561
+ - blank?
1562
+ - presence
1563
+ - try
1564
+ - try!
1565
+
1566
+ Lint/SafeNavigationConsistency:
1567
+ Whitelist:
1568
+ - present?
1569
+ - blank?
1570
+ - presence
1571
+ - try
1572
+ - try!
1573
+
1574
+ # Checks for shadowed arguments
1575
+ Lint/ShadowedArgument:
1576
+ IgnoreImplicitReferences: false
1577
+
1578
+ # Checks for unused block arguments
1579
+ Lint/UnusedBlockArgument:
1580
+ IgnoreEmptyBlocks: true
1581
+ AllowUnusedKeywordArguments: false
1582
+
1583
+ # Checks for unused method arguments.
1584
+ Lint/UnusedMethodArgument:
1585
+ AllowUnusedKeywordArguments: false
1586
+ IgnoreEmptyMethods: true
1587
+
1588
+ Lint/Void:
1589
+ CheckForMethodsWithNoSideEffects: false
1590
+
1591
+ Rails:
1592
+ Enabled: false
1593
+
1594
+ #################### Performance ###########################
1595
+
1596
+ Performance/DoubleStartEndWith:
1597
+ # Used to check for `starts_with?` and `ends_with?`.
1598
+ # These methods are defined by `ActiveSupport`.
1599
+ IncludeActiveSupportAliases: false
1600
+
1601
+ Performance/RedundantMerge:
1602
+ # Max number of key-value pairs to consider an offense
1603
+ MaxKeyValuePairs: 2
1604
+
1605
+ Bundler/OrderedGems:
1606
+ TreatCommentsAsGroupSeparators: true
1607
+
1608
+ Gemspec/OrderedDependencies:
1609
+ TreatCommentsAsGroupSeparators: true