decidim-reporting_proposals 0.6.1 → 0.7.1

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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +8 -6
  3. data/.github/workflows/test_integration.yml +24 -11
  4. data/.github/workflows/test_unit.yml +8 -4
  5. data/.rubocop.yml +21 -1
  6. data/.ruby-version +1 -1
  7. data/Gemfile +4 -8
  8. data/Gemfile.lock +361 -390
  9. data/README.md +1 -0
  10. data/app/cells/concerns/decidim/reporting_proposals/proposals_picker_cell_override.rb +4 -4
  11. data/app/commands/concerns/decidim/reporting_proposals/admin/assign_proposals_to_valuator_override.rb +3 -1
  12. data/app/commands/concerns/decidim/reporting_proposals/admin/create_category_override.rb +5 -11
  13. data/app/commands/concerns/decidim/reporting_proposals/admin/create_proposal_answer_template_override.rb +24 -0
  14. data/app/commands/concerns/decidim/reporting_proposals/admin/has_result_command_override.rb +21 -0
  15. data/app/commands/concerns/decidim/reporting_proposals/admin/update_category_override.rb +8 -11
  16. data/app/commands/concerns/decidim/reporting_proposals/admin/update_imported_result_override.rb +30 -0
  17. data/app/commands/concerns/decidim/reporting_proposals/admin/update_result_override.rb +0 -4
  18. data/app/commands/concerns/decidim/reporting_proposals/create_project_override.rb +1 -1
  19. data/app/commands/concerns/decidim/reporting_proposals/create_report_override.rb +1 -1
  20. data/app/controllers/concerns/decidim/reporting_proposals/admin/proposal_answer_templates_controller_override.rb +4 -5
  21. data/app/controllers/concerns/decidim/reporting_proposals/admin/valuation_assignments_controller_override.rb +10 -4
  22. data/app/controllers/concerns/decidim/reporting_proposals/proposals_controller_override.rb +23 -31
  23. data/app/forms/concerns/decidim/reporting_proposals/admin/category_form_override.rb +1 -1
  24. data/app/forms/concerns/decidim/reporting_proposals/form_builder_override.rb +4 -1
  25. data/app/helpers/concerns/decidim/reporting_proposals/admin/proposal_bulk_actions_helper_override.rb +23 -0
  26. data/app/helpers/concerns/decidim/reporting_proposals/admin/proposals_helper_override.rb +18 -0
  27. data/app/helpers/concerns/decidim/reporting_proposals/proposal_wizard_helper_override.rb +17 -3
  28. data/app/jobs/decidim/reporting_proposals/assign_proposal_valuators_job.rb +1 -1
  29. data/app/overrides/decidim/proposals/admin/proposals/_proposal-tr/add_valuators_name.html.erb.deface +5 -5
  30. data/app/overrides/decidim/proposals/admin/proposals/index/add_form_default_class.html.erb.deface +5 -0
  31. data/app/overrides/decidim/proposals/admin/proposals/show/add_valuators_form.html.erb.deface +1 -24
  32. data/app/overrides/decidim/proposals/proposals/edit_draft/replace_partial_edit_form_fields.html.erb.deface +0 -1
  33. data/app/overrides/decidim/proposals/proposals/new/replace_partial_edit_form_fields.html.erb.deface +3 -0
  34. data/app/packs/entrypoints/decidim_reporting_proposals.js +1 -0
  35. data/app/packs/src/decidim/reporting_proposals/assign_valuators_select.js +25 -0
  36. data/app/packs/src/decidim/reporting_proposals/user_camera_inputs.js +1 -1
  37. data/app/packs/stylesheets/decidim/reporting_proposals/list_component_admin.scss +6 -0
  38. data/app/permissions/concerns/decidim/reporting_proposals/admin/permissions_override.rb +12 -2
  39. data/app/queries/decidim/reporting_proposals/nearby_proposals.rb +1 -3
  40. data/app/views/decidim/proposals/admin/proposals/_assign_to_valuator.html.erb +31 -0
  41. data/app/views/decidim/proposals/proposals/compare.html.erb +34 -0
  42. data/app/views/decidim/reporting_proposals/admin/categories/_valuators_field.html.erb +1 -1
  43. data/app/views/decidim/reporting_proposals/admin/proposals/_photo_form.html.erb +2 -2
  44. data/app/views/decidim/reporting_proposals/admin/proposals/_photos.html.erb +4 -1
  45. data/app/views/decidim/reporting_proposals/admin/proposals/_proposal_td_hide.html.erb +1 -9
  46. data/app/views/decidim/reporting_proposals/proposals/_camera_button.html.erb +4 -2
  47. data/app/views/decidim/reporting_proposals/proposals/_reporting_proposal_fields.html.erb +66 -65
  48. data/bin/bundle +62 -0
  49. data/bin/rspec +26 -0
  50. data/bin/test +47 -0
  51. data/bin/test-legacy +3 -0
  52. data/config/locales/ca.yml +22 -34
  53. data/config/locales/de.yml +22 -36
  54. data/config/locales/en.yml +16 -1
  55. data/config/locales/es.yml +22 -36
  56. data/decidim-reporting_proposals.gemspec +1 -2
  57. data/lib/decidim/reporting_proposals/component.rb +26 -17
  58. data/lib/decidim/reporting_proposals/engine.rb +16 -11
  59. data/lib/decidim/reporting_proposals/version.rb +3 -3
  60. data/package-lock.json +120 -85
  61. data/package.json +7 -7
  62. metadata +56 -77
  63. data/.rubocop-disabled.yml +0 -11
  64. data/.rubocop_rails.yml +0 -90
  65. data/.rubocop_ruby.yml +0 -1767
  66. data/app/commands/concerns/decidim/reporting_proposals/admin/create_answer_override.rb +0 -17
  67. data/app/commands/concerns/decidim/reporting_proposals/admin/create_result_override.rb +0 -17
  68. data/app/commands/concerns/decidim/reporting_proposals/gallery_methods_override.rb +0 -18
  69. data/app/overrides/decidim/proposals/proposals/compare/add_css.html.erb.deface +0 -5
  70. data/app/overrides/decidim/proposals/proposals/compare/add_distance_badge.html.erb.deface +0 -10
  71. data/app/overrides/decidim/proposals/proposals/edit/add_user_group.html.erb.deface +0 -3
  72. data/app/overrides/decidim/proposals/proposals/new/remove_body.html.erb.deface +0 -1
  73. data/app/overrides/decidim/proposals/proposals/new/replace_body.html.erb.deface +0 -3
  74. data/app/views/decidim/reporting_proposals/proposals/_new_proposal_fields.html.erb +0 -9
  75. data/app/views/decidim/reporting_proposals/proposals/_user_group.html.erb +0 -5
  76. data/babel.config.json +0 -25
