seira 0.3.3 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee194647d3997370da2e9494debbfc5348064e26
4
- data.tar.gz: 8b77f1bc88782a90081fc930615f261f6a40f971
3
+ metadata.gz: e19f827caaab752c1d4f5c34652a53944b348be2
4
+ data.tar.gz: c8d99fac4458d819795c89ad206ffc388018bdf8
5
5
  SHA512:
6
- metadata.gz: e4dde3d0e4310683be3ec407d8090799319b88f6ca97eea0bb3a27748e52d7d8c2972533f2f56c9a2e3ef952eccf39b302988bcbe213e7057294c0ca2189c50e
7
- data.tar.gz: bbfc6070333c8852503003a73435a150f216cb9b8ab4e0237b57171d274ab16b56be2cb386821d5fcf75bd496f487c8855b3fbaa2d186a4b6d966d399d2d00fa
6
+ metadata.gz: 9747a24e09a7f6bcbc88413bbeb7798988b94fac3be09743a0596f7feb47a665a762345dbc8269bf66c0bf20758586e1714fa8230181cfd411f8a5dc9088aa2f
7
+ data.tar.gz: 169e02c84920de4f465ecf20e5bdeba15bb66569a41f50b564b20c61b52b5a3f403e29f6a48629d95ad20bb9fda557ac4d370aa399b014d4b0c078f05b1c7864
data/.default-rubocop.yml CHANGED
@@ -5,8 +5,11 @@
5
5
  AllCops:
6
6
  # Include common Ruby source files.
7
7
  Include:
8
+ - '**/*.arb'
9
+ - '**/*.axlsx'
8
10
  - '**/*.builder'
9
11
  - '**/*.fcgi'
12
+ - '**/*.gemfile'
10
13
  - '**/*.gemspec'
11
14
  - '**/*.god'
12
15
  - '**/*.jb'
@@ -53,12 +56,13 @@ AllCops:
53
56
  Exclude:
54
57
  - 'node_modules/**/*'
55
58
  - 'vendor/**/*'
59
+ - '.git/**/*'
56
60
  # Default formatter will be used if no `-f/--format` option is given.
57
61
  DefaultFormatter: progress
58
- # Cop names are not displayed in offense messages by default. Change behavior
59
- # by overriding DisplayCopNames, or by giving the `-D/--display-cop-names`
62
+ # Cop names are displayed in offense messages by default. Change behavior
63
+ # by overriding DisplayCopNames, or by giving the `--no-display-cop-names`
60
64
  # option.
61
- DisplayCopNames: false
65
+ DisplayCopNames: true
62
66
  # Style guide URLs are not displayed in offense messages by default. Change
63
67
  # behavior by overriding `DisplayStyleGuide`, or by giving the
64
68
  # `-S/--display-style-guide` option.
@@ -107,11 +111,24 @@ AllCops:
107
111
  AllowSymlinksInCacheRootDirectory: false
108
112
  # What MRI version of the Ruby interpreter is the inspected code intended to
109
113
  # run on? (If there is more than one, set this to the lowest version.)
110
- # If a value is specified for TargetRubyVersion then it is used.
111
- # Else if .ruby-version exists and it contains an MRI version it is used.
112
- # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
114
+ # If a value is specified for TargetRubyVersion then it is used. Acceptable
115
+ # values are specificed as a float (i.e. 2.5); the teeny version of Ruby
116
+ # should not be included. If the project specifies a Ruby version in the
117
+ # .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
118
+ # the desired version of Ruby by inspecting the .ruby-version file first,
119
+ # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
120
+ # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
121
+ # from the lock file.) If the Ruby version is still unresolved, RuboCop will
122
+ # use the oldest officially supported Ruby version (currently Ruby 2.1).
113
123
  TargetRubyVersion: ~
114
- TargetRailsVersion: 5.0
124
+ # What version of Rails is the inspected code using? If a value is specified
125
+ # for TargetRailsVersion then it is used. Acceptable values are specificed
126
+ # as a float (i.e. 5.1); the patch version of Rails should not be included.
127
+ # If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
128
+ # gems.locked file to find the version of Rails that has been bound to the
129
+ # application. If neither of those files exist, RuboCop will use Rails 5.0
130
+ # as the default.
131
+ TargetRailsVersion: ~
115
132
 
116
133
  #################### Layout ###########################
117
134
 
@@ -219,6 +236,19 @@ Layout/AlignParameters:
219
236
  # But it can be overridden by setting this parameter
220
237
  IndentationWidth: ~
221
238
 
