guided_interactor 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1ea412ccb8ecd4d499708fc4519a4fb3775a8607916002ce984c4f47ef1e2231
4
+ data.tar.gz: 7f1f6d55462f64b68424b7313808cfb93e9b42bd03a5972c121e2e98154c8e9b
5
+ SHA512:
6
+ metadata.gz: 5e4c5ec080d5221a24f999b38045d56bcb30ca218df73ac8969febe8f163bd6cb742bb03108f89fb1cce1c9c27cd8e1e40f89c3c329d748cd664e5499fd1796a
7
+ data.tar.gz: 01fc73247a24f055693bd6409ed4c6cabce12a13bc0dceb4d1fe4c21860f09bf6c6e8fb923ed3a86d14b8fbb8fa39f61b4831cfaaf057793b0fbba4c196a58ed
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+
13
+ # Editor files
14
+ .idea/*
15
+ .vscode
16
+
17
+ # Package
18
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
4
+ --order random
data/.rubocop.yml ADDED
@@ -0,0 +1,745 @@
1
+ AllCops:
2
+ Exclude:
3
+ - bin/*
4
+ - db/schema.rb
5
+ - vendor/ruby/**/*
6
+ - node_modules/**/*
7
+ TargetRubyVersion: 2.5
8
+
9
+ # Layout
10
+
11
+ Layout/AccessModifierIndentation:
12
+ Enabled: true
13
+
14
+ Layout/AlignParameters:
15
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
16
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
17
+ Enabled: true,
18
+ EnforcedStyle: with_fixed_indentation
19
+
20
+ Layout/ClassStructure:
21
+ Categories:
22
+ associations:
23
+ - belongs_to
24
+ - has_one
25
+ - has_many
26
+ attributes:
27
+ - attr_accessor
28
+ - attr_reader
29
+ - attr_writer
30
+ - attr_accessible
31
+ callbacks:
32
+ - before_validation
33
+ - after_validation
34
+ - before_save
35
+ - around_save
36
+ - before_create
37
+ - around_create
38
+ - after_create
39
+ - after_save
40
+ - after_commit
41
+ module_inclusion:
42
+ - include
43
+ - prepend
44
+ - extend
45
+ validations:
46
+ - validates
47
+ ExpectedOrder:
48
+ - module_inclusion
49
+ - constants
50
+ - attributes
51
+ - associations
52
+ - validations
53
+ - callbacks
54
+ - public_class_methods
55
+ - initializer
56
+ - public_methods
57
+ - protected_methods
58
+ - private_methods
59
+ Enabled: true
60
+
61
+ Layout/DotPosition:
62
+ Description: 'Checks the position of the dot in multi-line method calls.'
63
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
64
+ EnforcedStyle: leading
65
+
66
+ Layout/EmptyLinesAroundClassBody:
67
+ Enabled: true
68
+ EnforcedStyle: empty_lines
69
+
70
+ Layout/EmptyLinesAroundModuleBody:
71
+ Enabled: true
72
+ EnforcedStyle: empty_lines_except_namespace
73
+
74
+ Layout/ExtraSpacing:
75
+ Description: 'Do not use unnecessary spacing.'
76
+ Enabled: true
77
+
78
+ Layout/InitialIndentation:
79
+ Description: >-
80
+ Checks the indentation of the first non-blank non-comment line in a file.
81
+ Enabled: false
82
+
83
+ Layout/IndentHash:
84
+ Enabled: true
85
+ EnforcedStyle: consistent
86
+
87
+ Layout/IndentationConsistency:
88
+ EnforcedStyle: rails
89
+ Enabled: true
90
+
91
+ Layout/MultilineBlockLayout:
92
+ Enabled: false
93
+
94
+ Layout/MultilineOperationIndentation:
95
+ Description: >-
96
+ Checks indentation of binary operations that span more than
97
+ one line.
98
+ Enabled: true
99
+ EnforcedStyle: indented
100
+
101
+ Layout/MultilineMethodCallIndentation:
102
+ Description: >-
103
+ Checks indentation of method calls with the dot operator
104
+ that span more than one line.
105
+ Enabled: true
106
+ EnforcedStyle: indented
107
+
108
+ Layout/SpaceBeforeBlockBraces:
109
+ Description: >-
110
+ Checks that block braces have or don't have a space before
111
+ the opening brace depending on configuration.
112
+ Enabled: false
113
+
114
+ # Naming
115
+
116
+ Naming/AccessorMethodName:
117
+ Description: Check the naming of accessor methods for get_/set_.
118
+ Enabled: false
119
+
120
+ Naming/AsciiIdentifiers:
121
+ Description: 'Use only ascii symbols in identifiers.'
122
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
123
+ Enabled: true
124
+
125
+ Naming/BinaryOperatorParameterName:
126
+ Description: 'When defining binary operators, name the argument other.'
127
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
128
+ Enabled: false
129
+
130
+ Naming/FileName:
131
+ Description: 'Use snake_case for source file names.'
132
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
133
+ Enabled: true
134
+
135
+ Naming/PredicateName:
136
+ Description: 'Check the names of predicate methods.'
137
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
138
+ NamePrefixBlacklist:
139
+ - is_
140
+ Exclude:
141
+ - spec/**/*
142
+
143
+ # Style
144
+
145
+ Style/AccessModifierDeclarations:
146
+ Enabled: true
147
+ Exclude:
148
+ - lib/guided_interactor/delegator.rb
149
+
150
+ Style/Alias:
151
+ Description: 'Use alias_method instead of alias.'
152
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
153
+ Enabled: true
154
+ Exclude:
155
+ - lib/guided_interactor/delegator.rb
156
+
157
+ Style/ArrayJoin:
158
+ Description: 'Use Array#join instead of Array#*.'
159
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
160
+ Enabled: true
161
+
162
+ Style/AsciiComments:
163
+ Description: 'Use only ascii symbols in comments.'
164
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
165
+ Enabled: true
166
+ Exclude:
167
+ - spec/**/*
168
+
169
+ Style/Attr:
170
+ Description: 'Checks for uses of Module#attr.'
171
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
172
+ Enabled: true
173
+
174
+ Style/CaseEquality:
175
+ Description: 'Avoid explicit use of the case equality operator(===).'
176
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
177
+ Enabled: false
178
+
179
+ Style/CharacterLiteral:
180
+ Description: 'Checks for uses of character literals.'
181
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
182
+ Enabled: true
183
+
184
+ Style/ClassAndModuleChildren:
185
+ Description: 'Checks style of children classes and modules.'
186
+ Enabled: true
187
+ EnforcedStyle: nested
188
+
189
+ Style/ClassVars:
190
+ Description: 'Avoid the use of class variables.'
191
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
192
+ Enabled: true
193
+
194
+ Style/CollectionMethods:
195
+ Enabled: true
196
+ PreferredMethods:
197
+ detect: find
198
+ inject: reduce
199
+ collect: map
200
+ find_all: select
201
+
202
+ Style/ColonMethodCall:
203
+ Description: 'Do not use :: for method call.'
204
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
205
+ Enabled: true
206
+
207
+ Style/CommentAnnotation:
208
+ Description: >-
209
+ Checks formatting of special comments
210
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
211
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
212
+ Enabled: false
213
+
214
+ Style/Documentation:
215
+ Description: 'Document classes and non-namespace modules.'
216
+ Enabled: false
217
+
218
+ Style/DoubleNegation:
219
+ Description: 'Checks for uses of double negation (!!).'
220
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
221
+ Enabled: true
222
+
223
+ Style/EachWithObject:
224
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
225
+ Enabled: false
226
+
227
+ Style/EmptyLiteral:
228
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
229
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
230
+ Enabled: true
231
+
232
+ Style/EmptyMethod:
233
+ EnforcedStyle: expanded
234
+
235
+ # Checks whether the source file has a utf-8 encoding comment or not
236
+ # AutoCorrectEncodingComment must match the regex
237
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
238
+ Style/Encoding:
239
+ Enabled: false
240
+
241
+ Style/EvenOdd:
242
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
243
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
244
+ Enabled: true
245
+
246
+ Style/FrozenStringLiteralComment:
247
+ Description: >-
248
+ Add the frozen_string_literal comment to the top of files
249
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
250
+ Enabled: false
251
+
252
+ Style/FlipFlop:
253
+ Description: 'Checks for flip flops'
254
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
255
+ Enabled: true
256
+
257
+ Style/FormatString:
258
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
259
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
260
+ Enabled: true
261
+
262
+ Style/GlobalVars:
263
+ Description: 'Do not introduce global variables.'
264
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
265
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
266
+ Enabled: false
267
+
268
+ Style/GuardClause:
269
+ Description: 'Check for conditionals that can be replaced with guard clauses'
270
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
271
+ Enabled: true
272
+
273
+ Style/IfUnlessModifier:
274
+ Description: >-
275
+ Favor modifier if/unless usage when you have a
276
+ single-line body.
277
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
278
+ Enabled: true
279
+
280
+ Style/IfWithSemicolon:
281
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
282
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
283
+ Enabled: true
284
+
285
+ Style/InlineComment:
286
+ Description: 'Avoid inline comments.'
287
+ Enabled: true
288
+
289
+ Style/Lambda:
290
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
291
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
292
+ Enabled: true
293
+
294
+ Style/LambdaCall:
295
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
296
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
297
+ Enabled: true
298
+
299
+ Style/LineEndConcatenation:
300
+ Description: >-
301
+ Use \ instead of + or << to concatenate two string literals at
302
+ line end.
303
+ Enabled: true
304
+
305
+ Style/MixinUsage:
306
+ Description: 'Checks that `include` statements appaear inside classes.'
307
+ Enabled: true
308
+ Exclude:
309
+ - bin/*
310
+
311
+ Style/ModuleFunction:
312
+ Description: 'Checks for usage of `extend self` in modules.'
313
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
314
+ Enabled: false
315
+
316
+ Style/MultilineBlockChain:
317
+ Description: 'Avoid multi-line chains of blocks.'
318
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
319
+ Enabled: false
320
+
321
+ Style/MutableConstant:
322
+ Description: 'Avoids assignment of mutable literals to constants..'
323
+ StyleGuide: 'http://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Style/MutableConstant'
324
+ Enabled: true
325
+
326
+ Style/NegatedIf:
327
+ Description: >-
328
+ Favor unless over if for negative conditions
329
+ (or control flow or).
330
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
331
+ Enabled: true
332
+
333
+ Style/NegatedWhile:
334
+ Description: 'Favor until over while for negative conditions.'
335
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
336
+ Enabled: true
337
+
338
+ Style/Next:
339
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
340
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
341
+ Enabled: true
342
+
343
+ Style/NilComparison:
344
+ Description: 'Prefer x.nil? to x == nil.'
345
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
346
+ Enabled: true
347
+
348
+ Style/Not:
349
+ Description: 'Use ! instead of not.'
350
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
351
+ Enabled: true
352
+
353
+ Style/NumericLiterals:
354
+ Description: >-
355
+ Add underscores to large numeric literals to improve their
356
+ readability.
357
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
358
+ Enabled: false
359
+
360
+ Style/OneLineConditional:
361
+ Description: >-
362
+ Favor the ternary operator(?:) over
363
+ if/then/else/end constructs.
364
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
365
+ Enabled: true
366
+
367
+ Style/PercentLiteralDelimiters:
368
+ Description: 'Use `%`-literal delimiters consistently'
369
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
370
+ Enabled: true
371
+
372
+ Style/PerlBackrefs:
373
+ Description: 'Avoid Perl-style regex back references.'
374
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
375
+ Enabled: true
376
+
377
+ Style/PreferredHashMethods:
378
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
379
+ StyleGuide: '#hash-key'
380
+ Enabled: true
381
+
382
+ Style/Proc:
383
+ Description: 'Use proc instead of Proc.new.'
384
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
385
+ Enabled: true
386
+
387
+ Style/RaiseArgs:
388
+ Description: 'Checks the arguments passed to raise/fail.'
389
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
390
+ Enabled: true
391
+
392
+ Style/RegexpLiteral:
393
+ Description: 'Use / or %r around regular expressions.'
394
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
395
+ Enabled: true
396
+
397
+ Style/SelfAssignment:
398
+ Description: >-
399
+ Checks for places where self-assignment shorthand should have
400
+ been used.
401
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
402
+ Enabled: true
403
+
404
+ Style/SingleLineBlockParams:
405
+ Description: 'Enforces the names of some block params.'
406
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
407
+ Enabled: false
408
+
409
+ Style/SingleLineMethods:
410
+ Description: 'Avoid single-line methods.'
411
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
412
+ Enabled: true
413
+
414
+ Style/SignalException:
415
+ Description: 'Checks for proper usage of fail and raise.'
416
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
417
+ Enabled: true
418
+
419
+ Style/SpecialGlobalVars:
420
+ Description: 'Avoid Perl-style global variables.'
421
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
422
+ Enabled: true
423
+
424
+ Style/StringLiterals:
425
+ Description: 'Checks if uses of quotes match the configured preference.'
426
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
427
+ EnforcedStyle: single_quotes
428
+ Enabled: true
429
+ Exclude:
430
+ - guided_interactor.gemspec
431
+
432
+ Style/TrailingCommaInArguments:
433
+ Description: 'Checks for trailing comma in argument lists.'
434
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
435
+ EnforcedStyleForMultiline: no_comma
436
+ Enabled: true
437
+
438
+ Style/TrailingCommaInArrayLiteral:
439
+ Description: 'Checks for trailing comma in array literals.'
440
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
441
+ EnforcedStyleForMultiline: no_comma
442
+ Enabled: false
443
+
444
+ Style/TrailingCommaInHashLiteral:
445
+ Description: 'Checks for trailing comma in hash literals.'
446
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
447
+ EnforcedStyleForMultiline: no_comma
448
+ Enabled: false
449
+
450
+ Style/TrivialAccessors:
451
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
452
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
453
+ Enabled: true
454
+
455
+ Style/VariableInterpolation:
456
+ Description: >-
457
+ Don't interpolate global, instance and class variables
458
+ directly in strings.
459
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
460
+ Enabled: true
461
+
462
+ Style/WhenThen:
463
+ Description: 'Use when x then ... for one-line cases.'
464
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
465
+ Enabled: true
466
+
467
+ Style/WhileUntilModifier:
468
+ Description: >-
469
+ Favor modifier while/until usage when you have a
470
+ single-line body.
471
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
472
+ Enabled: true
473
+
474
+ Style/SymbolArray:
475
+ MinSize: 4
476
+
477
+ Style/WordArray:
478
+ Description: 'Use %w or %W for arrays of words.'
479
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
480
+ Enabled: true
481
+ MinSize: 4
482
+
483
+ # Metrics
484
+
485
+ Metrics/AbcSize:
486
+ Description: >-
487
+ A calculated magnitude based on number of assignments,
488
+ branches, and conditions.
489
+ Enabled: false
490
+
491
+ Metrics/BlockLength:
492
+ Enabled: true
493
+ Exclude:
494
+ - config/environments/*
495
+ - spec/**/*
496
+
497
+ Metrics/BlockNesting:
498
+ Description: 'Avoid excessive block nesting'
499
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
500
+ Enabled: true
501
+
502
+ Metrics/ClassLength:
503
+ Description: 'Avoid classes longer than 100 lines of code.'
504
+ Enabled: false
505
+
506
+ Metrics/CyclomaticComplexity:
507
+ Description: >-
508
+ A complexity metric that is strongly correlated to the number
509
+ of test cases needed to validate a method.
510
+ Enabled: false
511
+
512
+ Metrics/LineLength:
513
+ Description: 'Limit lines to 80 characters.'
514
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
515
+ Max: 80
516
+ Enabled: false
517
+
518
+ Metrics/MethodLength:
519
+ Description: 'Avoid methods longer than 10 lines of code.'
520
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
521
+ Enabled: false
522
+
523
+ Metrics/ModuleLength:
524
+ Description: 'Avoid modules longer than 100 lines of code.'
525
+ Enabled: false
526
+
527
+ Metrics/ParameterLists:
528
+ Description: 'Avoid parameter lists longer than three or four parameters.'
529
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
530
+ Enabled: true
531
+
532
+ # Lint
533
+
534
+ Lint/AmbiguousOperator:
535
+ Description: >-
536
+ Checks for ambiguous operators in the first argument of a
537
+ method invocation without parentheses.
538
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
539
+ Enabled: true
540
+
541
+ Lint/AmbiguousRegexpLiteral:
542
+ Description: >-
543
+ Checks for ambiguous regexp literals in the first argument of
544
+ a method invocation without parenthesis.
545
+ Enabled: false
546
+
547
+ Lint/AmbiguousBlockAssociation:
548
+ Exclude:
549
+ - 'spec/**/*'
550
+
551
+ Lint/AssignmentInCondition:
552
+ Description: "Don't use assignment in conditions."
553
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
554
+ Enabled: true
555
+
556
+ Lint/CircularArgumentReference:
557
+ Description: "Don't refer to the keyword argument in the default value."
558
+ Enabled: false
559
+
560
+ Lint/DeprecatedClassMethods:
561
+ Description: 'Check for deprecated class method calls.'
562
+ Enabled: true
563
+
564
+ Lint/DuplicatedKey:
565
+ Description: 'Check for duplicate keys in hash literals.'
566
+ Enabled: true
567
+
568
+ Lint/EachWithObjectArgument:
569
+ Description: 'Check for immutable argument given to each_with_object.'
570
+ Enabled: false
571
+
572
+ Lint/ElseLayout:
573
+ Description: 'Check for odd code arrangement in an else block.'
574
+ Enabled: true
575
+
576
+ Lint/FormatParameterMismatch:
577
+ Description: 'The number of parameters to format/sprint must match the fields.'
578
+ Enabled: true
579
+
580
+ Lint/HandleExceptions:
581
+ Description: "Don't suppress exception."
582
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
583
+ Enabled: false
584
+
585
+ Lint/LiteralAsCondition:
586
+ Description: 'Checks of literals used in conditions.'
587
+ Enabled: false
588
+
589
+ Lint/LiteralInInterpolation:
590
+ Description: 'Checks for literals used in interpolation.'
591
+ Enabled: false
592
+
593
+ Lint/Loop:
594
+ Description: >-
595
+ Use Kernel#loop with break rather than begin/end/until or
596
+ begin/end/while for post-loop tests.
597
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
598
+ Enabled: false
599
+
600
+ Lint/NestedMethodDefinition:
601
+ Description: 'Do not use nested method definitions.'
602
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
603
+ Enabled: true
604
+
605
+ Lint/NonLocalExitFromIterator:
606
+ Description: 'Do not use return in iterator to cause non-local exit.'
607
+ Enabled: true
608
+
609
+ Lint/ParenthesesAsGroupedExpression:
610
+ Description: >-
611
+ Checks for method calls with a space before the opening
612
+ parenthesis.
613
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
614
+ Enabled: true
615
+
616
+ Lint/RequireParentheses:
617
+ Description: >-
618
+ Use parentheses in the method call to avoid confusion
619
+ about precedence.
620
+ Enabled: true
621
+
622
+ Lint/UnderscorePrefixedVariableName:
623
+ Description: 'Do not use prefix `_` for a variable that is used.'
624
+ Enabled: false
625
+
626
+ Lint/UnreachableCode:
627
+ Enabled: false
628
+
629
+ Lint/Void:
630
+ Description: 'Possible use of operator/literal/variable in void context.'
631
+ Enabled: false
632
+
633
+ # Performance
634
+
635
+ Performance/CaseWhenSplat:
636
+ Description: >-
637
+ Place `when` conditions that use splat at the end
638
+ of the list of `when` branches.
639
+ Enabled: false
640
+
641
+ Performance/Count:
642
+ Description: >-
643
+ Use `count` instead of `select...size`, `reject...size`,
644
+ `select...count`, `reject...count`, `select...length`,
645
+ and `reject...length`.
646
+ Enabled: true
647
+
648
+ Performance/Detect:
649
+ Description: >-
650
+ Use `detect` instead of `select.first`, `find_all.first`,
651
+ `select.last`, and `find_all.last`.
652
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
653
+ Enabled: true
654
+
655
+ Performance/FlatMap:
656
+ Description: >-
657
+ Use `Enumerable#flat_map`
658
+ instead of `Enumerable#map...Array#flatten(1)`
659
+ or `Enumberable#collect..Array#flatten(1)`
660
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
661
+ Enabled: true
662
+
663
+ Performance/ReverseEach:
664
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
665
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
666
+ Enabled: true
667
+
668
+ Performance/Sample:
669
+ Description: >-
670
+ Use `sample` instead of `shuffle.first`,
671
+ `shuffle.last`, and `shuffle[Fixnum]`.
672
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
673
+ Enabled: true
674
+
675
+ Performance/Size:
676
+ Description: >-
677
+ Use `size` instead of `count` for counting
678
+ the number of elements in `Array` and `Hash`.
679
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
680
+ Enabled: true
681
+
682
+ Performance/StringReplacement:
683
+ Description: >-
684
+ Use `tr` instead of `gsub` when you are replacing the same
685
+ number of characters. Use `delete` instead of `gsub` when
686
+ you are deleting characters.
687
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
688
+ Enabled: true
689
+
690
+ # Rails
691
+
692
+ Rails/ActionFilter:
693
+ Description: 'Enforces consistent use of action filter methods.'
694
+ Enabled: true
695
+
696
+ Rails/Date:
697
+ Description: >-
698
+ Checks the correct usage of date aware methods,
699
+ such as Date.today, Date.current etc.
700
+ Enabled: true
701
+
702
+ Rails/Delegate:
703
+ Description: 'Prefer delegate method for delegations.'
704
+ Enabled: false
705
+
706
+ Rails/FindBy:
707
+ Description: 'Prefer find_by over where.first.'
708
+ Enabled: true
709
+
710
+ Rails/FindEach:
711
+ Description: 'Prefer all.find_each over all.find.'
712
+ Enabled: true
713
+
714
+ Rails/HasAndBelongsToMany:
715
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
716
+ Enabled: true
717
+
718
+ Rails/Output:
719
+ Description: 'Checks for calls to puts, print, etc.'
720
+ Enabled: true
721
+
722
+ Rails/ReadWriteAttribute:
723
+ Description: >-
724
+ Checks for read_attribute(:attr) and
725
+ write_attribute(:attr, val).
726
+ Enabled: false
727
+
728
+ Rails/ScopeArgs:
729
+ Description: 'Checks the arguments of ActiveRecord scopes.'
730
+ Enabled: true
731
+
732
+ Rails/TimeZone:
733
+ Description: 'Checks the correct usage of time zone aware methods.'
734
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
735
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
736
+ Enabled: true
737
+
738
+ Rails/Validation:
739
+ Description: 'Use validates :attribute, hash of validations.'
740
+ Enabled: false
741
+
742
+ # Bundler
743
+
744
+ Bundler/OrderedGems:
745
+ Enabled: true