vedeu 0.4.11 → 0.4.12

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