239
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
240
+ Layout/BlockAlignment:
241
+ # The value `start_of_block` means that the `end` should be aligned with line
242
+ # where the `do` keyword appears.
243
+ # The value `start_of_line` means it should be aligned with the whole
244
+ # expression's starting line.
245
+ # The value `either` means both are allowed.
246
+ EnforcedStyleAlignWith: either
247
+ SupportedStylesAlignWith:
248
+ - either
249
+ - start_of_block
250
+ - start_of_line
251
+
222
252
  # Indentation of `when`.
223
253
  Layout/CaseIndentation:
224
254
  EnforcedStyle: case
@@ -231,6 +261,18 @@ Layout/CaseIndentation:
231
261
  # This only matters if `IndentOneStep` is `true`
232
262
  IndentationWidth: ~
233
263
 
264
+ Layout/DefEndAlignment:
265
+ # The value `def` means that `end` should be aligned with the def keyword.
266
+ # The value `start_of_line` means that `end` should be aligned with method
267
+ # calls like `private`, `public`, etc, if present in front of the `def`
268
+ # keyword on the same line.
269
+ EnforcedStyleAlignWith: start_of_line
270
+ SupportedStylesAlignWith:
271
+ - start_of_line
272
+ - def
273
+ AutoCorrect: false
274
+ Severity: warning
275
+
234
276
  # Multi-line method chaining should be done with leading dots.
235
277
  Layout/DotPosition:
236
278
  EnforcedStyle: leading
@@ -238,6 +280,10 @@ Layout/DotPosition:
238
280
  - leading
239
281
  - trailing
240
282
 
283
+ Layout/EmptyComment:
284
+ AllowBorderComment: true
285
+ AllowMarginComment: true
286
+
241
287
  # Use empty lines between defs.
242
288
  Layout/EmptyLineBetweenDefs:
243
289
  # If `true`, this parameter means that single line method definitions don't
@@ -259,6 +305,8 @@ Layout/EmptyLinesAroundClassBody:
259
305
  - empty_lines_except_namespace
260
306
  - empty_lines_special
261
307
  - no_empty_lines
308
+ - beginning_only
309
+ - ending_only
262
310
 
263
311
  Layout/EmptyLinesAroundModuleBody:
264
312
  EnforcedStyle: no_empty_lines
@@ -268,6 +316,23 @@ Layout/EmptyLinesAroundModuleBody:
268
316
  - empty_lines_special
269
317
  - no_empty_lines
270
318
 
319
+ # Align ends correctly.
320
+ Layout/EndAlignment:
321
+ # The value `keyword` means that `end` should be aligned with the matching
322
+ # keyword (`if`, `while`, etc.).
323
+ # The value `variable` means that in assignments, `end` should be aligned
324
+ # with the start of the variable on the left hand side of `=`. In all other
325
+ # situations, `end` should still be aligned with the keyword.
326
+ # The value `start_of_line` means that `end` should be aligned with the start
327
+ # of the line which the matching keyword appears on.
328
+ EnforcedStyleAlignWith: keyword
329
+ SupportedStylesAlignWith:
330
+ - keyword
331
+ - variable
332
+ - start_of_line
333
+ AutoCorrect: false
334
+ Severity: warning
335
+
271
336
  Layout/EndOfLine:
272
337
  # The `native` style means that CR+LF (Carriage Return + Line Feed) is
273
338
  # enforced on Windows, and LF is enforced on other platforms. The other styles
@@ -486,6 +551,7 @@ Layout/SpaceBeforeBlockBraces:
486
551
  SupportedStyles:
487
552
  - space
488
553
  - no_space
554
+ EnforcedStyleForEmptyBraces: space
489
555
  SupportedStylesForEmptyBraces:
490
556
  - space
491
557
  - no_space
@@ -496,6 +562,19 @@ Layout/SpaceBeforeFirstArg:
496
562
  # lines.
497
563
  AllowForAlignment: true
498
564
 
565
+ Layout/SpaceInsideArrayLiteralBrackets:
566
+ EnforcedStyle: no_space
567
+ SupportedStyles:
568
+ - space
569
+ - no_space
570
+ # 'compact' normally requires a space inside the brackets, with the exception
571
+ # that successive left brackets or right brackets are collapsed together
572
+ - compact
573
+ EnforcedStyleForEmptyBrackets: no_space
574
+ SupportedStylesForEmptyBrackets:
575
+ - space
576
+ - no_space
577
+
499
578
  Layout/SpaceInsideBlockBraces:
500
579
  EnforcedStyle: space
