action_controller_tweaks 0.3.3 → 0.3.6

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.
data/.rubocop.yml DELETED
@@ -1,856 +0,0 @@
1
- # This is the default configuration file. Enabling and disabling is configured
2
- # in separate files. This file adds all other parameters apart from Enabled.
3
-
4
- # Common configuration.
5
- AllCops:
6
- # Include gemspec and Rakefile
7
- Include:
8
- - "**/*.gemspec"
9
- - "**/*.podspec"
10
- - "**/*.jbuilder"
11
- - "**/*.rake"
12
- - "**/*.opal"
13
- - "**/Gemfile"
14
- - "**/Rakefile"
15
- - "**/Capfile"
16
- - "**/Guardfile"
17
- - "**/Podfile"
18
- - "**/Thorfile"
19
- - "**/Vagrantfile"
20
- - "**/Berksfile"
21
- - "**/Cheffile"
22
- - "**/Vagabondfile"
23
- Exclude:
24
- - "vendor/**/*"
25
- - "gemfiles/vendor/**/*"
26
- # By default, the rails cops are not run. Override in project or home
27
- # directory .rubocop.yml files, or by giving the -R/--rails option.
28
- RunRailsCops: false
29
- # Cop names are not displayed in offense messages by default. Change behavior
30
- # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
31
- # option.
32
- DisplayCopNames: true
33
- # Style guide URLs are not displayed in offense messages by default. Change
34
- # behavior by overriding DisplayStyleGuide, or by giving the
35
- # -S/--display-style-guide option.
36
- DisplayStyleGuide: false
37
- # Additional cops that do not reference a style guide rule may be enabled by
38
- # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
39
- # the --only-guide-cops option.
40
- StyleGuideCopsOnly: false
41
-
42
- # Indent private/protected/public as deep as method definitions
43
- Style/AccessModifierIndentation:
44
- EnforcedStyle: indent
45
- SupportedStyles:
46
- - outdent
47
- - indent
48
-
49
- # Align the elements of a hash literal if they span more than one line.
50
- Style/AlignHash:
51
- # Alignment of entries using hash rocket as separator. Valid values are:
52
- #
53
- # key - left alignment of keys
54
- # "a" => 2
55
- # "bb" => 3
56
- # separator - alignment of hash rockets, keys are right aligned
57
- # "a" => 2
58
- # "bb" => 3
59
- # table - left alignment of keys, hash rockets, and values
60
- # "a" => 2
61
- # "bb" => 3
62
- EnforcedHashRocketStyle: table
63
- # Alignment of entries using colon as separator. Valid values are:
64
- #
65
- # key - left alignment of keys
66
- # a: 0
67
- # bb: 1
68
- # separator - alignment of colons, keys are right aligned
69
- # a: 0
70
- # bb: 1
71
- # table - left alignment of keys and values
72
- # a: 0
73
- # bb: 1
74
- EnforcedColonStyle: table
75
- # Select whether hashes that are the last argument in a method call should be
76
- # inspected? Valid values are:
77
- #
78
- # always_inspect - Inspect both implicit and explicit hashes.
79
- # Registers an offense for:
80
- # function(a: 1,
81
- # b: 2)
82
- # Registers an offense for:
83
- # function({a: 1,
84
- # b: 2})
85
- # always_ignore - Ignore both implicit and explicit hashes.
86
- # Accepts:
87
- # function(a: 1,
88
- # b: 2)
89
- # Accepts:
90
- # function({a: 1,
91
- # b: 2})
92
- # ignore_implicit - Ignore only implicit hashes.
93
- # Accepts:
94
- # function(a: 1,
95
- # b: 2)
96
- # Registers an offense for:
97
- # function({a: 1,
98
- # b: 2})
99
- # ignore_explicit - Ignore only explicit hashes.
100
- # Accepts:
101
- # function({a: 1,
102
- # b: 2})
103
- # Registers an offense for:
104
- # function(a: 1,
105
- # b: 2)
106
- EnforcedLastArgumentHashStyle: always_inspect
107
- SupportedLastArgumentHashStyles:
108
- - always_inspect
109
- - always_ignore
110
- - ignore_implicit
111
- - ignore_explicit
112
-
113
- Style/AlignParameters:
114
- # Alignment of parameters in multi-line method calls.
115
- #
116
- # The `with_first_parameter` style aligns the following lines along the same
117
- # column as the first parameter.
118
- #
119
- # method_call(a,
120
- # b)
121
- #
122
- # The `with_fixed_indentation` style aligns the following lines with one
123
- # level of indentation relative to the start of the line with the method call.
124
- #
125
- # method_call(a,
126
- # b)
127
- EnforcedStyle: with_fixed_indentation
128
- SupportedStyles:
129
- - with_first_parameter
130
- - with_fixed_indentation
131
-
132
- Style/AndOr:
133
- # Whether `and` and `or` are banned only in conditionals (conditionals)
134
- # or completely (always).
135
- EnforcedStyle: always
136
- SupportedStyles:
137
- - always
138
- - conditionals
139
-
140
-
141
- # Checks if usage of %() or %Q() matches configuration.
142
- Style/BarePercentLiterals:
143
- EnforcedStyle: percent_q
144
- SupportedStyles:
145
- - percent_q
146
- - bare_percent
147
-
148
- Style/BlockDelimiters:
149
- EnforcedStyle: line_count_based
150
- SupportedStyles:
151
- # The `line_count_based` style enforces braces around single line blocks and
152
- # do..end around multi-line blocks.
153
- - line_count_based
154
- # The `semantic` style enforces braces around functional blocks, where the
155
- # primary purpose of the block is to return a value and do..end for
156
- # procedural blocks, where the primary purpose of the block is its
157
- # side-effects.
158
- #
159
- # This looks at the usage of a block"s method to determine its type (e.g. is
160
- # the result of a `map` assigned to a variable or passed to another
161
- # method) but exceptions are permitted in the `ProceduralMethods`,
162
- # `FunctionalMethods` and `IgnoredMethods` sections below.
163
- - semantic
164
- ProceduralMethods:
165
- # Methods that are known to be procedural in nature but look functional from
166
- # their usage, e.g.
167
- #
168
- # time = Benchmark.realtime do
169
- # foo.bar
170
- # end
171
- #
172
- # Here, the return value of the block is discarded but the return value of
173
- # `Benchmark.realtime` is used.
174
- - benchmark
175
- - bm
176
- - bmbm
177
- - create
178
- - each_with_object
179
- - measure
180
- - new
181
- - realtime
182
- - tap
183
- - with_object
184
- FunctionalMethods:
185
- # Methods that are known to be functional in nature but look procedural from
186
- # their usage, e.g.
187
- #
188
- # let(:foo) { Foo.new }
189
- #
190
- # Here, the return value of `Foo.new` is used to define a `foo` helper but
191
- # doesn"t appear to be used from the return value of `let`.
192
- - let
193
- - let!
194
- - subject
195
- - watch
196
- IgnoredMethods:
197
- # Methods that can be either procedural or functional and cannot be
198
- # categorised from their usage alone, e.g.
199
- #
200
- # foo = lambda do |x|
201
- # puts "Hello, #{x}"
202
- # end
203
- #
204
- # foo = lambda do |x|
205
- # x * 100
206
- # end
207
- #
208
- # Here, it is impossible to tell from the return value of `lambda` whether
209
- # the inner block"s return value is significant.
210
- - lambda
211
- - proc
212
- - it
213
-
214
- Style/BracesAroundHashParameters:
215
- EnforcedStyle: context_dependent
216
- SupportedStyles:
217
- # The `braces` style enforces braces around all method parameters that are
218
- # hashes.
219
- - braces
220
- # The `no_braces` style checks that the last parameter doesn"t have braces
221
- # around it.
222
- - no_braces
223
- # The `context_dependent` style checks that the last parameter doesn"t have
224
- # braces around it, but requires braces if the second to last parameter is
225
- # also a hash literal.
226
- - context_dependent
227
-
228
- # Indentation of `when`.
229
- Style/CaseIndentation:
230
- IndentWhenRelativeTo: case
231
- SupportedStyles:
232
- - case
233
- - end
234
- IndentOneStep: false
235
-
236
- Style/ClassAndModuleChildren:
237
- # Checks the style of children definitions at classes and modules.
238
- #
239
- # Basically there are two different styles:
240
- #
241
- # `nested` - have each child on a separate line
242
- # class Foo
243
- # class Bar
244
- # end
245
- # end
246
- #
247
- # `compact` - combine definitions as much as possible
248
- # class Foo::Bar
249
- # end
250
- #
251
- # The compact style is only forced, for classes / modules with one child.
252
- EnforcedStyle: nested
253
- SupportedStyles:
254
- - nested
255
- - compact
256
-
257
- Style/ClassCheck:
258
- EnforcedStyle: is_a?
259
- SupportedStyles:
260
- - is_a?
261
- - kind_of?
262
-
263
- # Align with the style guide.
264
- Style/CollectionMethods:
265
- # Mapping from undesired method to desired_method
266
- # e.g. to use `detect` over `find`:
267
- #
268
- # CollectionMethods:
269
- # PreferredMethods:
270
- # find: detect
271
- PreferredMethods:
272
- collect: "map"
273
- collect!: "map!"
274
- inject: "reduce"
275
- detect: "find"
276
- find_all: "select"
277
-
278
- # Use ` or %x around command literals.
279
- Style/CommandLiteral:
280
- EnforcedStyle: mixed
281
- # backticks: Always use backticks.
282
- # percent_x: Always use %x.
283
- # mixed: Use backticks on single-line commands, and %x on multi-line commands.
284
- SupportedStyles:
285
- - backticks
286
- - percent_x
287
- - mixed
288
- # If false, the cop will always recommend using %x if one or more backticks
289
- # are found in the command string.
290
- AllowInnerBackticks: false
291
-
292
- # Checks formatting of special comments
293
- Style/CommentAnnotation:
294
- Keywords:
295
- - TODO
296
- - FIXME
297
- - OPTIMIZE
298
- - HACK
299
- - REVIEW
300
-
301
- # Checks that you have put a copyright in a comment before any code.
302
- #
303
- # You can override the default Notice in your .rubocop.yml file.
304
- #
305
- # In order to use autocorrect, you must supply a value for the
306
- # AutocorrectNotice key that matches the regexp Notice. A blank
307
- # AutocorrectNotice will cause an error during autocorrect.
308
- #
309
- # Autocorrect will add a copyright notice in a comment at the top
310
- # of the file immediately after any shebang or encoding comments.
311
- #
312
- # Example rubocop.yml:
313
- #
314
- # Style/Copyright:
315
- # Enabled: true
316
- # Notice: "Copyright (\(c\) )?2015 Yahoo! Inc"
317
- # AutocorrectNotice: "# Copyright (c) 2015 Yahoo! Inc."
318
- #
319
- Style/Copyright:
320
- Enabled: false
321
- Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
322
- AutocorrectNotice: ""
323
-
324
- Style/Documentation:
325
- Enabled: false
326
-
327
- # Multi-line method chaining should be done with leading dots.
328
- Style/DotPosition:
329
- EnforcedStyle: trailing
330
- SupportedStyles:
331
- - leading
332
- - trailing
333
-
334
- # Warn on empty else statements
335
- # empty - warn only on empty else
336
- # nil - warn on else with nil in it
337
- # both - warn on empty else and else with nil in it
338
- Style/EmptyElse:
339
- EnforcedStyle: both
340
- SupportedStyles:
341
- - empty
342
- - nil
343
- - both
344
-
345
- # Use empty lines between defs.
346
- Style/EmptyLineBetweenDefs:
347
- # If true, this parameter means that single line method definitions don"t
348
- # need an empty line between them.
349
- AllowAdjacentOneLineDefs: false
350
-
351
- Style/EmptyLinesAroundBlockBody:
352
- EnforcedStyle: no_empty_lines
353
- SupportedStyles:
354
- - empty_lines
355
- - no_empty_lines
356
-
357
- Style/EmptyLinesAroundClassBody:
358
- EnforcedStyle: no_empty_lines
359
- SupportedStyles:
360
- - empty_lines
361
- - no_empty_lines
362
-
363
- Style/EmptyLinesAroundModuleBody:
364
- EnforcedStyle: no_empty_lines
365
- SupportedStyles:
366
- - empty_lines
367
- - no_empty_lines
368
-
369
- # Checks whether the source file has a utf-8 encoding comment or not
370
- # AutoCorrectEncodingComment must match the regex
371
- # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
372
- Style/Encoding:
373
- EnforcedStyle: always
374
- SupportedStyles:
375
- - when_needed
376
- - always
377
- AutoCorrectEncodingComment: "# encoding: utf-8"
378
-
379
- Style/FileName:
380
- # File names listed in AllCops:Include are excluded by default. Add extra
381
- # excludes here.
382
- Exclude: []
383
-
384
- Style/FirstParameterIndentation:
385
- EnforcedStyle: special_for_inner_method_call_in_parentheses
386
- SupportedStyles:
387
- # The first parameter should always be indented one step more than the
388
- # preceding line.
389
- - consistent
390
- # The first parameter should normally be indented one step more than the
391
- # preceding line, but if it"s a parameter for a method call that is itself
392
- # a parameter in a method call, then the inner parameter should be indented
393
- # relative to the inner method.
394
- - special_for_inner_method_call
395
- # Same as special_for_inner_method_call except that the special rule only
396
- # applies if the outer method call encloses its arguments in parentheses.
397
- - special_for_inner_method_call_in_parentheses
398
-
399
- # Checks use of for or each in multiline loops.
400
- Style/For:
401
- EnforcedStyle: each
402
- SupportedStyles:
403
- - for
404
- - each
405
-
406
- # Enforce the method used for string formatting.
407
- Style/FormatString:
408
- EnforcedStyle: format
409
- SupportedStyles:
410
- - format
411
- - sprintf
412
- - percent
413
-
414
- # Built-in global variables are allowed by default.
415
- Style/GlobalVars:
416
- AllowedVariables: []
417
-
418
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
419
- # needs to have to trigger this cop
420
- Style/GuardClause:
421
- MinBodyLength: 1
422
-
423
- Style/HashSyntax:
424
- EnforcedStyle: ruby19_no_mixed_keys
425
- SupportedStyles:
426
- - ruby19
427
- - ruby19_no_mixed_keys
428
- - hash_rockets
429
- # Force hashes that have a symbol value to use hash rockets
430
- UseHashRocketsWithSymbolValues: false
431
-
432
- Style/IfUnlessModifier:
433
- MaxLineLength: 80
434
-
435
- Style/IndentationConsistency:
436
- # The difference between `rails` and `normal` is that the `rails` style
437
- # prescribes that in classes and modules the `protected` and `private`
438
- # modifier keywords shall be indented the same as public methods and that
439
- # protected and private members shall be indented one step more than the
440
- # modifiers. Other than that, both styles mean that entities on the same
441
- # logical depth shall have the same indentation.
442
- EnforcedStyle: normal
443
- SupportedStyles:
444
- - normal
445
- - rails
446
-
447
- Style/IndentationWidth:
448
- # Number of spaces for each indentation level.
449
- Width: 2
450
-
451
- # Checks the indentation of the first key in a hash literal.
452
- Style/IndentHash:
453
- # The value `special_inside_parentheses` means that hash literals with braces
454
- # that have their opening brace on the same line as a surrounding opening
455
- # round parenthesis, shall have their first key indented relative to the
456
- # first position inside the parenthesis.
457
- # The value `consistent` means that the indentation of the first key shall
458
- # always be relative to the first position of the line where the opening
459
- # brace is.
460
- EnforcedStyle: special_inside_parentheses
461
- SupportedStyles:
462
- - special_inside_parentheses
463
- - consistent
464
-
465
- Style/LambdaCall:
466
- EnforcedStyle: call
467
- SupportedStyles:
468
- - call
469
- - braces
470
-
471
- Style/Next:
472
- # With `always` all conditions at the end of an iteration needs to be
473
- # replaced by next - with `skip_modifier_ifs` the modifier if like this one
474
- # are ignored: [1, 2].each { |a| return "yes" if a == 1 }
475
- EnforcedStyle: skip_modifier_ifs
476
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
477
- # needs to have to trigger this cop
478
- MinBodyLength: 3
479
- SupportedStyles:
480
- - skip_modifier_ifs
481
- - always
482
-
483
- Style/NonNilCheck:
484
- # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
485
- # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
486
- # **usually** OK, but might change behavior.
487
- #
488
- # With `IncludeSemanticChanges` set to `false`, this cop does not report
489
- # offenses for `!x.nil?` and does no changes that might change behavior.
490
- IncludeSemanticChanges: false
491
-
492
- Style/MethodDefParentheses:
493
- EnforcedStyle: require_parentheses
494
- SupportedStyles:
495
- - require_parentheses
496
- - require_no_parentheses
497
-
498
- Style/MethodName:
499
- EnforcedStyle: snake_case
500
- SupportedStyles:
501
- - snake_case
502
- - camelCase
503
-
504
- Style/MultilineOperationIndentation:
505
- EnforcedStyle: aligned
506
- SupportedStyles:
507
- - aligned
508
- - indented
509
-
510
- Style/NumericLiterals:
511
- MinDigits: 5
512
-
513
- # Allow safe assignment in conditions.
514
- Style/ParenthesesAroundCondition:
515
- AllowSafeAssignment: true
516
-
517
- Style/PercentLiteralDelimiters:
518
- PreferredDelimiters:
519
- "%": ()
520
- "%i": ()
521
- "%q": ()
522
- "%Q": ()
523
- "%r": "{}"
524
- "%s": ()
525
- "%w": ()
526
- "%W": ()
527
- "%x": ()
528
-
529
- Style/PercentQLiterals:
530
- EnforcedStyle: upper_case_q
531
- SupportedStyles:
532
- - lower_case_q # Use %q when possible, %Q when necessary
533
- - upper_case_q # Always use %Q
534
-
535
- Style/PredicateName:
536
- # Predicate name prefices.
537
- NamePrefix:
538
- - is_
539
- - has_
540
- - have_
541
- # Predicate name prefices that should be removed.
542
- NamePrefixBlacklist:
543
- - is_
544
- - has_
545
- - have_
546
-
547
- Style/RaiseArgs:
548
- EnforcedStyle: exploded
549
- SupportedStyles:
550
- - compact # raise Exception.new(msg)
551
- - exploded # raise Exception, msg
552
-
553
- Style/RedundantReturn:
554
- # When true allows code like `return x, y`.
555
- AllowMultipleReturnValues: false
556
-
557
- # Use / or %r around regular expressions.
558
- Style/RegexpLiteral:
559
- EnforcedStyle: mixed
560
- # slashes: Always use slashes.
561
- # percent_r: Always use %r.
562
- # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
563
- SupportedStyles:
564
- - slashes
565
- - percent_r
566
- - mixed
567
- # If false, the cop will always recommend using %r if one or more slashes
568
- # are found in the regexp string.
569
- AllowInnerSlashes: false
570
-
571
- Style/Semicolon:
572
- # Allow ; to separate several expressions on the same line.
573
- AllowAsExpressionSeparator: false
574
-
575
- Style/SignalException:
576
- EnforcedStyle: only_fail
577
- SupportedStyles:
578
- - only_raise
579
- - only_fail
580
- - semantic
581
-
582
- Style/SingleLineBlockParams:
583
- Methods:
584
- - reduce:
585
- - a
586
- - e
587
- - inject:
588
- - a
589
- - e
590
-
591
- Style/SingleLineMethods:
592
- AllowIfMethodIsEmpty: true
593
-
594
- Style/StringLiterals:
595
- EnforcedStyle: double_quotes
596
- SupportedStyles:
597
- - single_quotes
598
- - double_quotes
599
-
600
- Style/StringLiteralsInInterpolation:
601
- EnforcedStyle: double_quotes
602
- SupportedStyles:
603
- - single_quotes
604
- - double_quotes
605
-
606
- Style/SpaceAroundBlockParameters:
607
- EnforcedStyleInsidePipes: no_space
608
- SupportedStyles:
609
- - space
610
- - no_space
611
-
612
- Style/SpaceAroundEqualsInParameterDefault:
613
- EnforcedStyle: space
614
- SupportedStyles:
615
- - space
616
- - no_space
617
-
618
- Style/SpaceAroundOperators:
619
- MultiSpaceAllowedForOperators:
620
- - "="
621
- - "=>"
622
-
623
- Style/SpaceBeforeBlockBraces:
624
- EnforcedStyle: space
625
- SupportedStyles:
626
- - space
627
- - no_space
628
-
629
- Style/SpaceInsideBlockBraces:
630
- EnforcedStyle: space
631
- SupportedStyles:
632
- - space
633
- - no_space
634
- # Valid values are: space, no_space
635
- EnforcedStyleForEmptyBraces: no_space
636
- # Space between { and |. Overrides EnforcedStyle if there is a conflict.
637
- SpaceBeforeBlockParameters: true
638
-
639
- Style/SpaceInsideHashLiteralBraces:
640
- EnforcedStyle: no_space
641
- EnforcedStyleForEmptyBraces: no_space
642
- SupportedStyles:
643
- - space
644
- - no_space
645
-
646
- Style/SymbolProc:
647
- # A list of method names to be ignored by the check.
648
- # The names should be fairly unique, otherwise you"ll end up ignoring lots of code.
649
- IgnoredMethods:
650
- - respond_to
651
-
652
- Style/TrailingBlankLines:
653
- EnforcedStyle: final_newline
654
- SupportedStyles:
655
- - final_newline
656
- - final_blank_line
657
-
658
- Style/TrailingComma:
659
- # If EnforcedStyleForMultiline is comma, the cop requires a comma after the
660
- # last item of a list, but only for lists where each item is on its own line.
661
- # If EnforcedStyleForMultiline is consistent_comma, the cop requires a comma
662
- # after the last item of a list, for all lists.
663
- EnforcedStyleForMultiline: comma
664
- SupportedStyles:
665
- - comma
666
- - consistent_comma
667
- - no_comma
668
-
669
- # TrivialAccessors requires exact name matches and doesn"t allow
670
- # predicated methods by default.
671
- Style/TrivialAccessors:
672
- # When set to false the cop will suggest the use of accessor methods
673
- # in situations like:
674
- #
675
- # def name
676
- # @other_name
677
- # end
678
- #
679
- # This way you can uncover "hidden" attributes in your code.
680
- ExactNameMatch: false
681
- AllowPredicates: false
682
- # Allows trivial writers that don"t end in an equal sign. e.g.
683
- #
684
- # def on_exception(action)
685
- # @on_exception=action
686
- # end
687
- # on_exception :restart
688
- #
689
- # Commonly used in DSLs
690
- AllowDSLWriters: false
691
- IgnoreClassMethods: false
692
- Whitelist:
693
- - to_ary
694
- - to_a
695
- - to_c
696
- - to_enum
697
- - to_h
698
- - to_hash
699
- - to_i
700
- - to_int
701
- - to_io
702
- - to_open
703
- - to_path
704
- - to_proc
705
- - to_r
706
- - to_regexp
707
- - to_str
708
- - to_s
709
- - to_sym
710
-
711
- Style/UnneededPercentQ:
712
- Enabled: false
713
-
714
- Style/VariableName:
715
- EnforcedStyle: snake_case
716
- SupportedStyles:
717
- - snake_case
718
- - camelCase
719
-
720
- Style/WhileUntilModifier:
721
- MaxLineLength: 80
722
-
723
- Style/WordArray:
724
- MinSize: 0
725
- # The regular expression WordRegex decides what is considered a word.
726
- WordRegex: !ruby/regexp '/\A[\p{Word}]+\z/'
727
-
728
- ##################### Metrics ##################################
729
-
730
- Metrics/AbcSize:
731
- # The ABC size is a calculated magnitude, so this number can be a Fixnum or
732
- # a Float.
733
- Max: 15
734
-
735
- Metrics/BlockNesting:
736
- Max: 3
737
-
738
- Metrics/ClassLength:
739
- CountComments: false # count full line comments?
740
- Max: 100
741
-
742
- # Avoid complex methods.
743
- Metrics/CyclomaticComplexity:
744
- Max: 6
745
-
746
- Metrics/LineLength:
747
- Max: 100
748
- # To make it possible to copy or click on URIs in the code, we allow lines
749
- # contaning a URI to be longer than Max.
750
- AllowURI: true
751
- URISchemes:
752
- - http
753
- - https
754
-
755
- Metrics/MethodLength:
756
- CountComments: false # count full line comments?
757
- Max: 10
758
-
759
- Metrics/ParameterLists:
760
- Max: 5
761
- CountKeywordArgs: true
762
-
763
- Metrics/PerceivedComplexity:
764
- Max: 7
765
-
766
- ##################### Lint ##################################
767
-
768
- # Allow safe assignment in conditions.
769
- Lint/AssignmentInCondition:
770
- AllowSafeAssignment: true
771
-
772
- # Align ends correctly.
773
- Lint/EndAlignment:
774
- # The value `keyword` means that `end` should be aligned with the matching
775
- # keyword (if, while, etc.).
776
- # The value `variable` means that in assignments, `end` should be aligned
777
- # with the start of the variable on the left hand side of `=`. In all other
778
- # situations, `end` should still be aligned with the keyword.
779
- AlignWith: variable
780
- SupportedStyles:
781
- - keyword
782
- - variable
783
-
784
- Lint/DefEndAlignment:
785
- # The value `def` means that `end` should be aligned with the def keyword.
786
- # The value `start_of_line` means that `end` should be aligned with method
787
- # calls like `private`, `public`, etc, if present in front of the `def`
788
- # keyword on the same line.
789
- AlignWith: start_of_line
790
- SupportedStyles:
791
- - start_of_line
792
- - def
793
-
794
- ##################### Rails ##################################
795
-
796
- Rails/ActionFilter:
797
- EnforcedStyle: action
798
- SupportedStyles:
799
- - action
800
- - filter
801
- Include:
802
- - app/controllers/**/*.rb
803
-
804
- Rails/Date:
805
- # The value `always` disallows usage of `Date.today`, `Date.current`,
806
- # `Date#to_time` etc.
807
- # The value `acceptable` allows usage of `Date.current`, `Date.yesterday`, etc
808
- # (but not `Date.today`) which are overriden by ActiveSupport to handle current
809
- # time zone.
810
- EnforcedStyle: always
811
- SupportedStyles:
812
- - always
813
- - acceptable
814
-
815
- Rails/DefaultScope:
816
- Include:
817
- - app/models/**/*.rb
818
-
819
- Rails/FindBy:
820
- Include:
821
- - app/models/**/*.rb
822
-
823
- Rails/FindEach:
824
- Include:
825
- - app/models/**/*.rb
826
-
827
- Rails/HasAndBelongsToMany:
828
- Include:
829
- - app/models/**/*.rb
830
-
831
- Rails/Output:
832
- Include:
833
- - app/**/*.rb
834
- - config/**/*.rb
835
- - db/**/*.rb
836
- - lib/**/*.rb
837
-
838
- Rails/ReadWriteAttribute:
839
- Include:
840
- - app/models/**/*.rb
841
-
842
- Rails/ScopeArgs:
843
- Include:
844
- - app/models/**/*.rb
845
-
846
- Rails/TimeZone:
847
- # The value `always` means that `Time` should be used with `zone`.
848
- # The value `acceptable` allows usage of `in_time_zone` instead of `zone`.
849
- EnforcedStyle: always
850
- SupportedStyles:
851
- - always
852
- - acceptable
853
-
854
- Rails/Validation:
855
- Include:
856
- - app/models/**/*.rb