omniauth-idcat_mobil 0.2.4 → 0.3.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.
data/.rubocop.yml ADDED
@@ -0,0 +1,1248 @@
1
+ require: rubocop-rspec
2
+
3
+ # Common configuration.
4
+ AllCops:
5
+ NewCops: enable
6
+ Include:
7
+ - .simplecov
8
+ - "**/*.rb"
9
+ - "**/*.rake"
10
+ - "**/*.gemspec"
11
+ - "**/*.ru"
12
+ - "**/Gemfile"
13
+ - "**/Rakefile"
14
+ Exclude:
15
+ - bin/*
16
+ - "**/vendor/**/*"
17
+ # Default formatter will be used if no -f/--format option is given.
18
+ DefaultFormatter: progress
19
+ # Cop names are not displayed in offense messages by default. Change behavior
20
+ # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
21
+ # option.
22
+ DisplayCopNames: true
23
+ # Style guide URLs are not displayed in offense messages by default. Change
24
+ # behavior by overriding DisplayStyleGuide, or by giving the
25
+ # -S/--display-style-guide option.
26
+ DisplayStyleGuide: false
27
+ # Extra details are not displayed in offense messages by default. Change
28
+ # behavior by overriding ExtraDetails, or by giving the
29
+ # -E/--extra-details option.
30
+ ExtraDetails: false
31
+ # Additional cops that do not reference a style guide rule may be enabled by
32
+ # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
33
+ # the --only-guide-cops option.
34
+ StyleGuideCopsOnly: false
35
+ # All cops except the ones in disabled.yml are enabled by default. Change
36
+ # this behavior by overriding DisabledByDefault. When DisabledByDefault is
37
+ # true, all cops in the default configuration are disabled, and and only cops
38
+ # in user configuration are enabled. This makes cops opt-in instead of
39
+ # opt-out. Note that when DisabledByDefault is true, cops in user
40
+ # configuration will be enabled even if they don't set the Enabled parameter.
41
+ DisabledByDefault: false
42
+ # Enables the result cache if true. Can be overridden by the --cache command
43
+ # line option.
44
+ UseCache: true
45
+ # Threshold for how many files can be stored in the result cache before some
46
+ # of the files are automatically removed.
47
+ MaxFilesInCache: 20000
48
+ # The cache will be stored in "rubocop_cache" under this directory. The name
49
+ # "/tmp" is special and will be converted to the system temporary directory,
50
+ # which is "/tmp" on Unix-like systems, but could be something else on other
51
+ # systems.
52
+ CacheRootDirectory: /tmp
53
+ # The default cache root directory is /tmp, which on most systems is
54
+ # writable by any system user. This means that it is possible for a
55
+ # malicious user to anticipate the location of Rubocop's cache directory,
56
+ # and create a symlink in its place that could cause Rubocop to overwrite
57
+ # unintended files, or read malicious input. If you are certain that your
58
+ # cache location is secure from this kind of attack, and wish to use a
59
+ # symlinked cache location, set this value to "true".
60
+ AllowSymlinksInCacheRootDirectory: true
61
+ # What MRI version of the Ruby interpreter is the inspected code intended to
62
+ # run on? (If there is more than one, set this to the lowest version.)
63
+ # If a value is specified for TargetRubyVersion then it is used.
64
+ # Else if .ruby-version exists and it contains an MRI version it is used.
65
+ # Otherwise we fallback to the oldest officially supported Ruby version (2.0).
66
+ TargetRubyVersion: 2.6
67
+
68
+ Gemspec/RequiredRubyVersion:
69
+ Enabled: false
70
+
71
+ # Indent private/protected/public as deep as method definitions
72
+ Layout/AccessModifierIndentation:
73
+ EnforcedStyle: indent
74
+ SupportedStyles:
75
+ - outdent
76
+ - indent
77
+ # By default, the indentation width from Style/IndentationWidth is used
78
+ # But it can be overridden by setting this parameter
79
+ IndentationWidth: ~
80
+
81
+ Style/Alias:
82
+ EnforcedStyle: prefer_alias
83
+ SupportedStyles:
84
+ - prefer_alias
85
+ - prefer_alias_method
86
+
87
+ # Align the elements of a hash literal if they span more than one line.
88
+ Layout/HashAlignment:
89
+ # Alignment of entries using hash rocket as separator. Valid values are:
90
+ #
91
+ # key - left alignment of keys
92
+ # "a" => 2
93
+ # "bb" => 3
94
+ # separator - alignment of hash rockets, keys are right aligned
95
+ # "a" => 2
96
+ # "bb" => 3
97
+ # table - left alignment of keys, hash rockets, and values
98
+ # "a" => 2
99
+ # "bb" => 3
100
+ EnforcedHashRocketStyle: key
101
+ # Alignment of entries using colon as separator. Valid values are:
102
+ #
103
+ # key - left alignment of keys
104
+ # a: 0
105
+ # bb: 1
106
+ # separator - alignment of colons, keys are right aligned
107
+ # a: 0
108
+ # bb: 1
109
+ # table - left alignment of keys and values
110
+ # a: 0
111
+ # bb: 1
112
+ EnforcedColonStyle: key
113
+ # Select whether hashes that are the last argument in a method call should be
114
+ # inspected? Valid values are:
115
+ #
116
+ # always_inspect - Inspect both implicit and explicit hashes.
117
+ # Registers an offense for:
118
+ # function(a: 1,
119
+ # b: 2)
120
+ # Registers an offense for:
121
+ # function({a: 1,
122
+ # b: 2})
123
+ # always_ignore - Ignore both implicit and explicit hashes.
124
+ # Accepts:
125
+ # function(a: 1,
126
+ # b: 2)
127
+ # Accepts:
128
+ # function({a: 1,
129
+ # b: 2})
130
+ # ignore_implicit - Ignore only implicit hashes.
131
+ # Accepts:
132
+ # function(a: 1,
133
+ # b: 2)
134
+ # Registers an offense for:
135
+ # function({a: 1,
136
+ # b: 2})
137
+ # ignore_explicit - Ignore only explicit hashes.
138
+ # Accepts:
139
+ # function({a: 1,
140
+ # b: 2})
141
+ # Registers an offense for:
142
+ # function(a: 1,
143
+ # b: 2)
144
+ EnforcedLastArgumentHashStyle: always_inspect
145
+ SupportedLastArgumentHashStyles:
146
+ - always_inspect
147
+ - always_ignore
148
+ - ignore_implicit
149
+ - ignore_explicit
150
+
151
+ Layout/ParameterAlignment:
152
+ # Alignment of parameters in multi-line method calls.
153
+ #
154
+ # The `with_first_parameter` style aligns the following lines along the same
155
+ # column as the first parameter.
156
+ #
157
+ # method_call(a,
158
+ # b)
159
+ #
160
+ # The `with_fixed_indentation` style aligns the following lines with one
161
+ # level of indentation relative to the start of the line with the method call.
162
+ #
163
+ # method_call(a,
164
+ # b)
165
+ EnforcedStyle: with_first_parameter
166
+ SupportedStyles:
167
+ - with_first_parameter
168
+ - with_fixed_indentation
169
+ # By default, the indentation width from Style/IndentationWidth is used
170
+ # But it can be overridden by setting this parameter
171
+ IndentationWidth: ~
172
+
173
+ Style/AndOr:
174
+ # Whether `and` and `or` are banned only in conditionals (conditionals)
175
+ # or completely (always).
176
+ EnforcedStyle: always
177
+ SupportedStyles:
178
+ - always
179
+ - conditionals
180
+
181
+ Style/AsciiComments:
182
+ Enabled: false
183
+
184
+ # Checks if usage of %() or %Q() matches configuration.
185
+ Style/BarePercentLiterals:
186
+ EnforcedStyle: bare_percent
187
+ SupportedStyles:
188
+ - percent_q
189
+ - bare_percent
190
+
191
+ Style/BlockDelimiters:
192
+ EnforcedStyle: line_count_based
193
+ SupportedStyles:
194
+ # The `line_count_based` style enforces braces around single line blocks and
195
+ # do..end around multi-line blocks.
196
+ - line_count_based
197
+ # The `semantic` style enforces braces around functional blocks, where the
198
+ # primary purpose of the block is to return a value and do..end for
199
+ # procedural blocks, where the primary purpose of the block is its
200
+ # side-effects.
201
+ #
202
+ # This looks at the usage of a block's method to determine its type (e.g. is
203
+ # the result of a `map` assigned to a variable or passed to another
204
+ # method) but exceptions are permitted in the `ProceduralMethods`,
205
+ # `FunctionalMethods` and `IgnoredMethods` sections below.
206
+ - semantic
207
+ # The `braces_for_chaining` style enforces braces around single line blocks
208
+ # and do..end around multi-line blocks, except for multi-line blocks whose
209
+ # return value is being chained with another method (in which case braces
210
+ # are enforced).
211
+ - braces_for_chaining
212
+ ProceduralMethods:
213
+ # Methods that are known to be procedural in nature but look functional from
214
+ # their usage, e.g.
215
+ #
216
+ # time = Benchmark.realtime do
217
+ # foo.bar
218
+ # end
219
+ #
220
+ # Here, the return value of the block is discarded but the return value of
221
+ # `Benchmark.realtime` is used.
222
+ - benchmark
223
+ - bm
224
+ - bmbm
225
+ - create
226
+ - each_with_object
227
+ - measure
228
+ - new
229
+ - realtime
230
+ - tap
231
+ - with_object
232
+ FunctionalMethods:
233
+ # Methods that are known to be functional in nature but look procedural from
234
+ # their usage, e.g.
235
+ #
236
+ # let(:foo) { Foo.new }
237
+ #
238
+ # Here, the return value of `Foo.new` is used to define a `foo` helper but
239
+ # doesn't appear to be used from the return value of `let`.
240
+ - let
241
+ - let!
242
+ - subject
243
+ - watch
244
+ IgnoredMethods:
245
+ # Methods that can be either procedural or functional and cannot be
246
+ # categorised from their usage alone, e.g.
247
+ #
248
+ # foo = lambda do |x|
249
+ # puts "Hello, #{x}"
250
+ # end
251
+ #
252
+ # foo = lambda do |x|
253
+ # x * 100
254
+ # end
255
+ #
256
+ # Here, it is impossible to tell from the return value of `lambda` whether
257
+ # the inner block's return value is significant.
258
+ - lambda
259
+ - proc
260
+ - it
261
+
262
+ # Indentation of `when`.
263
+ Layout/CaseIndentation:
264
+ EnforcedStyle: case
265
+ SupportedStyles:
266
+ - case
267
+ - end
268
+ IndentOneStep: false
269
+ # By default, the indentation width from Style/IndentationWidth is used
270
+ # But it can be overridden by setting this parameter
271
+ # This only matters if IndentOneStep is true
272
+ IndentationWidth: ~
273
+
274
+ Style/ClassAndModuleChildren:
275
+ Enabled: false
276
+ # Checks the style of children definitions at classes and modules.
277
+ #
278
+ # Basically there are two different styles:
279
+ #
280
+ # `nested` - have each child on a separate line
281
+ # class Foo
282
+ # class Bar
283
+ # end
284
+ # end
285
+ #
286
+ # `compact` - combine definitions as much as possible
287
+ # class Foo::Bar
288
+ # end
289
+ #
290
+ # The compact style is only forced, for classes / modules with one child.
291
+ EnforcedStyle: nested
292
+ SupportedStyles:
293
+ - nested
294
+ - compact
295
+
296
+ Style/ClassCheck:
297
+ EnforcedStyle: is_a?
298
+ SupportedStyles:
299
+ - is_a?
300
+ - kind_of?
301
+
302
+ # Align with the style guide.
303
+ Style/CollectionMethods:
304
+ # Mapping from undesired method to desired_method
305
+ # e.g. to use `detect` over `find`:
306
+ #
307
+ # CollectionMethods:
308
+ # PreferredMethods:
309
+ # find: detect
310
+ PreferredMethods:
311
+ collect: "map"
312
+ collect!: "map!"
313
+ inject: "reduce"
314
+ detect: "find"
315
+ find_all: "select"
316
+
317
+ # Use ` or %x around command literals.
318
+ Style/CommandLiteral:
319
+ EnforcedStyle: backticks
320
+ # backticks: Always use backticks.
321
+ # percent_x: Always use %x.
322
+ # mixed: Use backticks on single-line commands, and %x on multi-line commands.
323
+ SupportedStyles:
324
+ - backticks
325
+ - percent_x
326
+ - mixed
327
+ # If false, the cop will always recommend using %x if one or more backticks
328
+ # are found in the command string.
329
+ AllowInnerBackticks: false
330
+
331
+ # Checks formatting of special comments
332
+ Style/CommentAnnotation:
333
+ Keywords:
334
+ - TODO
335
+ - FIXME
336
+ - OPTIMIZE
337
+ - HACK
338
+ - REVIEW
339
+
340
+ Style/ConditionalAssignment:
341
+ EnforcedStyle: assign_to_condition
342
+ SupportedStyles:
343
+ - assign_to_condition
344
+ - assign_inside_condition
345
+ # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
346
+ # will only register an offense when all branches of a condition are
347
+ # a single line.
348
+ # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
349
+ # will only register an offense for assignment to a condition that has
350
+ # at least one multiline branch.
351
+ SingleLineConditionsOnly: true
352
+
353
+ # Checks that you have put a copyright in a comment before any code.
354
+ #
355
+ # You can override the default Notice in your .rubocop.yml file.
356
+ #
357
+ # In order to use autocorrect, you must supply a value for the
358
+ # AutocorrectNotice key that matches the regexp Notice. A blank
359
+ # AutocorrectNotice will cause an error during autocorrect.
360
+ #
361
+ # Autocorrect will add a copyright notice in a comment at the top
362
+ # of the file immediately after any shebang or encoding comments.
363
+ #
364
+ # Example rubocop.yml:
365
+ #
366
+ # Style/Copyright:
367
+ # Enabled: true
368
+ # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
369
+ # AutocorrectNotice: "# Copyright (c) 2015 Yahoo! Inc."
370
+ #
371
+ Style/Copyright:
372
+ Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
373
+ AutocorrectNotice: ""
374
+
375
+ Style/DocumentationMethod:
376
+ RequireForNonPublicMethods: false
377
+
378
+ # Multi-line method chaining should be done with leading dots.
379
+ Layout/DotPosition:
380
+ EnforcedStyle: leading
381
+ SupportedStyles:
382
+ - leading
383
+ - trailing
384
+
385
+ # Warn on empty else statements
386
+ # empty - warn only on empty else
387
+ # nil - warn on else with nil in it
388
+ # both - warn on empty else and else with nil in it
389
+ Style/EmptyElse:
390
+ EnforcedStyle: both
391
+ SupportedStyles:
392
+ - empty
393
+ - nil
394
+ - both
395
+
396
+ # Use empty lines between defs.
397
+ Layout/EmptyLineBetweenDefs:
398
+ # If true, this parameter means that single line method definitions don't
399
+ # need an empty line between them.
400
+ AllowAdjacentOneLineDefs: false
401
+
402
+ Layout/EmptyLinesAroundBlockBody:
403
+ EnforcedStyle: no_empty_lines
404
+ SupportedStyles:
405
+ - empty_lines
406
+ - no_empty_lines
407
+
408
+ Layout/EmptyLinesAroundClassBody:
409
+ EnforcedStyle: no_empty_lines
410
+ SupportedStyles:
411
+ - empty_lines
412
+ - no_empty_lines
413
+
414
+ Layout/EmptyLinesAroundModuleBody:
415
+ EnforcedStyle: no_empty_lines
416
+ SupportedStyles:
417
+ - empty_lines
418
+ - no_empty_lines
419
+
420
+ # Checks whether the source file has a utf-8 encoding comment or not
421
+ # AutoCorrectEncodingComment must match the regex
422
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
423
+ Style/Encoding:
424
+ Enabled: true
425
+
426
+ Layout/ExtraSpacing:
427
+ # When true, allows most uses of extra spacing if the intent is to align
428
+ # things with the previous or next line, not counting empty lines or comment
429
+ # lines.
430
+ AllowForAlignment: false
431
+ # When true, forces the alignment of = in assignments on consecutive lines.
432
+ ForceEqualSignAlignment: false
433
+
434
+ Naming/FileName:
435
+ Exclude:
436
+ - "**/Gemfile"
437
+ - "**/Rakefile"
438
+ - "**/*.gemspec"
439
+ - "tmp/**/*"
440
+
441
+ # When true, requires that each source file should define a class or module
442
+ # with a name which matches the file name (converted to ... case).
443
+ # It further expects it to be nested inside modules which match the names
444
+ # of subdirectories in its path.
445
+ ExpectMatchingDefinition: false
446
+ # If non-nil, expect all source file names to match the following regex.
447
+ # Only the file name itself is matched, not the entire file path.
448
+ # Use anchors as necessary if you want to match the entire name rather than
449
+ # just a part of it.
450
+ Regex: ~
451
+ # With `IgnoreExecutableScripts` set to `true`, this cop does not
452
+ # report offending filenames for executable scripts (i.e. source
453
+ # files with a shebang in the first line).
454
+ IgnoreExecutableScripts: true
455
+
456
+ Layout/FirstArgumentIndentation:
457
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
458
+ SupportedStyles:
459
+ # The first parameter should always be indented one step more than the
460
+ # preceding line.
461
+ - consistent
462
+ # The first parameter should normally be indented one step more than the
463
+ # preceding line, but if it's a parameter for a method call that is itself
464
+ # a parameter in a method call, then the inner parameter should be indented
465
+ # relative to the inner method.
466
+ - special_for_inner_method_call
467
+ # Same as special_for_inner_method_call except that the special rule only
468
+ # applies if the outer method call encloses its arguments in parentheses.
469
+ - special_for_inner_method_call_in_parentheses
470
+ # By default, the indentation width from Style/IndentationWidth is used
471
+ # But it can be overridden by setting this parameter
472
+ IndentationWidth: ~
473
+
474
+ # Checks use of for or each in multiline loops.
475
+ Style/For:
476
+ EnforcedStyle: each
477
+ SupportedStyles:
478
+ - for
479
+ - each
480
+
481
+ # Enforce the method used for string formatting.
482
+ Style/FormatString:
483
+ EnforcedStyle: format
484
+ SupportedStyles:
485
+ - format
486
+ - sprintf
487
+ - percent
488
+
489
+ Style/FormatStringToken:
490
+ EnforcedStyle: template
491
+
492
+ Style/FrozenStringLiteralComment:
493
+ EnforcedStyle: always
494
+ SupportedStyles:
495
+ - never
496
+ # `always` will always add the frozen string literal comment to a file
497
+ # regardless of the Ruby version or if `freeze` or `<<` are called on a
498
+ # string literal. If you run code against multiple versions of Ruby, it is
499
+ # possible that this will create errors in Ruby 2.3.0+.
500
+ - always
501
+
502
+ # Built-in global variables are allowed by default.
503
+ Style/GlobalVars:
504
+ AllowedVariables: []
505
+
506
+ # `MinBodyLength` defines the number of lines of the a body of an if / unless
507
+ # needs to have to trigger this cop
508
+ Style/GuardClause:
509
+ MinBodyLength: 6
510
+
511
+ Style/HashSyntax:
512
+ EnforcedStyle: ruby19
513
+ SupportedStyles:
514
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
515
+ - ruby19
516
+ # checks for hash rocket syntax for all hashes
517
+ - hash_rockets
518
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
519
+ - no_mixed_keys
520
+ # enforces both ruby19 and no_mixed_keys styles
521
+ - ruby19_no_mixed_keys
522
+ # Force hashes that have a symbol value to use hash rockets
523
+ UseHashRocketsWithSymbolValues: false
524
+ # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
525
+ PreferHashRocketsForNonAlnumEndingSymbols: false
526
+
527
+ Layout/IndentationConsistency:
528
+ # The difference between `rails` and `normal` is that the `rails` style
529
+ # prescribes that in classes and modules the `protected` and `private`
530
+ # modifier keywords shall be indented the same as public methods and that
531
+ # protected and private members shall be indented one step more than the
532
+ # modifiers. Other than that, both styles mean that entities on the same
533
+ # logical depth shall have the same indentation.
534
+ EnforcedStyle: normal
535
+ SupportedStyles:
536
+ - normal
537
+ - rails
538
+
539
+ Layout/IndentationWidth:
540
+ # Number of spaces for each indentation level.
541
+ Width: 2
542
+
543
+ # Checks the indentation of the first element in an array literal.
544
+ Layout/FirstArrayElementIndentation:
545
+ # The value `special_inside_parentheses` means that array literals with
546
+ # brackets that have their opening bracket on the same line as a surrounding
547
+ # opening round parenthesis, shall have their first element indented relative
548
+ # to the first position inside the parenthesis.
549
+ #
550
+ # The value `consistent` means that the indentation of the first element shall
551
+ # always be relative to the first position of the line where the opening
552
+ # bracket is.
553
+ #
554
+ # The value `align_brackets` means that the indentation of the first element
555
+ # shall always be relative to the position of the opening bracket.
556
+ EnforcedStyle: special_inside_parentheses
557
+ SupportedStyles:
558
+ - special_inside_parentheses
559
+ - consistent
560
+ - align_brackets
561
+ # By default, the indentation width from Style/IndentationWidth is used
562
+ # But it can be overridden by setting this parameter
563
+ IndentationWidth: ~
564
+
565
+ # Checks the indentation of assignment RHS, when on a different line from LHS
566
+ Layout/AssignmentIndentation:
567
+ # By default, the indentation width from Style/IndentationWidth is used
568
+ # But it can be overridden by setting this parameter
569
+ IndentationWidth: ~
570
+
571
+ # Checks the indentation of the first key in a hash literal.
572
+ Layout/FirstHashElementIndentation:
573
+ # The value `special_inside_parentheses` means that hash literals with braces
574
+ # that have their opening brace on the same line as a surrounding opening
575
+ # round parenthesis, shall have their first key indented relative to the
576
+ # first position inside the parenthesis.
577
+ #
578
+ # The value `consistent` means that the indentation of the first key shall
579
+ # always be relative to the first position of the line where the opening
580
+ # brace is.
581
+ #
582
+ # The value `align_braces` means that the indentation of the first key shall
583
+ # always be relative to the position of the opening brace.
584
+ EnforcedStyle: special_inside_parentheses
585
+ SupportedStyles:
586
+ - special_inside_parentheses
587
+ - consistent
588
+ - align_braces
589
+ # By default, the indentation width from Style/IndentationWidth is used
590
+ # But it can be overridden by setting this parameter
591
+ IndentationWidth: ~
592
+
593
+ Style/Lambda:
594
+ EnforcedStyle: line_count_dependent
595
+ SupportedStyles:
596
+ - line_count_dependent
597
+ - lambda
598
+ - literal
599
+ Exclude:
600
+ - "**/types/**/*"
601
+ - "**/*_interface.rb"
602
+
603
+ Style/LambdaCall:
604
+ EnforcedStyle: call
605
+ SupportedStyles:
606
+ - call
607
+ - braces
608
+
609
+ Style/Next:
610
+ # With `always` all conditions at the end of an iteration needs to be
611
+ # replaced by next - with `skip_modifier_ifs` the modifier if like this one
612
+ # are ignored: [1, 2].each { |a| return "yes" if a == 1 }
613
+ EnforcedStyle: skip_modifier_ifs
614
+ # `MinBodyLength` defines the number of lines of the a body of an if / unless
615
+ # needs to have to trigger this cop
616
+ MinBodyLength: 3
617
+ SupportedStyles:
618
+ - skip_modifier_ifs
619
+ - always
620
+
621
+ Style/NonNilCheck:
622
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
623
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
624
+ # **usually** OK, but might change behavior.
625
+ #
626
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
627
+ # offenses for `!x.nil?` and does no changes that might change behavior.
628
+ IncludeSemanticChanges: false
629
+
630
+ Style/NumericPredicate:
631
+ EnforcedStyle: predicate
632
+ SupportedStyles:
633
+ - predicate
634
+ - comparison
635
+
636
+ Style/MethodDefParentheses:
637
+ EnforcedStyle: require_parentheses
638
+ SupportedStyles:
639
+ - require_parentheses
640
+ - require_no_parentheses
641
+ - require_no_parentheses_except_multiline
642
+
643
+ Naming/MethodName:
644
+ EnforcedStyle: snake_case
645
+ SupportedStyles:
646
+ - snake_case
647
+ - camelCase
648
+
649
+ Style/ModuleFunction:
650
+ EnforcedStyle: module_function
651
+ SupportedStyles:
652
+ - module_function
653
+ - extend_self
654
+
655
+ Layout/MultilineArrayBraceLayout:
656
+ EnforcedStyle: symmetrical
657
+ SupportedStyles:
658
+ # symmetrical: closing brace is positioned in same way as opening brace
659
+ # new_line: closing brace is always on a new line
660
+ # same_line: closing brace is always on the same line as last element
661
+ - symmetrical
662
+ - new_line
663
+ - same_line
664
+
665
+ Layout/MultilineAssignmentLayout:
666
+ # The types of assignments which are subject to this rule.
667
+ SupportedTypes:
668
+ - block
669
+ - case
670
+ - class
671
+ - if
672
+ - kwbegin
673
+ - module
674
+ EnforcedStyle: new_line
675
+ SupportedStyles:
676
+ # Ensures that the assignment operator and the rhs are on the same line for
677
+ # the set of supported types.
678
+ - same_line
679
+ # Ensures that the assignment operator and the rhs are on separate lines
680
+ # for the set of supported types.
681
+ - new_line
682
+
683
+ Layout/MultilineHashBraceLayout:
684
+ EnforcedStyle: symmetrical
685
+ SupportedStyles:
686
+ # symmetrical: closing brace is positioned in same way as opening brace
687
+ # new_line: closing brace is always on a new line
688
+ # same_line: closing brace is always on same line as last element
689
+ - symmetrical
690
+ - new_line
691
+ - same_line
692
+
693
+ Layout/MultilineMethodCallBraceLayout:
694
+ EnforcedStyle: symmetrical
695
+ SupportedStyles:
696
+ # symmetrical: closing brace is positioned in same way as opening brace
697
+ # new_line: closing brace is always on a new line
698
+ # same_line: closing brace is always on the same line as last argument
699
+ - symmetrical
700
+ - new_line
701
+ - same_line
702
+
703
+ Layout/MultilineMethodCallIndentation:
704
+ EnforcedStyle: aligned
705
+ SupportedStyles:
706
+ - aligned
707
+ - indented
708
+ - indented_relative_to_receiver
709
+ # By default, the indentation width from Style/IndentationWidth is used
710
+ # But it can be overridden by setting this parameter
711
+ IndentationWidth: ~
712
+
713
+ Layout/MultilineMethodDefinitionBraceLayout:
714
+ EnforcedStyle: symmetrical
715
+ SupportedStyles:
716
+ # symmetrical: closing brace is positioned in same way as opening brace
717
+ # new_line: closing brace is always on a new line
718
+ # same_line: closing brace is always on the same line as last parameter
719
+ - symmetrical
720
+ - new_line
721
+ - same_line
722
+
723
+ Layout/MultilineOperationIndentation:
724
+ EnforcedStyle: aligned
725
+ SupportedStyles:
726
+ - aligned
727
+ - indented
728
+ # By default, the indentation width from Style/IndentationWidth is used
729
+ # But it can be overridden by setting this parameter
730
+ IndentationWidth: ~
731
+
732
+ Style/NumericLiterals:
733
+ MinDigits: 5
734
+
735
+ Style/NumericLiteralPrefix:
736
+ EnforcedOctalStyle: zero_with_o
737
+ SupportedOctalStyles:
738
+ - zero_with_o
739
+ - zero_only
740
+
741
+ Style/OptionHash:
742
+ # A list of parameter names that will be flagged by this cop.
743
+ SuspiciousParamNames:
744
+ - options
745
+ - opts
746
+ - args
747
+ - params
748
+ - parameters
749
+
750
+ # Allow safe assignment in conditions.
751
+ Style/ParenthesesAroundCondition:
752
+ AllowSafeAssignment: true
753
+
754
+ Style/PercentLiteralDelimiters:
755
+ PreferredDelimiters:
756
+ "%": ()
757
+ "%i": ()
758
+ "%q": ()
759
+ "%Q": ()
760
+ "%r": "{}"
761
+ "%s": ()
762
+ "%w": ()
763
+ "%W": ()
764
+ "%x": ()
765
+
766
+ Style/PercentQLiterals:
767
+ EnforcedStyle: lower_case_q
768
+ SupportedStyles:
769
+ - lower_case_q # Use %q when possible, %Q when necessary
770
+ - upper_case_q # Always use %Q
771
+
772
+ Naming/PredicateName:
773
+ # Predicate name prefixes.
774
+ NamePrefix:
775
+ - is_
776
+ - has_
777
+ - have_
778
+ # Predicate name prefixes that should be removed.
779
+ ForbiddenPrefixes:
780
+ - is_
781
+ - have_
782
+ # Predicate names which, despite having a blacklisted prefix, or no ?,
783
+ # should still be accepted
784
+ AllowedMethods:
785
+ - is_a?
786
+ # Exclude Rspec specs because there is a strong convetion to write spec
787
+ # helpers in the form of `have_something` or `be_something`.
788
+ Exclude:
789
+ - "**/spec/**/*"
790
+ - "**/test/**/*"
791
+
792
+ Style/PreferredHashMethods:
793
+ Enabled: true
794
+ EnforcedStyle: verbose
795
+
796
+ Style/DateTime:
797
+ Enabled: true
798
+
799
+ Style/Documentation:
800
+ Enabled: false
801
+
802
+ Style/RaiseArgs:
803
+ EnforcedStyle: exploded
804
+ SupportedStyles:
805
+ - compact # raise Exception.new(msg)
806
+ - exploded # raise Exception, msg
807
+
808
+ Style/RedundantReturn:
809
+ # When true allows code like `return x, y`.
810
+ AllowMultipleReturnValues: false
811
+
812
+ # Use / or %r around regular expressions.
813
+ Style/RegexpLiteral:
814
+ EnforcedStyle: slashes
815
+ # slashes: Always use slashes.
816
+ # percent_r: Always use %r.
817
+ # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
818
+ SupportedStyles:
819
+ - slashes
820
+ - percent_r
821
+ - mixed
822
+ # If false, the cop will always recommend using %r if one or more slashes
823
+ # are found in the regexp string.
824
+ AllowInnerSlashes: false
825
+
826
+ Style/SafeNavigation:
827
+ Enabled: false
828
+
829
+ Style/Semicolon:
830
+ # Allow ; to separate several expressions on the same line.
831
+ AllowAsExpressionSeparator: false
832
+
833
+ Style/SignalException:
834
+ EnforcedStyle: only_raise
835
+ SupportedStyles:
836
+ - only_raise
837
+ - only_fail
838
+ - semantic
839
+
840
+ Style/SingleLineBlockParams:
841
+ Methods:
842
+ - reduce:
843
+ - a
844
+ - e
845
+ - inject:
846
+ - a
847
+ - e
848
+
849
+ Style/SingleLineMethods:
850
+ AllowIfMethodIsEmpty: true
851
+
852
+ Layout/SpaceBeforeFirstArg:
853
+ # When true, allows most uses of extra spacing if the intent is to align
854
+ # things with the previous or next line, not counting empty lines or comment
855
+ # lines.
856
+ AllowForAlignment: true
857
+
858
+ Style/SpecialGlobalVars:
859
+ EnforcedStyle: use_english_names
860
+ SupportedStyles:
861
+ - use_perl_names
862
+ - use_english_names
863
+
864
+ Style/StabbyLambdaParentheses:
865
+ EnforcedStyle: require_parentheses
866
+ SupportedStyles:
867
+ - require_parentheses
868
+ - require_no_parentheses
869
+
870
+ Style/StringLiterals:
871
+ EnforcedStyle: double_quotes
872
+ SupportedStyles:
873
+ - single_quotes
874
+ - double_quotes
875
+ # If true, strings which span multiple lines using \ for continuation must
876
+ # use the same type of quotes on each line.
877
+ ConsistentQuotesInMultiline: false
878
+
879
+ Style/StringLiteralsInInterpolation:
880
+ EnforcedStyle: double_quotes
881
+ SupportedStyles:
882
+ - single_quotes
883
+ - double_quotes
884
+
885
+ Style/StringMethods:
886
+ # Mapping from undesired method to desired_method
887
+ # e.g. to use `to_sym` over `intern`:
888
+ #
889
+ # StringMethods:
890
+ # PreferredMethods:
891
+ # intern: to_sym
892
+ PreferredMethods:
893
+ intern: to_sym
894
+
895
+ Layout/SpaceAroundBlockParameters:
896
+ EnforcedStyleInsidePipes: no_space
897
+
898
+ Layout/SpaceAroundEqualsInParameterDefault:
899
+ EnforcedStyle: space
900
+ SupportedStyles:
901
+ - space
902
+ - no_space
903
+
904
+ Layout/SpaceAroundOperators:
905
+ Enabled: false
906
+ # When true, allows most uses of extra spacing if the intent is to align
907
+ # with an operator on the previous or next line, not counting empty lines
908
+ # or comment lines.
909
+ AllowForAlignment: true
910
+
911
+ Layout/SpaceBeforeBlockBraces:
912
+ EnforcedStyle: space
913
+ SupportedStyles:
914
+ - space
915
+ - no_space
916
+
917
+ Layout/SpaceInsideBlockBraces:
918
+ EnforcedStyle: space
919
+ SupportedStyles:
920
+ - space
921
+ - no_space
922
+ # Valid values are: space, no_space
923
+ EnforcedStyleForEmptyBraces: no_space
924
+ # Space between { and |. Overrides EnforcedStyle if there is a conflict.
925
+ SpaceBeforeBlockParameters: true
926
+
927
+ Layout/SpaceInsideHashLiteralBraces:
928
+ EnforcedStyle: space
929
+ EnforcedStyleForEmptyBraces: no_space
930
+ SupportedStyles:
931
+ - space
932
+ - no_space
933
+ # "compact" normally requires a space inside hash braces, with the exception
934
+ # that successive left braces or right braces are collapsed together
935
+ - compact
936
+
937
+ Layout/SpaceInsideStringInterpolation:
938
+ EnforcedStyle: no_space
939
+ SupportedStyles:
940
+ - space
941
+ - no_space
942
+
943
+ Style/AccessModifierDeclarations:
944
+ Enabled: false
945
+
946
+ Style/SymbolArray:
947
+ EnforcedStyle: brackets
948
+ SupportedStyles:
949
+ - percent
950
+ - brackets
951
+
952
+ Style/SymbolProc:
953
+ # A list of method names to be ignored by the check.
954
+ # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
955
+ IgnoredMethods:
956
+ - respond_to
957
+ - define_method
958
+
959
+ Style/TernaryParentheses:
960
+ EnforcedStyle: require_no_parentheses
961
+ SupportedStyles:
962
+ - require_parentheses
963
+ - require_no_parentheses
964
+ AllowSafeAssignment: true
965
+
966
+ Layout/TrailingEmptyLines:
967
+ EnforcedStyle: final_newline
968
+ SupportedStyles:
969
+ - final_newline
970
+ - final_blank_line
971
+
972
+ Style/TrailingCommaInArguments:
973
+ # If `comma`, the cop requires a comma after the last argument, but only for
974
+ # parenthesized method calls where each argument is on its own line.
975
+ # If `consistent_comma`, the cop requires a comma after the last argument,
976
+ # for all parenthesized method calls with arguments.
977
+ EnforcedStyleForMultiline: no_comma
978
+
979
+ Style/TrailingCommaInArrayLiteral:
980
+ # If `comma`, the cop requires a comma after the last item in an array or
981
+ # hash, but only when each item is on its own line.
982
+ # If `consistent_comma`, the cop requires a comma after the last item of all
983
+ # non-empty array and hash literals.
984
+ EnforcedStyleForMultiline: no_comma
985
+
986
+ Style/TrailingCommaInHashLiteral:
987
+ # If `comma`, the cop requires a comma after the last item in an array or
988
+ # hash, but only when each item is on its own line.
989
+ # If `consistent_comma`, the cop requires a comma after the last item of all
990
+ # non-empty array and hash literals.
991
+ EnforcedStyleForMultiline: no_comma
992
+
993
+ # TrivialAccessors requires exact name matches and doesn't allow
994
+ # predicated methods by default.
995
+ Style/TrivialAccessors:
996
+ # When set to false the cop will suggest the use of accessor methods
997
+ # in situations like:
998
+ #
999
+ # def name
1000
+ # @other_name
1001
+ # end
1002
+ #
1003
+ # This way you can uncover "hidden" attributes in your code.
1004
+ ExactNameMatch: true
1005
+ AllowPredicates: true
1006
+ # Allows trivial writers that don't end in an equal sign. e.g.
1007
+ #
1008
+ # def on_exception(action)
1009
+ # @on_exception=action
1010
+ # end
1011
+ # on_exception :restart
1012
+ #
1013
+ # Commonly used in DSLs
1014
+ AllowDSLWriters: false
1015
+ IgnoreClassMethods: false
1016
+ AllowedMethods:
1017
+ - to_ary
1018
+ - to_a
1019
+ - to_c
1020
+ - to_enum
1021
+ - to_h
1022
+ - to_hash
1023
+ - to_i
1024
+ - to_int
1025
+ - to_io
1026
+ - to_open
1027
+ - to_path
1028
+ - to_proc
1029
+ - to_r
1030
+ - to_regexp
1031
+ - to_str
1032
+ - to_s
1033
+ - to_sym
1034
+
1035
+ Naming/VariableName:
1036
+ EnforcedStyle: snake_case
1037
+ SupportedStyles:
1038
+ - snake_case
1039
+ - camelCase
1040
+
1041
+ Naming/VariableNumber:
1042
+ EnforcedStyle: normalcase
1043
+ SupportedStyles:
1044
+ - snake_case
1045
+ - normalcase
1046
+ - non_integer
1047
+
1048
+ # WordArray enforces how array literals of word-like strings should be expressed.
1049
+ Style/WordArray:
1050
+ EnforcedStyle: percent
1051
+ SupportedStyles:
1052
+ # percent style: %w(word1 word2)
1053
+ - percent
1054
+ # bracket style: ["word1", "word2"]
1055
+ - brackets
1056
+ # The MinSize option causes the WordArray rule to be ignored for arrays
1057
+ # smaller than a certain size. The rule is only applied to arrays
1058
+ # whose element count is greater than or equal to MinSize.
1059
+ MinSize: 2
1060
+ # The regular expression WordRegex decides what is considered a word.
1061
+ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1062
+
1063
+ ##################### Metrics ##################################
1064
+
1065
+ Metrics/AbcSize:
1066
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1067
+ # a Float.
1068
+ Max: 15
1069
+ Enabled: false
1070
+
1071
+ Metrics/BlockNesting:
1072
+ Max: 3
1073
+
1074
+ Metrics/ClassLength:
1075
+ CountComments: false # count full line comments?
1076
+ Max: 100
1077
+ Enabled: false
1078
+
1079
+ Metrics/ModuleLength:
1080
+ CountComments: false # count full line comments?
1081
+ Max: 100
1082
+ Enabled: false
1083
+
1084
+ # Avoid complex methods.
1085
+ Metrics/CyclomaticComplexity:
1086
+ Max: 9
1087
+ Exclude:
1088
+ - "**/*/permissions.rb"
1089
+
1090
+ Layout/LineLength:
1091
+ Max: 180
1092
+ # To make it possible to copy or click on URIs in the code, we allow lines
1093
+ # containing a URI to be longer than Max.
1094
+ AllowHeredoc: true
1095
+ AllowURI: true
1096
+ URISchemes:
1097
+ - http
1098
+ - https
1099
+ Exclude:
1100
+ - "**/spec/**/*"
1101
+
1102
+ Metrics/MethodLength:
1103
+ CountComments: false # count full line comments?
1104
+ Max: 15
1105
+ Enabled: false
1106
+
1107
+ Metrics/ParameterLists:
1108
+ Max: 5
1109
+ CountKeywordArgs: true
1110
+ Exclude:
1111
+ - "decidim-core/lib/decidim/filter_form_builder.rb"
1112
+
1113
+ Metrics/PerceivedComplexity:
1114
+ Max: 10
1115
+ Exclude:
1116
+ - "**/*/permissions.rb"
1117
+
1118
+ ##################### Lint ##################################
1119
+
1120
+ Lint/AmbiguousBlockAssociation:
1121
+ Enabled: true
1122
+ Exclude:
1123
+ - "**/abilities/**/*"
1124
+
1125
+ # Allow safe assignment in conditions.
1126
+ Lint/AssignmentInCondition:
1127
+ AllowSafeAssignment: true
1128
+
1129
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
1130
+ Layout/BlockAlignment:
1131
+ # The value `start_of_block` means that the `end` should be aligned with line
1132
+ # where the `do` keyword appears.
1133
+ # The value `start_of_line` means it should be aligned with the whole
1134
+ # expression's starting line.
1135
+ # The value `either` means both are allowed.
1136
+ EnforcedStyleAlignWith: either
1137
+
1138
+ # Align ends correctly.
1139
+ Layout/EndAlignment:
1140
+ # The value `keyword` means that `end` should be aligned with the matching
1141
+ # keyword (if, while, etc.).
1142
+ # The value `variable` means that in assignments, `end` should be aligned
1143
+ # with the start of the variable on the left hand side of `=`. In all other
1144
+ # situations, `end` should still be aligned with the keyword.
1145
+ # The value `start_of_line` means that `end` should be aligned with the start
1146
+ # of the line which the matching keyword appears on.
1147
+ EnforcedStyleAlignWith: keyword
1148
+ AutoCorrect: false
1149
+
1150
+ Layout/DefEndAlignment:
1151
+ # The value `def` means that `end` should be aligned with the def keyword.
1152
+ # The value `start_of_line` means that `end` should be aligned with method
1153
+ # calls like `private`, `public`, etc, if present in front of the `def`
1154
+ # keyword on the same line.
1155
+ EnforcedStyleAlignWith: start_of_line
1156
+ AutoCorrect: false
1157
+
1158
+ Lint/InheritException:
1159
+ # The default base class in favour of `Exception`.
1160
+ EnforcedStyle: runtime_error
1161
+ SupportedStyles:
1162
+ - runtime_error
1163
+ - standard_error
1164
+
1165
+ # Checks for unused block arguments
1166
+ Lint/UnusedBlockArgument:
1167
+ IgnoreEmptyBlocks: true
1168
+ AllowUnusedKeywordArguments: false
1169
+
1170
+ # Checks for unused method arguments.
1171
+ Lint/UnusedMethodArgument:
1172
+ AllowUnusedKeywordArguments: false
1173
+ IgnoreEmptyMethods: true
1174
+
1175
+ ##################### Performance ############################
1176
+
1177
+ Metrics/BlockLength:
1178
+ Enabled: false
1179
+
1180
+ RSpec/BeforeAfterAll:
1181
+ Enabled: true
1182
+
1183
+ RSpec/ContextWording:
1184
+ Enabled: true
1185
+ Prefixes:
1186
+ - when
1187
+ - with
1188
+ - without
1189
+ - and
1190
+
1191
+ RSpec/DescribeClass:
1192
+ Exclude:
1193
+ - spec/gemfiles_spec.rb
1194
+ - spec/system/**/*.rb
1195
+ - spec/features/**/*.rb
1196
+ - spec/js_bundles_spec.rb
1197
+ - spec/i18n_spec.rb
1198
+ - "**/*/spec/**/*_badge_spec.rb"
1199
+ - decidim-core/spec/lib/global_engines_spec.rb
1200
+ - "**/tasks/**/*"
1201
+
1202
+ RSpec/EmptyExampleGroup:
1203
+ Exclude:
1204
+ - decidim-core/spec/lib/participatory_space_manifest_spec.rb
1205
+
1206
+ RSpec/ExampleLength:
1207
+ Max: 49
1208
+
1209
+ RSpec/ExpectInHook:
1210
+ Enabled: false
1211
+
1212
+ RSpec/IteratedExpectation:
1213
+ Enabled: true
1214
+
1215
+ RSpec/LetSetup:
1216
+ Enabled: false
1217
+
1218
+ RSpec/MessageSpies:
1219
+ Enabled: false
1220
+
1221
+ RSpec/MultipleExpectations:
1222
+ Enabled: false
1223
+
1224
+ RSpec/NestedGroups:
1225
+ Max: 7
1226
+
1227
+ RSpec/NamedSubject:
1228
+ Enabled: false
1229
+
1230
+ RSpec/RepeatedExampleGroupDescription:
1231
+ Enabled: false
1232
+
1233
+ RSpec/RepeatedExampleGroupBody:
1234
+ Enabled: false
1235
+ RSpec/VerifiedDoubles:
1236
+ Enabled: false
1237
+
1238
+ RSpec/LeakyConstantDeclaration:
1239
+ Enabled: false
1240
+
1241
+ RSpec/DescribedClass:
1242
+ Enabled: false
1243
+
1244
+ RSpec/StubbedMock:
1245
+ Enabled: false
1246
+
1247
+ RSpec/MultipleMemoizedHelpers:
1248
+ Max: 10