501
580
  SupportedStyles:
@@ -521,12 +600,37 @@ Layout/SpaceInsideHashLiteralBraces:
521
600
  - space
522
601
  - no_space
523
602
 
603
+ Layout/SpaceInsideReferenceBrackets:
604
+ EnforcedStyle: no_space
605
+ SupportedStyles:
606
+ - space
607
+ - no_space
608
+ EnforcedStyleForEmptyBrackets: no_space
609
+ SupportedStylesForEmptyBrackets:
610
+ - space
611
+ - no_space
612
+
524
613
  Layout/SpaceInsideStringInterpolation:
525
614
  EnforcedStyle: no_space
526
615
  SupportedStyles:
527
616
  - space
528
617
  - no_space
529
618
 
619
+ Layout/ClassStructure:
620
+ Categories:
621
+ module_inclusion:
622
+ - include
623
+ - prepend
624
+ - extend
625
+ ExpectedOrder:
626
+ - module_inclusion
627
+ - constants
628
+ - public_class_methods
629
+ - initializer
630
+ - public_methods
631
+ - protected_methods
632
+ - private_methods
633
+
530
634
  Layout/Tab:
531
635
  # By default, the indentation width from Layout/IndentationWidth is used
532
636
  # But it can be overridden by setting this parameter
@@ -643,6 +747,31 @@ Naming/PredicateName:
643
747
  Exclude:
644
748
  - 'spec/**/*'
645
749
 
750
+ Naming/UncommunicativeBlockParamName:
751
+ # Parameter names may be equal to or greater than this value
752
+ MinNameLength: 1
753
+ AllowNamesEndingInNumbers: true
754
+ # Whitelisted names that will not register an offense
755
+ AllowedNames: []
756
+ # Blacklisted names that will register an offense
757
+ ForbiddenNames: []
758
+
759
+ Naming/UncommunicativeMethodParamName:
760
+ # Parameter names may be equal to or greater than this value
761
+ MinNameLength: 3
762
+ AllowNamesEndingInNumbers: true
763
+ # Whitelisted names that will not register an offense
764
+ AllowedNames:
765
+ - io
766
+ - id
767
+ - to
768
+ - by
769
+ - 'on'
770
+ - in
771
+ - at
772
+ # Blacklisted names that will register an offense
773
+ ForbiddenNames: []
774
+
646
775
  Naming/VariableName:
647
776
  EnforcedStyle: snake_case
648
777
  SupportedStyles:
@@ -672,6 +801,9 @@ Style/AndOr:
672
801
  - always
673
802
  - conditionals
674
803
 
804
+ Style/AsciiComments:
805
+ AllowedChars: []
806
+
675
807
  # Checks if usage of `%()` or `%Q()` matches configuration.
676
808
  Style/BarePercentLiterals:
677
809
  EnforcedStyle: bare_percent
@@ -889,8 +1021,8 @@ Style/EmptyMethod:
889
1021
  Style/For:
890
1022
  EnforcedStyle: each
891
1023
  SupportedStyles:
892
- - for
893
1024
  - each
1025
+ - for
894
1026
 
895
1027
  # Enforce the method used for string formatting.
896
1028
  Style/FormatString:
@@ -909,6 +1041,7 @@ Style/FormatStringToken:
909
1041
  - annotated
910
1042
  # Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
911
1043
  - template
1044
+ - unannotated
912
1045
 
913
1046
  Style/FrozenStringLiteralComment:
914
1047
  EnforcedStyle: when_needed
@@ -950,11 +1083,7 @@ Style/HashSyntax:
950
1083
  # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
951
1084
  PreferHashRocketsForNonAlnumEndingSymbols: false
952
1085
 
953
- Style/IfUnlessModifier:
954
- MaxLineLength: 80
955
-
956
1086
  Style/InverseMethods:
957
- Enabled: true
958
1087
  # `InverseMethods` are methods that can be inverted by a not (`not` or `!`)
959
1088
  # The relationship of inverse methods only needs to be defined in one direction.
960
1089
  # Keys and values both need to be defined as symbols.
@@ -999,6 +1128,16 @@ Style/MethodDefParentheses:
999
1128
  - require_no_parentheses
1000
1129
  - require_no_parentheses_except_multiline
1001
1130
 
1131
+ Style/MissingElse:
1132
+ EnforcedStyle: both
1133
+ SupportedStyles:
1134
+ # if - warn when an if expression is missing an else branch
1135
+ # case - warn when a case expression is missing an else branch
1136
+ # both - warn when an if or case expression is missing an else branch
1137
+ - if
1138
+ - case
1139
+ - both
1140
+
1002
1141
  # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