data/.rubocop_ruby.yml DELETED
@@ -1,1767 +0,0 @@
1
- require:
2
- - rubocop-rspec
3
- - rubocop-faker
4
-
5
- # Common configuration.
6
- AllCops:
7
- Include:
8
- - .simplecov
9
- - "**/*.rb"
10
- - "**/*.rake"
11
- - "**/*.gemspec"
12
- - "**/*.ru"
13
- - "**/Gemfile"
14
- - "**/Rakefile"
15
- Exclude:
16
- - "**/node_modules/**/*"
17
- - "**/vendor/**/*"
18
- - "development_app/**/*"
19
- - "decidim_app-design/node_modules/**/*"
20
- - "spec/decidim_dummy_app/**/*"
21
- - "node_modules/**/*"
22
- - "decidim-initiatives/lib/gem_overrides/origami/date.rb"
23
- # Default formatter will be used if no -f/--format option is given.
24
- DefaultFormatter: progress
25
- # Cop names are not displayed in offense messages by default. Change behavior
26
- # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
27
- # option.
28
- DisplayCopNames: true
29
- # Style guide URLs are not displayed in offense messages by default. Change
30
- # behavior by overriding DisplayStyleGuide, or by giving the
31
- # -S/--display-style-guide option.
32
- DisplayStyleGuide: false
33
- # Extra details are not displayed in offense messages by default. Change
34
- # behavior by overriding ExtraDetails, or by giving the
35
- # -E/--extra-details option.
36
- ExtraDetails: false
37
- NewCops: enable
38
- # Additional cops that do not reference a style guide rule may be enabled by
39
- # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
40
- # the --only-guide-cops option.
41
- StyleGuideCopsOnly: false
42
- # All cops except the ones in disabled.yml are enabled by default. Change
43
- # this behavior by overriding DisabledByDefault. When DisabledByDefault is
44
- # true, all cops in the default configuration are disabled, and and only cops
45
- # in user configuration are enabled. This makes cops opt-in instead of
46
- # opt-out. Note that when DisabledByDefault is true, cops in user
47
- # configuration will be enabled even if they don't set the Enabled parameter.
48
- DisabledByDefault: false
49
- # Enables the result cache if true. Can be overridden by the --cache command
50
- # line option.
51
- UseCache: true
52
- # Threshold for how many files can be stored in the result cache before some
53
- # of the files are automatically removed.
54
- MaxFilesInCache: 20000
55
- # The cache will be stored in "rubocop_cache" under this directory. The name
56
- # "/tmp" is special and will be converted to the system temporary directory,
57
- # which is "/tmp" on Unix-like systems, but could be something else on other
58
- # systems.
59
- CacheRootDirectory: /tmp
60
- # The default cache root directory is /tmp, which on most systems is
61
- # writable by any system user. This means that it is possible for a
62
- # malicious user to anticipate the location of Rubocop's cache directory,
63
- # and create a symlink in its place that could cause Rubocop to overwrite
64
- # unintended files, or read malicious input. If you are certain that your
65
- # cache location is secure from this kind of attack, and wish to use a
66
- # symlinked cache location, set this value to "true".
67
- AllowSymlinksInCacheRootDirectory: true
68
- # What MRI version of the Ruby interpreter is the inspected code intended to
69
- # run on? (If there is more than one, set this to the lowest version.)
70
- # If a value is specified for TargetRubyVersion then it is used.
71
- # Else if .ruby-version exists and it contains an MRI version it is used.
72
- # Otherwise we fallback to the oldest officially supported Ruby version (2.0).
73
- TargetRubyVersion: 3.1
74
-
75
- # RSpec:
76
- # Patterns:
77
- # - "(?:^|/)spec/"
78
- # - "(?:^|/)test/"
79
-
80
- # Indent private/protected/public as deep as method definitions
81
- Layout/AccessModifierIndentation:
82
- EnforcedStyle: indent
83
- SupportedStyles:
84
- - outdent
85
- - indent
86
- # By default, the indentation width from Style/IndentationWidth is used
87
- # But it can be overridden by setting this parameter
88
- IndentationWidth: ~
89
-
90
- Style/Alias:
91
- EnforcedStyle: prefer_alias
92
- SupportedStyles:
93
- - prefer_alias
94
- - prefer_alias_method
95
-
96
- # Align the elements of a hash literal if they span more than one line.
97
- Layout/HashAlignment:
98
- # Alignment of entries using hash rocket as separator. Valid values are:
99
- #
100
- # key - left alignment of keys
101
- # "a" => 2
102
- # "bb" => 3
103
- # separator - alignment of hash rockets, keys are right aligned
104
- # "a" => 2
105
- # "bb" => 3
106
- # table - left alignment of keys, hash rockets, and values
107
- # "a" => 2
108
- # "bb" => 3
109
- EnforcedHashRocketStyle: key
110
- # Alignment of entries using colon as separator. Valid values are:
111
- #
112
- # key - left alignment of keys
113
- # a: 0
114
- # bb: 1
115
- # separator - alignment of colons, keys are right aligned
116
- # a: 0
117
- # bb: 1
118
- # table - left alignment of keys and values
119
- # a: 0
120
- # bb: 1
121
- EnforcedColonStyle: key
122
- # Select whether hashes that are the last argument in a method call should be
123
- # inspected? Valid values are:
124
- #
125
- # always_inspect - Inspect both implicit and explicit hashes.
126
- # Registers an offense for:
127
- # function(a: 1,
128
- # b: 2)
129
- # Registers an offense for:
130
- # function({a: 1,
131
- # b: 2})
132
- # always_ignore - Ignore both implicit and explicit hashes.
133
- # Accepts:
134
- # function(a: 1,
135
- # b: 2)
136
- # Accepts:
137
- # function({a: 1,
138
- # b: 2})
139
- # ignore_implicit - Ignore only implicit hashes.
140
- # Accepts:
141
- # function(a: 1,
142
- # b: 2)
143
- # Registers an offense for:
144
- # function({a: 1,
145
- # b: 2})
146
- # ignore_explicit - Ignore only explicit hashes.
147
- # Accepts:
148
- # function({a: 1,
149
- # b: 2})
150
- # Registers an offense for:
151
- # function(a: 1,
152
- # b: 2)
153
- EnforcedLastArgumentHashStyle: always_inspect
154
- SupportedLastArgumentHashStyles:
155
- - always_inspect
156
- - always_ignore
157
- - ignore_implicit
158
- - ignore_explicit
159
-
160
- Layout/ParameterAlignment:
161
- # Alignment of parameters in multi-line method calls.
162
- #
163
- # The `with_first_parameter` style aligns the following lines along the same
164
- # column as the first parameter.
165
- #
166
- # method_call(a,
167
- # b)
168
- #
169
- # The `with_fixed_indentation` style aligns the following lines with one
170
- # level of indentation relative to the start of the line with the method call.
171
- #
172
- # method_call(a,
173
- # b)
174
- EnforcedStyle: with_first_parameter
175
- SupportedStyles:
176
- - with_first_parameter
177
- - with_fixed_indentation
178
- # By default, the indentation width from Style/IndentationWidth is used
179
- # But it can be overridden by setting this parameter
180
- IndentationWidth: ~
181
-
182
- Style/ArrayCoercion:
183
- Description: >-
184
- Use Array() instead of explicit Array check or [*var], when dealing
185
- with a variable you want to treat as an Array, but you're not certain it's an array.
186
- StyleGuide: '#array-coercion'
187
- Safe: false
188
- Enabled: false
189
- VersionAdded: '0.88'
190
-
191
- Style/AndOr:
192
- # Whether `and` and `or` are banned only in conditionals (conditionals)
193
- # or completely (always).
194
- EnforcedStyle: always
195
- SupportedStyles:
196
- - always
197
- - conditionals
198
-
199
- Style/AsciiComments:
200
- Enabled: false
201
-
202
- # Checks if usage of %() or %Q() matches configuration.
203
- Style/BarePercentLiterals:
204
- EnforcedStyle: bare_percent
205
- SupportedStyles:
206
- - percent_q
207
- - bare_percent
208
-
209
- Style/BlockDelimiters:
210
- EnforcedStyle: line_count_based
211
- SupportedStyles:
212
- # The `line_count_based` style enforces braces around single line blocks and
213
- # do..end around multi-line blocks.
214
- - line_count_based
215
- # The `semantic` style enforces braces around functional blocks, where the
216
- # primary purpose of the block is to return a value and do..end for
217
- # procedural blocks, where the primary purpose of the block is its
218
- # side-effects.
219
- #
220
- # This looks at the usage of a block's method to determine its type (e.g. is
221
- # the result of a `map` assigned to a variable or passed to another
222
- # method) but exceptions are permitted in the `ProceduralMethods`,
223
- # `FunctionalMethods` and `IgnoredMethods` sections below.
224
- - semantic
225
- # The `braces_for_chaining` style enforces braces around single line blocks
226
- # and do..end around multi-line blocks, except for multi-line blocks whose
227
- # return value is being chained with another method (in which case braces
228
- # are enforced).
229
- - braces_for_chaining
230
- ProceduralMethods:
231
- # Methods that are known to be procedural in nature but look functional from
232
- # their usage, e.g.
233
- #
234
- # time = Benchmark.realtime do
235
- # foo.bar
236
- # end
237
- #
238
- # Here, the return value of the block is discarded but the return value of
239
- # `Benchmark.realtime` is used.
240
- - benchmark
241
- - bm
242
- - bmbm
243
- - create
244
- - each_with_object
245
- - measure
246
- - new
247
- - realtime
248
- - tap
249
- - with_object
250
- FunctionalMethods:
251
- # Methods that are known to be functional in nature but look procedural from
252
- # their usage, e.g.
253
- #
254
- # let(:foo) { Foo.new }
255
- #
256
- # Here, the return value of `Foo.new` is used to define a `foo` helper but
257
- # doesn't appear to be used from the return value of `let`.
258
- - let
259
- - let!
260
- - subject
261
- - watch
262
- IgnoredMethods:
263
- # Methods that can be either procedural or functional and cannot be
264
- # categorised from their usage alone, e.g.
265
- #
266
- # foo = lambda do |x|
267
- # puts "Hello, #{x}"
268
- # end
269
- #
270
- # foo = lambda do |x|
271
- # x * 100
272
- # end
273
- #
274
- # Here, it is impossible to tell from the return value of `lambda` whether
275
- # the inner block's return value is significant.
276
- - lambda
277
- - proc
278
- - it
279
-
280
- Style/ExplicitBlockArgument:
281
- Enabled: false
282
-
283
- Style/HashEachMethods:
284
- Enabled: false
285
-
286
- Style/HashLikeCase:
287
- MinBranchesCount: 5
288
-
289
- # Indentation of `when`.
290
- Layout/CaseIndentation:
291
- EnforcedStyle: case
292
- SupportedStyles:
293
- - case
294
- - end
295
- IndentOneStep: false
296
- # By default, the indentation width from Style/IndentationWidth is used
297
- # But it can be overridden by setting this parameter
298
- # This only matters if IndentOneStep is true
299
- IndentationWidth: ~
300
-
301
- Style/ClassAndModuleChildren:
302
- Enabled: false
303
- # Checks the style of children definitions at classes and modules.
304
- #
305
- # Basically there are two different styles:
306
- #
307
- # `nested` - have each child on a separate line
308
- # class Foo
309
- # class Bar
310
- # end
311
- # end
312
- #
313
- # `compact` - combine definitions as much as possible
314
- # class Foo::Bar
315
- # end
316
- #
317
- # The compact style is only forced, for classes / modules with one child.
318
- EnforcedStyle: nested
319
- SupportedStyles:
320
- - nested
321
- - compact
322
-
323
- Style/ClassCheck:
324
- EnforcedStyle: is_a?
325
- SupportedStyles:
326
- - is_a?
327
- - kind_of?
328
-
329
- # Align with the style guide.
330
- Style/CollectionMethods:
331
- # Mapping from undesired method to desired_method
332
- # e.g. to use `detect` over `find`:
333
- #
334
- # CollectionMethods:
335
- # PreferredMethods:
336
- # find: detect
337
- PreferredMethods:
338
- collect: "map"
339
- collect!: "map!"
340
- inject: "reduce"
341
- detect: "find"
342
- find_all: "select"
343
-
344
- # Use ` or %x around command literals.
345
- Style/CommandLiteral:
346
- EnforcedStyle: backticks
347
- # backticks: Always use backticks.
348
- # percent_x: Always use %x.
349
- # mixed: Use backticks on single-line commands, and %x on multi-line commands.
350
- SupportedStyles:
351
- - backticks
352
- - percent_x
353
- - mixed
354
- # If false, the cop will always recommend using %x if one or more backticks
355
- # are found in the command string.
356
- AllowInnerBackticks: false
357
-
358
- # Checks formatting of special comments
359
- Style/CommentAnnotation:
360
- Keywords:
361
- - TODO
362
- - FIXME
363
- - OPTIMIZE
364
- - HACK
365
- - REVIEW
366
-
367
- Style/ConditionalAssignment:
368
- EnforcedStyle: assign_to_condition
369
- SupportedStyles:
370
- - assign_to_condition
371
- - assign_inside_condition
372
- # When configured to `assign_to_condition`, `SingleLineConditionsOnly`
373
- # will only register an offense when all branches of a condition are
374
- # a single line.
375
- # When configured to `assign_inside_condition`, `SingleLineConditionsOnly`
376
- # will only register an offense for assignment to a condition that has
377
- # at least one multiline branch.
378
- SingleLineConditionsOnly: true
379
-
380
- # Checks that you have put a copyright in a comment before any code.
381
- #
382
- # You can override the default Notice in your .rubocop.yml file.
383
- #
384
- # In order to use autocorrect, you must supply a value for the
385
- # AutocorrectNotice key that matches the regexp Notice. A blank
386
- # AutocorrectNotice will cause an error during autocorrect.
387
- #
388
- # Autocorrect will add a copyright notice in a comment at the top
389
- # of the file immediately after any shebang or encoding comments.
390
- #
391
- # Example rubocop.yml:
392
- #
393
- # Style/Copyright:
394
- # Enabled: true
395
- # Notice: 'Copyright (\(c\) )?2015 Yahoo! Inc'
396
- # AutocorrectNotice: "# Copyright (c) 2015 Yahoo! Inc."
397
- #
398
- Style/Copyright:
399
- Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
400
- AutocorrectNotice: ""
401
-
402
- Style/DocumentationMethod:
403
- RequireForNonPublicMethods: false
404
-
405
- # Multi-line method chaining should be done with leading dots.
406
- Layout/DotPosition:
407
- EnforcedStyle: leading
408
- SupportedStyles:
409
- - leading
410
- - trailing
411
-
412
- # Warn on empty else statements
413
- # empty - warn only on empty else
414
- # nil - warn on else with nil in it
415
- # both - warn on empty else and else with nil in it
416
- Style/EmptyElse:
417
- EnforcedStyle: both
418
- SupportedStyles:
419
- - empty
420
- - nil
421
- - both
422
-
423
- # Use empty lines between defs.
424
- Layout/EmptyLineBetweenDefs:
425
- # If true, this parameter means that single line method definitions don't
426
- # need an empty line between them.
427
- AllowAdjacentOneLineDefs: false
428
-
429
- Layout/EmptyLinesAroundBlockBody:
430
- EnforcedStyle: no_empty_lines
431
- SupportedStyles:
432
- - empty_lines
433
- - no_empty_lines
434
-
435
- Layout/EmptyLinesAroundClassBody:
436
- EnforcedStyle: no_empty_lines
437
- SupportedStyles:
438
- - empty_lines
439
- - no_empty_lines
440
-
441
- Layout/EmptyLinesAroundModuleBody:
442
- EnforcedStyle: no_empty_lines
443
- SupportedStyles:
444
- - empty_lines
445
- - no_empty_lines
446
-
447
- # Checks whether the source file has a utf-8 encoding comment or not
448
- # AutoCorrectEncodingComment must match the regex
449
- # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
450
- Style/Encoding:
451
- Enabled: true
452
-
453
- Layout/ExtraSpacing:
454
- # When true, allows most uses of extra spacing if the intent is to align
455
- # things with the previous or next line, not counting empty lines or comment
456
- # lines.
457
- AllowForAlignment: false
458
- # When true, forces the alignment of = in assignments on consecutive lines.
459
- ForceEqualSignAlignment: false
460
-
461
- Naming/FileName:
462
- Exclude:
463
- - "**/Gemfile"
464
- - "**/Rakefile"
465
- - "**/*.gemspec"
466
- - "decidim-dev/lib/decidim-dev.rb"
467
- # When true, requires that each source file should define a class or module
468
- # with a name which matches the file name (converted to ... case).
469
- # It further expects it to be nested inside modules which match the names
470
- # of subdirectories in its path.
471
- ExpectMatchingDefinition: false
472
- # If non-nil, expect all source file names to match the following regex.
473
- # Only the file name itself is matched, not the entire file path.
474
- # Use anchors as necessary if you want to match the entire name rather than
475
- # just a part of it.
476
- Regex: ~
477
- # With `IgnoreExecutableScripts` set to `true`, this cop does not
478
- # report offending filenames for executable scripts (i.e. source
479
- # files with a shebang in the first line).
480
- IgnoreExecutableScripts: true
481
-
482
- Layout/FirstArgumentIndentation:
483
- EnforcedStyle: special_for_inner_method_call_in_parentheses
484
- SupportedStyles:
485
- # The first parameter should always be indented one step more than the
486
- # preceding line.
487
- - consistent
488
- # The first parameter should normally be indented one step more than the
489
- # preceding line, but if it's a parameter for a method call that is itself
490
- # a parameter in a method call, then the inner parameter should be indented
491
- # relative to the inner method.
492
- - special_for_inner_method_call
493
- # Same as special_for_inner_method_call except that the special rule only
494
- # applies if the outer method call encloses its arguments in parentheses.
495
- - special_for_inner_method_call_in_parentheses
496
- # By default, the indentation width from Style/IndentationWidth is used
497
- # But it can be overridden by setting this parameter
498
- IndentationWidth: ~
499
-
500
- # Checks use of for or each in multiline loops.
501
- Style/For:
502
- EnforcedStyle: each
503
- SupportedStyles:
504
- - for
505
- - each
506
-
507
- # Enforce the method used for string formatting.
508
- Style/FormatString:
509
- EnforcedStyle: format
510
- SupportedStyles:
511
- - format
512
- - sprintf
513
- - percent
514
-
515
- Style/FormatStringToken:
516
- EnforcedStyle: template
517
-
518
- Style/FrozenStringLiteralComment:
519
- EnforcedStyle: always
520
- SupportedStyles:
521
- - never
522
- # `always` will always add the frozen string literal comment to a file
523
- # regardless of the Ruby version or if `freeze` or `<<` are called on a
524
- # string literal. If you run code against multiple versions of Ruby, it is
525
- # possible that this will create errors in Ruby 2.3.0+.
526
- - always
527
-
528
- # Built-in global variables are allowed by default.
529
- Style/GlobalVars:
530
- AllowedVariables: []
531
-
532
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
533
- # needs to have to trigger this cop
534
- Style/GuardClause:
535
- MinBodyLength: 6
536
-
537
- Style/HashSyntax:
538
- EnforcedStyle: ruby19
539
- SupportedStyles:
540
- # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
541
- - ruby19
542
- # checks for hash rocket syntax for all hashes
543
- - hash_rockets
544
- # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
545
- - no_mixed_keys
546
- # enforces both ruby19 and no_mixed_keys styles
547
- - ruby19_no_mixed_keys
548
- # Force hashes that have a symbol value to use hash rockets
549
- UseHashRocketsWithSymbolValues: false
550
- # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
551
- PreferHashRocketsForNonAlnumEndingSymbols: false
552
-
553
- Layout/IndentationConsistency:
554
- # The difference between `rails` and `normal` is that the `rails` style
555
- # prescribes that in classes and modules the `protected` and `private`
556
- # modifier keywords shall be indented the same as public methods and that
557
- # protected and private members shall be indented one step more than the
558
- # modifiers. Other than that, both styles mean that entities on the same
559
- # logical depth shall have the same indentation.
560
- EnforcedStyle: normal
561
- SupportedStyles:
562
- - normal
563
- - rails
564
-
565
- Layout/IndentationWidth:
566
- # Number of spaces for each indentation level.
567
- Width: 2
568
-
569
- # Checks the indentation of the first element in an array literal.
570
- Layout/FirstArrayElementIndentation:
571
- # The value `special_inside_parentheses` means that array literals with
572
- # brackets that have their opening bracket on the same line as a surrounding
573
- # opening round parenthesis, shall have their first element indented relative
574
- # to the first position inside the parenthesis.
575
- #
576
- # The value `consistent` means that the indentation of the first element shall
577
- # always be relative to the first position of the line where the opening
578
- # bracket is.
579
- #
580
- # The value `align_brackets` means that the indentation of the first element
581
- # shall always be relative to the position of the opening bracket.
582
- EnforcedStyle: special_inside_parentheses
583
- SupportedStyles:
584
- - special_inside_parentheses
585
- - consistent
586
- - align_brackets
587
- # By default, the indentation width from Style/IndentationWidth is used
588
- # But it can be overridden by setting this parameter
589
- IndentationWidth: ~
590
-
591
- # Checks the indentation of assignment RHS, when on a different line from LHS
592
- Layout/AssignmentIndentation:
593
- # By default, the indentation width from Style/IndentationWidth is used
594
- # But it can be overridden by setting this parameter
595
- IndentationWidth: ~
596
-
597
- # Checks the indentation of the first key in a hash literal.
598
- Layout/FirstHashElementIndentation:
599
- # The value `special_inside_parentheses` means that hash literals with braces
600
- # that have their opening brace on the same line as a surrounding opening
601
- # round parenthesis, shall have their first key indented relative to the
602
- # first position inside the parenthesis.
603
- #
604
- # The value `consistent` means that the indentation of the first key shall
605
- # always be relative to the first position of the line where the opening
606
- # brace is.
607
- #
608
- # The value `align_braces` means that the indentation of the first key shall
609
- # always be relative to the position of the opening brace.
610
- EnforcedStyle: special_inside_parentheses
611
- SupportedStyles:
612
- - special_inside_parentheses
613
- - consistent
614
- - align_braces
615
- # By default, the indentation width from Style/IndentationWidth is used
616
- # But it can be overridden by setting this parameter
617
- IndentationWidth: ~
618
-
619
- Style/Lambda:
620
- EnforcedStyle: line_count_dependent
621
- SupportedStyles:
622
- - line_count_dependent
623
- - lambda
624
- - literal
625
- Exclude:
626
- - "**/types/**/*"
627
- - "**/*_interface.rb"
628
-
629
- Style/LambdaCall:
630
- EnforcedStyle: call
631
- SupportedStyles:
632
- - call
633
- - braces
634
-
635
- Style/Next:
636
- # With `always` all conditions at the end of an iteration needs to be
637
- # replaced by next - with `skip_modifier_ifs` the modifier if like this one
638
- # are ignored: [1, 2].each { |a| return "yes" if a == 1 }
639
- EnforcedStyle: skip_modifier_ifs
640
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
641
- # needs to have to trigger this cop
642
- MinBodyLength: 3
643
- SupportedStyles:
644
- - skip_modifier_ifs
645
- - always
646
-
647
- Style/NonNilCheck:
648
- # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
649
- # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
650
- # **usually** OK, but might change behavior.
651
- #
652
- # With `IncludeSemanticChanges` set to `false`, this cop does not report
653
- # offenses for `!x.nil?` and does no changes that might change behavior.
654
- IncludeSemanticChanges: false
655
-
656
- Style/NumericPredicate:
657
- EnforcedStyle: predicate
658
- SupportedStyles:
659
- - predicate
660
- - comparison
661
-
662
- Style/MethodDefParentheses:
663
- EnforcedStyle: require_parentheses
664
- SupportedStyles:
665
- - require_parentheses
666
- - require_no_parentheses
667
- - require_no_parentheses_except_multiline
668
-
669
- Naming/MethodName:
670
- EnforcedStyle: snake_case
671
- SupportedStyles:
672
- - snake_case
673
- - camelCase
674
-
675
- Style/ModuleFunction:
676
- EnforcedStyle: module_function
677
- SupportedStyles:
678
- - module_function
679
- - extend_self
680
-
681
- Layout/MultilineArrayBraceLayout:
682
- EnforcedStyle: symmetrical
683
- SupportedStyles:
684
- # symmetrical: closing brace is positioned in same way as opening brace
685
- # new_line: closing brace is always on a new line
686
- # same_line: closing brace is always on the same line as last element
687
- - symmetrical
688
- - new_line
689
- - same_line
690
-
691
- Layout/MultilineAssignmentLayout:
692
- # The types of assignments which are subject to this rule.
693
- SupportedTypes:
694
- - block
695
- - case
696
- - class
697
- - if
698
- - kwbegin
699
- - module
700
- EnforcedStyle: new_line
701
- SupportedStyles:
702
- # Ensures that the assignment operator and the rhs are on the same line for
703
- # the set of supported types.
704
- - same_line
705
- # Ensures that the assignment operator and the rhs are on separate lines
706
- # for the set of supported types.
707
- - new_line
708
-
709
- Layout/MultilineHashBraceLayout:
710
- EnforcedStyle: symmetrical
711
- SupportedStyles:
712
- # symmetrical: closing brace is positioned in same way as opening brace
713
- # new_line: closing brace is always on a new line
714
- # same_line: closing brace is always on same line as last element
715
- - symmetrical
716
- - new_line
717
- - same_line
718
-
719
- Layout/MultilineMethodCallBraceLayout:
720
- EnforcedStyle: symmetrical
721
- SupportedStyles:
722
- # symmetrical: closing brace is positioned in same way as opening brace
723
- # new_line: closing brace is always on a new line
724
- # same_line: closing brace is always on the same line as last argument
725
- - symmetrical
726
- - new_line
727
- - same_line
728
-
729
- Layout/MultilineMethodCallIndentation:
730
- EnforcedStyle: aligned
731
- SupportedStyles:
732
- - aligned
733
- - indented
734
- - indented_relative_to_receiver
735
- # By default, the indentation width from Style/IndentationWidth is used
736
- # But it can be overridden by setting this parameter
737
- IndentationWidth: ~
738
-
739
- Layout/MultilineMethodDefinitionBraceLayout:
740
- EnforcedStyle: symmetrical
741
- SupportedStyles:
742
- # symmetrical: closing brace is positioned in same way as opening brace
743
- # new_line: closing brace is always on a new line
744
- # same_line: closing brace is always on the same line as last parameter
745
- - symmetrical
746
- - new_line
747
- - same_line
748
-
749
- Layout/MultilineOperationIndentation:
750
- EnforcedStyle: aligned
751
- SupportedStyles:
752
- - aligned
753
- - indented
754
- # By default, the indentation width from Style/IndentationWidth is used
755
- # But it can be overridden by setting this parameter
756
- IndentationWidth: ~
757
-
758
- Style/NumericLiterals:
759
- MinDigits: 5
760
-
761
- Style/NumericLiteralPrefix:
762
- EnforcedOctalStyle: zero_with_o
763
- SupportedOctalStyles:
764
- - zero_with_o
765
- - zero_only
766
-
767
- Style/OptionHash:
768
- # A list of parameter names that will be flagged by this cop.
769
- SuspiciousParamNames:
770
- - options
771
- - opts
772
- - args
773
- - params
774
- - parameters
775
-
776
- # Allow safe assignment in conditions.
777
- Style/ParenthesesAroundCondition:
778
- AllowSafeAssignment: true
779
-
780
- Style/PercentLiteralDelimiters:
781
- PreferredDelimiters:
782
- "%": ()
783
- "%i": ()
784
- "%q": ()
785
- "%Q": ()
786
- "%r": "{}"
787
- "%s": ()
788
- "%w": ()
789
- "%W": ()
790
- "%x": ()
791
-
792
- Style/PercentQLiterals:
793
- EnforcedStyle: lower_case_q
794
- SupportedStyles:
795
- - lower_case_q # Use %q when possible, %Q when necessary
796
- - upper_case_q # Always use %Q
797
-
798
- Style/SlicingWithRange:
799
- Enabled: false
800
-
801
- Naming/PredicateName:
802
- # Predicate name prefixes.
803
- NamePrefix:
804
- - is_
805
- - has_
806
- - have_
807
- # Predicate name prefixes that should be removed.
808
- ForbiddenPrefixes:
809
- - is_
810
- - have_
811
- # Predicate names which, despite having a blacklisted prefix, or no ?,
812
- # should still be accepted
813
- AllowedMethods:
814
- - is_a?
815
- # Exclude Rspec specs because there is a strong convetion to write spec
816
- # helpers in the form of `have_something` or `be_something`.
817
- Exclude:
818
- - "**/spec/**/*"
819
- - "**/test/**/*"
820
-
821
- Style/PreferredHashMethods:
822
- Enabled: true
823
- EnforcedStyle: verbose
824
-
825
- Style/DateTime:
826
- Enabled: true
827
-
828
- Style/Documentation:
829
- Enabled: false
830
-
831
- Style/RaiseArgs:
832
- EnforcedStyle: exploded
833
- SupportedStyles:
834
- - compact # raise Exception.new(msg)
835
- - exploded # raise Exception, msg
836
-
837
- Style/RedundantReturn:
838
- # When true allows code like `return x, y`.
839
- AllowMultipleReturnValues: false
840
-
841
- # Use / or %r around regular expressions.
842
- Style/RegexpLiteral:
843
- EnforcedStyle: slashes
844
- # slashes: Always use slashes.
845
- # percent_r: Always use %r.
846
- # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
847
- SupportedStyles:
848
- - slashes
849
- - percent_r
850
- - mixed
851
- # If false, the cop will always recommend using %r if one or more slashes
852
- # are found in the regexp string.
853
- AllowInnerSlashes: false
854
-
855
- Style/SafeNavigation:
856
- Enabled: false
857
-
858
- Style/Semicolon:
859
- # Allow ; to separate several expressions on the same line.
860
- AllowAsExpressionSeparator: false
861
-
862
- Style/SignalException:
863
- EnforcedStyle: only_raise
864
- SupportedStyles:
865
- - only_raise
866
- - only_fail
867
- - semantic
868
-
869
- Style/SingleLineBlockParams:
870
- Methods:
871
- - reduce:
872
- - a
873
- - e
874
- - inject:
875
- - a
876
- - e
877
-
878
- Style/SingleLineMethods:
879
- AllowIfMethodIsEmpty: true
880
-
881
- Layout/SpaceBeforeFirstArg:
882
- # When true, allows most uses of extra spacing if the intent is to align
883
- # things with the previous or next line, not counting empty lines or comment
884
- # lines.
885
- AllowForAlignment: true
886
-
887
- Style/SpecialGlobalVars:
888
- EnforcedStyle: use_english_names
889
- SupportedStyles:
890
- - use_perl_names
891
- - use_english_names
892
-
893
- Style/StabbyLambdaParentheses:
894
- EnforcedStyle: require_parentheses
895
- SupportedStyles:
896
- - require_parentheses
897
- - require_no_parentheses
898
-
899
- Style/StringLiterals:
900
- EnforcedStyle: double_quotes
901
- SupportedStyles:
902
- - single_quotes
903
- - double_quotes
904
- # If true, strings which span multiple lines using \ for continuation must
905
- # use the same type of quotes on each line.
906
- ConsistentQuotesInMultiline: false
907
-
908
- Style/StringLiteralsInInterpolation:
909
- EnforcedStyle: double_quotes
910
- SupportedStyles:
911
- - single_quotes
912
- - double_quotes
913
-
914
- Style/StringMethods:
915
- # Mapping from undesired method to desired_method
916
- # e.g. to use `to_sym` over `intern`:
917
- #
918
- # StringMethods:
919
- # PreferredMethods:
920
- # intern: to_sym
921
- PreferredMethods:
922
- intern: to_sym
923
-
924
- Layout/SpaceAroundBlockParameters:
925
- EnforcedStyleInsidePipes: no_space
926
-
927
- Layout/SpaceAroundEqualsInParameterDefault:
928
- EnforcedStyle: space
929
- SupportedStyles:
930
- - space
931
- - no_space
932
-
933
- Layout/SpaceAroundOperators:
934
- # When true, allows most uses of extra spacing if the intent is to align
935
- # with an operator on the previous or next line, not counting empty lines
936
- # or comment lines.
937
- AllowForAlignment: true
938
-
939
- Layout/SpaceBeforeBlockBraces:
940
- EnforcedStyle: space
941
- SupportedStyles:
942
- - space
943
- - no_space
944
-
945
- Layout/SpaceInsideBlockBraces:
946
- EnforcedStyle: space
947
- SupportedStyles:
948
- - space
949
- - no_space
950
- # Valid values are: space, no_space
951
- EnforcedStyleForEmptyBraces: no_space
952
- # Space between { and |. Overrides EnforcedStyle if there is a conflict.
953
- SpaceBeforeBlockParameters: true
954
-
955
- Layout/SpaceInsideHashLiteralBraces:
956
- EnforcedStyle: space
957
- EnforcedStyleForEmptyBraces: no_space
958
- SupportedStyles:
959
- - space
960
- - no_space
961
- # "compact" normally requires a space inside hash braces, with the exception
962
- # that successive left braces or right braces are collapsed together
963
- - compact
964
-
965
- Layout/SpaceInsideStringInterpolation:
966
- EnforcedStyle: no_space
967
- SupportedStyles:
968
- - space
969
- - no_space
970
-
971
- Style/AccessModifierDeclarations:
972
- Enabled: false
973
-
974
- Style/SymbolArray:
975
- EnforcedStyle: brackets
976
- SupportedStyles:
977
- - percent
978
- - brackets
979
-
980
- Style/SymbolProc:
981
- # A list of method names to be ignored by the check.
982
- # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
983
- IgnoredMethods:
984
- - respond_to
985
- - define_method
986
-
987
- Style/TernaryParentheses:
988
- EnforcedStyle: require_no_parentheses
989
- SupportedStyles:
990
- - require_parentheses
991
- - require_no_parentheses
992
- AllowSafeAssignment: true
993
-
994
- Layout/TrailingEmptyLines:
995
- EnforcedStyle: final_newline
996
- SupportedStyles:
997
- - final_newline
998
- - final_blank_line
999
-
1000
- Style/TrailingCommaInArguments:
1001
- # If `comma`, the cop requires a comma after the last argument, but only for
1002
- # parenthesized method calls where each argument is on its own line.
1003
- # If `consistent_comma`, the cop requires a comma after the last argument,
1004
- # for all parenthesized method calls with arguments.
1005
- EnforcedStyleForMultiline: no_comma
1006
-
1007
- Style/TrailingCommaInArrayLiteral:
1008
- # If `comma`, the cop requires a comma after the last item in an array or
1009
- # hash, but only when each item is on its own line.
1010
- # If `consistent_comma`, the cop requires a comma after the last item of all
1011
- # non-empty array and hash literals.
1012
- EnforcedStyleForMultiline: no_comma
1013
-
1014
- Style/TrailingCommaInHashLiteral:
1015
- # If `comma`, the cop requires a comma after the last item in an array or
1016
- # hash, but only when each item is on its own line.
1017
- # If `consistent_comma`, the cop requires a comma after the last item of all
1018
- # non-empty array and hash literals.
1019
- EnforcedStyleForMultiline: no_comma
1020
-
1021
- # TrivialAccessors requires exact name matches and doesn't allow
1022
- # predicated methods by default.
1023
- Style/TrivialAccessors:
1024
- # When set to false the cop will suggest the use of accessor methods
1025
- # in situations like:
1026
- #
1027
- # def name
1028
- # @other_name
1029
- # end
1030
- #
1031
- # This way you can uncover "hidden" attributes in your code.
1032
- ExactNameMatch: true
1033
- AllowPredicates: true
1034
- # Allows trivial writers that don't end in an equal sign. e.g.
1035
- #
1036
- # def on_exception(action)
1037
- # @on_exception=action
1038
- # end
1039
- # on_exception :restart
1040
- #
1041
- # Commonly used in DSLs
1042
- AllowDSLWriters: false
1043
- IgnoreClassMethods: false
1044
- AllowedMethods:
1045
- - to_ary
1046
- - to_a
1047
- - to_c
1048
- - to_enum
1049
- - to_h
1050
- - to_hash
1051
- - to_i
1052
- - to_int
1053
- - to_io
1054
- - to_open
1055
- - to_path
1056
- - to_proc
1057
- - to_r
1058
- - to_regexp
1059
- - to_str
1060
- - to_s
1061
- - to_sym
1062
-
1063
- Naming/VariableName:
1064
- EnforcedStyle: snake_case
1065
- SupportedStyles:
1066
- - snake_case
1067
- - camelCase
1068
-
1069
- Naming/VariableNumber:
1070
- EnforcedStyle: normalcase
1071
- SupportedStyles:
1072
- - snake_case
1073
- - normalcase
1074
- - non_integer
1075
-
1076
- # WordArray enforces how array literals of word-like strings should be expressed.
1077
- Style/WordArray:
1078
- EnforcedStyle: percent
1079
- SupportedStyles:
1080
- # percent style: %w(word1 word2)
1081
- - percent
1082
- # bracket style: ["word1", "word2"]
1083
- - brackets
1084
- # The MinSize option causes the WordArray rule to be ignored for arrays
1085
- # smaller than a certain size. The rule is only applied to arrays
1086
- # whose element count is greater than or equal to MinSize.
1087
- MinSize: 2
1088
- # The regular expression WordRegex decides what is considered a word.
1089
- WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1090
-
1091
- ##################### Metrics ##################################
1092
-
1093
- Metrics/AbcSize:
1094
- # The ABC size is a calculated magnitude, so this number can be an Integer or
1095
- # a Float.
1096
- Max: 15
1097
- Enabled: false
1098
-
1099
- Metrics/BlockNesting:
1100
- Max: 3
1101
-
1102
- Metrics/ClassLength:
1103
- CountComments: false # count full line comments?
1104
- Max: 100
1105
- Enabled: false
1106
-
1107
- Metrics/ModuleLength:
1108
- CountComments: false # count full line comments?
1109
- Max: 100
1110
- Enabled: false
1111
-
1112
- # Avoid complex methods.
1113
- Metrics/CyclomaticComplexity:
1114
- Max: 9
1115
- Exclude:
1116
- - "bin/bundle"
1117
- - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb"
1118
- - "**/*/dummy_authorization_handler.rb"
1119
- - "**/*/permissions.rb"
1120
-
1121
- Metrics/MethodLength:
1122
- CountComments: false # count full line comments?
1123
- Max: 15
1124
- Enabled: false
1125
-
1126
- Metrics/ParameterLists:
1127
- Max: 5
1128
- CountKeywordArgs: true
1129
- Exclude:
1130
- - "decidim-core/lib/decidim/filter_form_builder.rb"
1131
-
1132
- Metrics/PerceivedComplexity:
1133
- Max: 10
1134
- Exclude:
1135
- - "decidim-admin/app/queries/decidim/admin/newsletter_recipients.rb"
1136
- - "**/*/dummy_authorization_handler.rb"
1137
- - "**/*/permissions.rb"
1138
-
1139
- ##################### Lint ##################################
1140
-
1141
- Lint/AmbiguousBlockAssociation:
1142
- Enabled: true
1143
- Exclude:
1144
- - "**/abilities/**/*"
1145
-
1146
- # Allow safe assignment in conditions.
1147
- Lint/AssignmentInCondition:
1148
- AllowSafeAssignment: true
1149
-
1150
- Lint/ConstantDefinitionInBlock:
1151
- Enabled: false
1152
-
1153
- # Call super to initialize state of the parent class.
1154
- Lint/MissingSuper:
1155
- Enabled: false
1156
-
1157
- # checks whether the end keywords are aligned properly for `do` `end` blocks.
1158
- Layout/BlockAlignment:
1159
- # The value `start_of_block` means that the `end` should be aligned with line
1160
- # where the `do` keyword appears.
1161
- # The value `start_of_line` means it should be aligned with the whole
1162
- # expression's starting line.
1163
- # The value `either` means both are allowed.
1164
- EnforcedStyleAlignWith: either
1165
-
1166
- # Align ends correctly.
1167
- Layout/EndAlignment:
1168
- # The value `keyword` means that `end` should be aligned with the matching
1169
- # keyword (if, while, etc.).
1170
- # The value `variable` means that in assignments, `end` should be aligned
1171
- # with the start of the variable on the left hand side of `=`. In all other
1172
- # situations, `end` should still be aligned with the keyword.
1173
- # The value `start_of_line` means that `end` should be aligned with the start
1174
- # of the line which the matching keyword appears on.
1175
- EnforcedStyleAlignWith: keyword
1176
- AutoCorrect: false
1177
-
1178
- Layout/DefEndAlignment:
1179
- # The value `def` means that `end` should be aligned with the def keyword.
1180
- # The value `start_of_line` means that `end` should be aligned with method
1181
- # calls like `private`, `public`, etc, if present in front of the `def`
1182
- # keyword on the same line.
1183
- EnforcedStyleAlignWith: start_of_line
1184
- AutoCorrect: false
1185
-
1186
- Lint/InheritException:
1187
- # The default base class in favour of `Exception`.
1188
- EnforcedStyle: runtime_error
1189
- SupportedStyles:
1190
- - runtime_error
1191
- - standard_error
1192
-
1193
- Layout/LineLength:
1194
- Max: 180
1195
- # To make it possible to copy or click on URIs in the code, we allow lines
1196
- # containing a URI to be longer than Max.
1197
- AllowHeredoc: true
1198
- AllowURI: true
1199
- URISchemes:
1200
- - http
1201
- - https
1202
- Exclude:
1203
- - "**/spec/**/*"
1204
-
1205
- # Checks for unused block arguments
1206
- Lint/UnusedBlockArgument:
1207
- IgnoreEmptyBlocks: true
1208
- AllowUnusedKeywordArguments: false
1209
-
1210
- # Checks for unused method arguments.
1211
- Lint/UnusedMethodArgument:
1212
- AllowUnusedKeywordArguments: false
1213
- IgnoreEmptyMethods: true
1214
-
1215
- ##################### Performance ############################
1216
-
1217
- Metrics/BlockLength:
1218
- Enabled: false
1219
-
1220
- RSpec/BeforeAfterAll:
1221
- Enabled: true
1222
-
1223
- RSpec/ContextWording:
1224
- Enabled: true
1225
- Prefixes:
1226
- - when
1227
- - with
1228
- - without
1229
- - and
1230
-
1231
- RSpec/DescribeClass:
1232
- Exclude:
1233
- - spec/gemfiles_spec.rb
1234
- - spec/webpacker_spec.rb
1235
- - spec/i18n_spec.rb
1236
- - "**/*/spec/**/*_badge_spec.rb"
1237
- - decidim-core/spec/lib/global_engines_spec.rb
1238
- - "**/tasks/**/*"
1239
-
1240
- RSpec/EmptyExampleGroup:
1241
- Exclude:
1242
- - decidim-core/spec/lib/participatory_space_manifest_spec.rb
1243
-
1244
- RSpec/ExampleLength:
1245
- Max: 49
1246
-
1247
- RSpec/ExpectInHook:
1248
- Enabled: false
1249
-
1250
- RSpec/IteratedExpectation:
1251
- Enabled: true
1252
-
1253
- RSpec/LetSetup:
1254
- Enabled: false
1255
-
1256
- RSpec/MessageSpies:
1257
- Enabled: false
1258
-
1259
- RSpec/MultipleExpectations:
1260
- Enabled: false
1261
-
1262
- RSpec/MultipleMemoizedHelpers:
1263
- Max: 35
1264
- Exclude:
1265
- - decidim-assemblies/spec/forms/assembly_form_spec.rb
1266
-
1267
- RSpec/NestedGroups:
1268
- Max: 7
1269
-
1270
- RSpec/NamedSubject:
1271
- Enabled: false
1272
-
1273
- RSpec/RepeatedExampleGroupDescription:
1274
- Enabled: true
1275
-
1276
- RSpec/RepeatedExampleGroupBody:
1277
- Enabled: true
1278
-
1279
- RSpec/VerifiedDoubles:
1280
- Enabled: false
1281
-
1282
- RSpec/LeakyConstantDeclaration:
1283
- Enabled: false
1284
-
1285
- RSpec/DescribedClass:
1286
- Enabled: false
1287
-
1288
- # This is the default configuration file.
1289
-
1290
- Faker/DeprecatedArguments:
1291
- Description: 'Checks that Faker arguments style is based on Faker 2.'
1292
- Enabled: true
1293
- VersionAdded: '0.1'
1294
- Reference: 'https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md#v20-2019-31-07'
1295
- ArgumentKeywords:
1296
- #
1297
- # FakerClassName:
1298
- # method_name:
1299
- # - keyword_name_for_first_argument
1300
- # - keyword_name_for_second_argument
1301
- # - keyword_name_for_third_argument
1302
- #
1303
- Faker::Dune:
1304
- quote:
1305
- - character
1306
- saying:
1307
- - source
1308
- Faker::Books::Lovecraft:
1309
- fhtagn:
1310
- - number
1311
- sentence:
1312
- - word_count
1313
- - random_words_to_add
1314
- words:
1315
- - number
1316
- - spaces_allowed
1317
- sentences:
1318
- - number
1319
- paragraph:
1320
- - sentence_count
1321
- - random_sentences_to_add
1322
- paragraphs:
1323
- - number
1324
- paragraph_by_chars:
1325
- - characters
1326
- Faker::Address:
1327
- city:
1328
- - options
1329
- street_address:
1330
- - include_secondary
1331
- zip_code:
1332
- - state_abbreviation
1333
- country_by_code:
1334
- - code
1335
- country_name_to_code:
1336
- - name
1337
- Faker::Alphanumeric:
1338
- alpha:
1339
- - number
1340
- alphanumeric:
1341
- - number
1342
- Faker::App:
1343
- semantic_version:
1344
- - major
1345
- - minor
1346
- - patch
1347
- Faker::Avatar:
1348
- image:
1349
- - slug
1350
- - size
1351
- - format
1352
- - set
1353
- - bgset
1354
- Faker::Bank:
1355
- account_number:
1356
- - digits
1357
- iban:
1358
- - country_code
1359
- Faker::Boolean:
1360
- boolean:
1361
- - true_ratio
1362
- Faker::ChileRut:
1363
- rut:
1364
- - min_rut
1365
- - fixed
1366
- full_rut:
1367
- - min_rut
1368
- - fixed
1369
- Faker::Code:
1370
- isbn:
1371
- - base
1372
- ean:
1373
- - base
1374
- nric:
1375
- - min_age
1376
- - max_age
1377
- Faker::Commerce:
1378
- promotion_code:
1379
- - digits
1380
- department:
1381
- - max
1382
- - fixed_amount
1383
- price:
1384
- - range
1385
- - as_string
1386
- Faker::Company:
1387
- polish_register_of_national_economy:
1388
- - length
1389
- brazilian_company_number:
1390
- - formatted
1391
- Faker::CryptoCoin:
1392
- coin_name:
1393
- - coin
1394
- acronym:
1395
- - coin
1396
- url_logo:
1397
- - coin
1398
- Faker::Date:
1399
- between:
1400
- - from
1401
- - to
1402
- between_except:
1403
- - from
1404
- - to
1405
- - excepted
1406
- forward:
1407
- - days
1408
- backward:
1409
- - days
1410
- birthday:
1411
- - min_age
1412
- - max_age
1413
- Faker::Demographic:
1414
- height:
1415
- - unit
1416
- Faker::DrivingLicence:
1417
- british_driving_licence:
1418
- - last_name
1419
- - initials
1420
- - gender
1421
- - date_of_birth
1422
- Faker::File:
1423
- dir:
1424
- - segment_count
1425
- - root
1426
- - directory_separator
1427
- file_name:
1428
- - dir
1429
- - name
1430
- - ext
1431
- - directory_separator
1432
- Faker::Fillmurray:
1433
- image:
1434
- - grayscale
1435
- - width
1436
- - height
1437
- Faker::Finance:
1438
- vat_number:
1439
- - country
1440
- Faker::Hipster:
1441
- words:
1442
- - number
1443
- - supplemental
1444
- - spaces_allowed
1445
- sentence:
1446
- - word_count
1447
- - supplemental
1448
- - random_words_to_add
1449
- sentences:
1450
- - number
1451
- - supplemental
1452
- paragraph:
1453
- - sentence_count
1454
- - supplemental
1455
- - random_sentences_to_add
1456
- paragraphs:
1457
- - number
1458
- - supplemental
1459
- paragraph_by_chars:
1460
- - characters
1461
- - supplemental
1462
- Faker::IDNumber:
1463
- brazilian_citizen_number:
1464
- - formatted
1465
- brazilian_id:
1466
- - formatted
1467
- Faker::Internet:
1468
- email:
1469
- - name
1470
- - separators
1471
- free_email:
1472
- - name
1473
- safe_email:
1474
- - name
1475
- username:
1476
- - specifier
1477
- - separators
1478
- password:
1479
- - min_length
1480
- - max_length
1481
- - mix_case
1482
- - special_characters
1483
- domain_name:
1484
- - subdomain
1485
- fix_umlauts:
1486
- - string
1487
- mac_address:
1488
- - prefix
1489
- url:
1490
- - host
1491
- - path
1492
- - scheme
1493
- slug:
1494
- - words
1495
- - glue
1496
- user_agent:
1497
- - vendor
1498
- Faker::Invoice:
1499
- amount_between:
1500
- - from
1501
- - to
1502
- creditor_reference:
1503
- - ref
1504
- reference:
1505
- - ref
1506
- Faker::Json:
1507
- shallow_json:
1508
- - width
1509
- - options
1510
- add_depth_to_json:
1511
- - json
1512
- - width
1513
- - options
1514
- Faker::Lorem:
1515
- words:
1516
- - number
1517
- - supplemental
1518
- characters:
1519
- - number
1520
- sentence:
1521
- - word_count
1522
- - supplemental
1523
- - random_words_to_add
1524
- sentences:
1525
- - number
1526
- - supplemental
1527
- paragraph:
1528
- - sentence_count
1529
- - supplemental
1530
- - random_sentences_to_add
1531
- paragraphs:
1532
- - number
1533
- - supplemental
1534
- paragraph_by_chars:
1535
- - number
1536
- - supplemental
1537
- question:
1538
- - word_count
1539
- - supplemental
1540
- - random_words_to_add
1541
- questions:
1542
- - number
1543
- - supplemental
1544
- Faker::LoremFlickr:
1545
- image:
1546
- - size
1547
- - search_terms
1548
- - match_all
1549
- grayscale_image:
1550
- - size
1551
- - search_terms
1552
- - match_all
1553
- pixelated_image:
1554
- - size
1555
- - search_terms
1556
- - match_all
1557
- colorized_image:
1558
- - size
1559
- - color
1560
- - search_terms
1561
- - match_all
1562
- Faker::LoremPixel:
1563
- image:
1564
- - size
1565
- - is_gray
1566
- - category
1567
- - number
1568
- - text
1569
- - secure
1570
- Faker::Markdown:
1571
- sandwich:
1572
- - sentences
1573
- - repeat
1574
- Faker::Measurement:
1575
- height:
1576
- - amount
1577
- length:
1578
- - amount
1579
- volume:
1580
- - amount
1581
- weight:
1582
- - amount
1583
- metric_height:
1584
- - amount
1585
- metric_length:
1586
- - amount
1587
- metric_volume:
1588
- - amount
1589
- metric_weight:
1590
- - amount
1591
- Faker::Name:
1592
- initials:
1593
- - number
1594
- Faker::NationalHealthService:
1595
- check_digit:
1596
- - number
1597
- Faker::Number:
1598
- number:
1599
- - digits
1600
- leading_zero_number:
1601
- - digits
1602
- decimal_part:
1603
- - digits
1604
- decimal:
1605
- - l_digits
1606
- - r_digits
1607
- hexadecimal:
1608
- - digits
1609
- normal:
1610
- - mean
1611
- - standard_deviation
1612
- between:
1613
- - from
1614
- - to
1615
- within:
1616
- - range
1617
- positive:
1618
- - from
1619
- - to
1620
- negative:
1621
- - from
1622
- - to
1623
- Faker::Omniauth:
1624
- google:
1625
- - name
1626
- - email
1627
- - uid
1628
- facebook:
1629
- - name
1630
- - email
1631
- - username
1632
- - uid
1633
- twitter:
1634
- - name
1635
- - nickname
1636
- - uid
1637
- linkedin:
1638
- - name
1639
- - email
1640
- - uid
1641
- github:
1642
- - name
1643
- - email
1644
- - uid
1645
- Faker::PhoneNumber:
1646
- subscriber_number:
1647
- - length
1648
- Faker::Placeholdit:
1649
- image:
1650
- - size
1651
- - format
1652
- - background_color
1653
- - text_color
1654
- - text
1655
- Faker::Relationship:
1656
- familial:
1657
- - connection
1658
- Faker::Source:
1659
- hello_world:
1660
- - lang
1661
- print:
1662
- - str
1663
- - lang
1664
- print_1_to_10:
1665
- - lang
1666
- Faker::String:
1667
- random:
1668
- - length
1669
- Faker::Stripe:
1670
- valid_card:
1671
- - card_type
1672
- valid_token:
1673
- - card_type
1674
- invalid_card:
1675
- - card_error
1676
- ccv:
1677
- - card_type
1678
- Faker::Time:
1679
- between:
1680
- - from
1681
- - to
1682
- - format
1683
- between_dates:
1684
- - from
1685
- - to
1686
- - period
1687
- - format
1688
- forward:
1689
- - days
1690
- - period
1691
- - format
1692
- backward:
1693
- - days
1694
- - period
1695
- - format
1696
- Faker::Twitter:
1697
- user:
1698
- - include_status
1699
- - include_email
1700
- status:
1701
- - include_user
1702
- - include_photo
1703
- status_entities:
1704
- - include_photo
1705
- Faker::Types:
1706
- rb_string:
1707
- - words
1708
- rb_integer:
1709
- - from
1710
- - to
1711
- rb_hash:
1712
- - number
1713
- - type
1714
- complex_rb_hash:
1715
- - number
1716
- rb_array:
1717
- - len
1718
- Faker::Vehicle:
1719
- model:
1720
- - make_of_model
1721
- mileage:
1722
- - min
1723
- - max
1724
- license_plate:
1725
- - state_abbreviation
1726
- Faker::WorldCup:
1727
- group:
1728
- - group
1729
- roster:
1730
- - country
1731
- - type
1732
- Faker::Dota:
1733
- quote:
1734
- - hero
1735
- Faker::Movies::StarWars:
1736
- quote:
1737
- - character
1738
- Decidim::Faker::Localized:
1739
- words:
1740
- - number
1741
- - supplemental
1742
- characters:
1743
- - number
1744
- sentence:
1745
- - word_count
1746
- - supplemental
1747
- - random_words_to_add
1748
- sentences:
1749
- - number
1750
- - supplemental
1751
- paragraph:
1752
- - sentence_count
1753
- - supplemental
1754
- - random_sentences_to_add
1755
- paragraphs:
1756
- - number
1757
- - supplemental
1758
- paragraph_by_chars:
1759
- - number
1760
- - supplemental
1761
- question:
1762
- - word_count
1763
- - supplemental
1764
- - random_words_to_add
1765
- questions:
1766
- - number
1767
- - supplemental