1003
1142
  # `module` bodies.
1004
1143
  Style/MixinGrouping:
@@ -1153,6 +1292,14 @@ Style/RegexpLiteral:
1153
1292
  # are found in the regexp string.
1154
1293
  AllowInnerSlashes: false
1155
1294
 
1295
+ Style/RescueStandardError:
1296
+ EnforcedStyle: explicit
1297
+ # implicit: Do not include the error class, `rescue`
1298
+ # explicit: Require an error class `rescue StandardError`
1299
+ SupportedStyles:
1300
+ - implicit
1301
+ - explicit
1302
+
1156
1303
  Style/ReturnNil:
1157
1304
  EnforcedStyle: return
1158
1305
  SupportedStyles:
@@ -1163,6 +1310,11 @@ Style/SafeNavigation:
1163
1310
  # Safe navigation may cause a statement to start returning `nil` in addition
1164
1311
  # to whatever it used to return.
1165
1312
  ConvertCodeThatCanStartToReturnNil: false
1313
+ Whitelist:
1314
+ - present?
1315
+ - blank?
1316
+ - presence
1317
+ - try
1166
1318
 
1167
1319
  Style/Semicolon:
1168
1320
  # Allow `;` to separate several expressions on the same line.
@@ -1257,11 +1409,22 @@ Style/TrailingCommaInArguments:
1257
1409
  - consistent_comma
1258
1410
  - no_comma
1259
1411
 
1260
- Style/TrailingCommaInLiteral:
1261
- # If `comma`, the cop requires a comma after the last item in an array or
1262
- # hash, but only when each item is on its own line.
1412
+ Style/TrailingCommaInArrayLiteral:
1413
+ # If `comma`, the cop requires a comma after the last item in an array,
1414
+ # but only when each item is on its own line.
1263
1415
  # If `consistent_comma`, the cop requires a comma after the last item of all
1264
- # non-empty array and hash literals.
1416
+ # non-empty array literals.
1417
+ EnforcedStyleForMultiline: no_comma
1418
+ SupportedStylesForMultiline:
1419
+ - comma
1420
+ - consistent_comma
1421
+ - no_comma
1422
+
1423
+ Style/TrailingCommaInHashLiteral:
1424
+ # If `comma`, the cop requires a comma after the last item in a hash,
1425
+ # but only when each item is on its own line.
1426
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1427
+ # non-empty hash literals.
1265
1428
  EnforcedStyleForMultiline: no_comma
1266
1429
  SupportedStylesForMultiline:
1267
1430
  - comma
@@ -1310,9 +1473,6 @@ Style/TrivialAccessors:
1310
1473
  - to_s
1311
1474
  - to_sym
1312
1475
 
1313
- Style/WhileUntilModifier:
1314
- MaxLineLength: 80
1315
-
1316
1476
  # `WordArray` enforces how array literals of word-like strings should be expressed.
1317
1477
  Style/WordArray:
1318
1478
  EnforcedStyle: percent
@@ -1398,46 +1558,6 @@ Metrics/PerceivedComplexity:
1398
1558
  Lint/AssignmentInCondition:
1399
1559
  AllowSafeAssignment: true
1400
1560
 
1401
- # checks whether the end keywords are aligned properly for `do` `end` blocks.
1402
- Lint/BlockAlignment:
1403
- # The value `start_of_block` means that the `end` should be aligned with line
1404
- # where the `do` keyword appears.
1405
- # The value `start_of_line` means it should be aligned with the whole
1406
- # expression's starting line.
1407
- # The value `either` means both are allowed.
1408
- EnforcedStyleAlignWith: either
1409
- SupportedStylesAlignWith:
1410
- - either
1411
- - start_of_block
1412
- - start_of_line
1413
-
1414
- Lint/DefEndAlignment:
1415
- # The value `def` means that `end` should be aligned with the def keyword.
1416
- # The value `start_of_line` means that `end` should be aligned with method
1417
- # calls like `private`, `public`, etc, if present in front of the `def`
1418
- # keyword on the same line.
1419
- EnforcedStyleAlignWith: start_of_line
1420
- SupportedStylesAlignWith:
1421
- - start_of_line
1422
- - def
1423
- AutoCorrect: false
1424
-
1425
- # Align ends correctly.
1426
- Lint/EndAlignment:
1427
- # The value `keyword` means that `end` should be aligned with the matching
1428
- # keyword (`if`, `while`, etc.).
1429
- # The value `variable` means that in assignments, `end` should be aligned
1430
- # with the start of the variable on the left hand side of `=`. In all other
1431
- # situations, `end` should still be aligned with the keyword.
1432
- # The value `start_of_line` means that `end` should be aligned with the start
1433
- # of the line which the matching keyword appears on.
1434
- EnforcedStyleAlignWith: keyword
1435
- SupportedStylesAlignWith:
1436
- - keyword
1437
- - variable
1438
- - start_of_line
1439
- AutoCorrect: false
1440
-
1441
1561
  Lint/InheritException:
1442
1562
  # The default base class in favour of `Exception`.
1443
1563
  EnforcedStyle: runtime_error
@@ -1445,6 +1565,16 @@ Lint/InheritException:
1445
1565
  - runtime_error
1446
1566
  - standard_error
1447
1567
 
1568
+ Lint/MissingCopEnableDirective:
1569
+ # Maximum number of consecutive lines the cop can be disabled for.
1570
+ # 0 allows only single-line disables
1571
+ # 1 would mean the maximum allowed is the following:
1572
+ # # rubocop:disable SomeCop
1573
+ # a = 1
1574
+ # # rubocop:enable SomeCop
1575
+ # .inf for any size
1576
+ MaximumRangeSize: .inf
1577
+
1448
1578
  Lint/SafeNavigationChain:
1449
1579
  Whitelist:
1450
1580
  - present?
@@ -1452,6 +1582,10 @@ Lint/SafeNavigationChain:
1452
1582
  - presence
1453
1583
  - try
1454
1584
 
1585
+ # Checks for shadowed arguments
1586
+ Lint/ShadowedArgument:
1587
+ IgnoreImplicitReferences: false
1588
+
1455
1589
  # Checks for unused block arguments
1456
1590
  Lint/UnusedBlockArgument:
1457
1591
  IgnoreEmptyBlocks: true
@@ -1462,6 +1596,9 @@ Lint/UnusedMethodArgument:
1462
1596
  AllowUnusedKeywordArguments: false
1463
1597
  IgnoreEmptyMethods: true
1464
1598
 
1599
+ Lint/Void:
1600
+ CheckForMethodsWithNoSideEffects: false
1601
+
1465
1602
  #################### Performance ###########################
1466
1603
 
1467
1604
  Performance/DoubleStartEndWith:
@@ -1483,6 +1620,10 @@ Rails/ActionFilter:
1483
1620
  Include:
1484
1621
  - app/controllers/**/*.rb
1485
1622
 
1623
+ Rails/CreateTableWithTimestamps:
1624
+ Include:
1625
+ - db/migrate/*.rb
1626
+
1486
1627
  Rails/Date:
1487
1628
  # The value `strict` disallows usage of `Date.today`, `Date.current`,
1488
1629
  # `Date#to_time` etc.
@@ -1532,6 +1673,20 @@ Rails/HasManyOrHasOneDependent:
1532
1673
  Include:
1533
1674
  - app/models/**/*.rb
1534
1675
 
1676
+ Rails/HttpStatus:
1677
+ EnforcedStyle: symbolic
1678
+ SupportedStyles:
1679
+ - numeric
1680
+ - symbolic
1681
+
1682
+ Rails/InverseOf:
1683
+ Include:
1684
+ - app/models/**/*.rb
1685
+
1686
+ Rails/LexicallyScopedActionFilter:
1687
+ Include:
1688
+ - app/controllers/**/*.rb
1689
+
1535
1690
  Rails/NotNullColumn:
1536
1691
  Include:
1537
1692
  - db/migrate/*.rb
@@ -1559,7 +1714,7 @@ Rails/ReversibleMigration:
1559
1714
 
1560
1715
  Rails/SafeNavigation:
1561
1716
  # This will convert usages of `try` to use safe navigation as well as `try!`.
1562
- # `try` and `try!` work slighly differently. `try!` and safe navigation will
1717
+ # `try` and `try!` work slightly differently. `try!` and safe navigation will
1563
1718
  # both raise a `NoMethodError` if the receiver of the method call does not
1564
1719
  # implement the intended method. `try` will not raise an exception for this.
1565
1720
  ConvertTry: false
@@ -1611,4 +1766,4 @@ Bundler/OrderedGems:
1611
1766
  TreatCommentsAsGroupSeparators: true
1612
1767
 
1613
1768
  Gemspec/OrderedDependencies:
1614
- TreatCommentsAsGroupSeparators: true
1769
+ TreatCommentsAsGroupSeparators: true