rubomatic 1.1.0.pre.rc.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/configs/lint.yml +2 -2
- data/configs/metrics.yml +8 -0
- data/configs/rails.yml +11 -0
- data/configs/style.yml +33 -20
- data/lib/rubomatic/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3608f65dffc40df29a8fdad7a594232199ed3e1c97c4a3370e577e0b25a26876
|
|
4
|
+
data.tar.gz: 295aba6cb8d24f9804078c8d26cb4438ec2b183368f35bcfb10d2a115d7e2849
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7beb9db9c66fb58743b1160afaf9859b83790ce0bea317bf0681a74f7b4dbf4fa2ac33ad215ee71d9529b0d789e04e667d22c7d4ef4b1c3327d0f2643120336
|
|
7
|
+
data.tar.gz: b4377c9b9b76f5167340a2eacd282a83cb1a92acf00a3058eef2415023958963b0e5ab9cf7c60f4ef865a85081201830b3b00d34f9b86081208620c3871bc06b
|
data/configs/lint.yml
CHANGED
|
@@ -956,12 +956,12 @@ Lint/UselessMethodDefinition:
|
|
|
956
956
|
VersionChanged: '0.91'
|
|
957
957
|
Safe: false
|
|
958
958
|
|
|
959
|
-
|
|
959
|
+
<% if RuboCop::Version.version.to_f >= 1.43 %>
|
|
960
960
|
Lint/UselessRescue:
|
|
961
961
|
Description: 'Checks for useless `rescue`s, which only reraise rescued exceptions.'
|
|
962
962
|
Enabled: true
|
|
963
963
|
VersionAdded: '1.43'
|
|
964
|
-
|
|
964
|
+
<% end %>
|
|
965
965
|
|
|
966
966
|
Lint/UselessRuby2Keywords:
|
|
967
967
|
Description: 'Finds unnecessary uses of `ruby2_keywords`.'
|
data/configs/metrics.yml
CHANGED
|
@@ -52,6 +52,14 @@ Metrics/ClassLength:
|
|
|
52
52
|
Max: 100
|
|
53
53
|
CountAsOne: [ ]
|
|
54
54
|
|
|
55
|
+
<% if RuboCop::Version.document_version.to_f >= 1.47 %>
|
|
56
|
+
Metrics/CollectionLiteralLength:
|
|
57
|
+
Description: Checks for `Array` or `Hash` literals with many entries.
|
|
58
|
+
Enabled: true
|
|
59
|
+
VersionAdded: '1.47'
|
|
60
|
+
LengthThreshold: 250
|
|
61
|
+
<% end %>
|
|
62
|
+
|
|
55
63
|
# Avoid complex methods.
|
|
56
64
|
Metrics/CyclomaticComplexity:
|
|
57
65
|
Description: >-
|
data/configs/rails.yml
CHANGED
|
@@ -776,6 +776,17 @@ Rails/RequireDependency:
|
|
|
776
776
|
Enabled: false
|
|
777
777
|
VersionAdded: '2.10'
|
|
778
778
|
|
|
779
|
+
Rails/ResponseParsedBody:
|
|
780
|
+
Description: Prefer `response.parsed_body` to `JSON.parse(response.body)`.
|
|
781
|
+
Enabled: true
|
|
782
|
+
SafeAutoCorrect: false
|
|
783
|
+
VersionAdded: '2.18'
|
|
784
|
+
Include:
|
|
785
|
+
- spec/controllers/**/*.rb
|
|
786
|
+
- spec/requests/**/*.rb
|
|
787
|
+
- test/controllers/**/*.rb
|
|
788
|
+
- test/integration/**/*.rb
|
|
789
|
+
|
|
779
790
|
Rails/ReversibleMigration:
|
|
780
791
|
Description: 'Checks whether the change method of the migration file is reversible.'
|
|
781
792
|
StyleGuide: 'https://rails.rubystyle.guide#reversible-migration'
|
data/configs/style.yml
CHANGED
|
@@ -62,12 +62,12 @@ Style/ArrayCoercion:
|
|
|
62
62
|
Enabled: true
|
|
63
63
|
VersionAdded: '0.88'
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
<% if RuboCop::Version.document_version.to_f >= 1.40 %>
|
|
66
66
|
Style/ArrayIntersect:
|
|
67
67
|
Description: 'Use `array1.intersect?(array2)` instead of `(array1 & array2).any?`.'
|
|
68
68
|
Enabled: true
|
|
69
69
|
VersionAdded: '1.40'
|
|
70
|
-
|
|
70
|
+
<% end %>
|
|
71
71
|
|
|
72
72
|
Style/ArrayJoin:
|
|
73
73
|
Description: 'Use Array#join instead of Array#*.'
|
|
@@ -447,20 +447,20 @@ Style/CommentedKeyword:
|
|
|
447
447
|
VersionAdded: '0.51'
|
|
448
448
|
VersionChanged: '1.19'
|
|
449
449
|
|
|
450
|
-
|
|
450
|
+
<% if RuboCop::Version.document_version.to_f >= 1.44 %>
|
|
451
451
|
Style/ComparableClamp:
|
|
452
452
|
Description: 'Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum.'
|
|
453
453
|
Enabled: true
|
|
454
454
|
VersionAdded: '1.44'
|
|
455
|
-
|
|
455
|
+
<% end %>
|
|
456
456
|
|
|
457
|
-
|
|
457
|
+
<% if RuboCop::Version.document_version.to_f >= 1.41 %>
|
|
458
458
|
Style/ConcatArrayLiterals:
|
|
459
459
|
Description: 'Enforces the use of `Array#push(item)` instead of `Array#concat([item])` to avoid redundant array literals.'
|
|
460
460
|
Enabled: true
|
|
461
461
|
Safe: false
|
|
462
462
|
VersionAdded: '1.41'
|
|
463
|
-
|
|
463
|
+
<% end %>
|
|
464
464
|
|
|
465
465
|
Style/ConditionalAssignment:
|
|
466
466
|
Description: >-
|
|
@@ -540,13 +540,13 @@ Style/Dir:
|
|
|
540
540
|
Enabled: true
|
|
541
541
|
VersionAdded: '0.50'
|
|
542
542
|
|
|
543
|
-
|
|
543
|
+
<% if RuboCop::Version.document_version.to_f >= 1.48 %>
|
|
544
544
|
Style/DirEmpty:
|
|
545
545
|
Description: >-
|
|
546
546
|
Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty.
|
|
547
547
|
Enabled: true
|
|
548
548
|
VersionAdded: '1.48'
|
|
549
|
-
|
|
549
|
+
<% end %>
|
|
550
550
|
|
|
551
551
|
Style/DisableCopsWithinSourceCodeDirective:
|
|
552
552
|
Severity: info # Or warning
|
|
@@ -745,13 +745,13 @@ Style/FetchEnvVar:
|
|
|
745
745
|
# Environment variables to be excluded from the inspection.
|
|
746
746
|
AllowedVars: [ ]
|
|
747
747
|
|
|
748
|
-
|
|
748
|
+
<% if RuboCop::Version.document_version.to_f >= 1.48 %>
|
|
749
749
|
Style/FileEmpty:
|
|
750
750
|
Description: >-
|
|
751
751
|
Prefer to use `File.empty?('path/to/file')` when checking if a file is empty.
|
|
752
752
|
Enabled: true
|
|
753
753
|
VersionAdded: '1.48'
|
|
754
|
-
|
|
754
|
+
<% end %>
|
|
755
755
|
|
|
756
756
|
Style/FileRead:
|
|
757
757
|
Description: 'Favor `File.(bin)read` convenience methods.'
|
|
@@ -1075,7 +1075,7 @@ Style/InverseMethods:
|
|
|
1075
1075
|
:select: :reject
|
|
1076
1076
|
:select!: :reject!
|
|
1077
1077
|
|
|
1078
|
-
|
|
1078
|
+
<% if RuboCop::Version.document_version.to_f >= 1.44 %>
|
|
1079
1079
|
Style/InvertibleUnlessCondition:
|
|
1080
1080
|
Description: 'Favor `if` with inverted condition over `unless`.'
|
|
1081
1081
|
Enabled: true
|
|
@@ -1102,7 +1102,7 @@ Style/InvertibleUnlessCondition:
|
|
|
1102
1102
|
:exclude?: :include?
|
|
1103
1103
|
# :one?: :many?
|
|
1104
1104
|
# :many?: :one?
|
|
1105
|
-
|
|
1105
|
+
<% end %>
|
|
1106
1106
|
|
|
1107
1107
|
Style/IpAddresses:
|
|
1108
1108
|
Description: "Don't include literal IP addresses in code."
|
|
@@ -1189,6 +1189,12 @@ Style/MapToHash:
|
|
|
1189
1189
|
VersionAdded: '1.24'
|
|
1190
1190
|
Safe: false
|
|
1191
1191
|
|
|
1192
|
+
Style/MapToSet:
|
|
1193
|
+
Description: Prefer `to_set` with a block over `map.to_set`.
|
|
1194
|
+
Enabled: true
|
|
1195
|
+
Safe: false
|
|
1196
|
+
VersionAdded: '1.42'
|
|
1197
|
+
|
|
1192
1198
|
Style/MethodCallWithArgsParentheses:
|
|
1193
1199
|
Description: 'Use parentheses for method calls with arguments.'
|
|
1194
1200
|
StyleGuide: '#method-invocation-parens'
|
|
@@ -1246,6 +1252,13 @@ Style/MinMax:
|
|
|
1246
1252
|
Enabled: true
|
|
1247
1253
|
VersionAdded: '0.50'
|
|
1248
1254
|
|
|
1255
|
+
Style/MinMaxComparison:
|
|
1256
|
+
Description: Enforces the use of `max` or `min` instead of comparison for greater
|
|
1257
|
+
or less.
|
|
1258
|
+
Enabled: true
|
|
1259
|
+
Safe: false
|
|
1260
|
+
VersionAdded: '1.42'
|
|
1261
|
+
|
|
1249
1262
|
Style/MissingElse:
|
|
1250
1263
|
Description: >-
|
|
1251
1264
|
Require if/case expressions to have an else branches.
|
|
@@ -1816,19 +1829,19 @@ Style/RedundantConditional:
|
|
|
1816
1829
|
Enabled: true
|
|
1817
1830
|
VersionAdded: '0.50'
|
|
1818
1831
|
|
|
1819
|
-
|
|
1832
|
+
<% if RuboCop::Version.document_version.to_f >= 1.40 %>
|
|
1820
1833
|
Style/RedundantConstantBase:
|
|
1821
1834
|
Description: Avoid redundant `::` prefix on constant.
|
|
1822
1835
|
Enabled: true
|
|
1823
1836
|
VersionAdded: '1.40'
|
|
1824
|
-
|
|
1837
|
+
<% end %>
|
|
1825
1838
|
|
|
1826
|
-
|
|
1839
|
+
<% if RuboCop::Version.document_version.to_f >= 1.41 %>
|
|
1827
1840
|
Style/RedundantDoubleSplatHashBraces:
|
|
1828
1841
|
Description: 'Checks for redundant uses of double splat hash braces.'
|
|
1829
1842
|
Enabled: true
|
|
1830
1843
|
VersionAdded: '1.41'
|
|
1831
|
-
|
|
1844
|
+
<% end %>
|
|
1832
1845
|
|
|
1833
1846
|
Style/RedundantEach:
|
|
1834
1847
|
Description: 'Checks for redundant `each`.'
|
|
@@ -1870,12 +1883,12 @@ Style/RedundantFreeze:
|
|
|
1870
1883
|
VersionAdded: '0.34'
|
|
1871
1884
|
VersionChanged: '0.66'
|
|
1872
1885
|
|
|
1873
|
-
|
|
1886
|
+
<% if RuboCop::Version.document_version.to_f >= 1.45 %>
|
|
1874
1887
|
Style/RedundantHeredocDelimiterQuotes:
|
|
1875
1888
|
Description: 'Checks for redundant heredoc delimiter quotes.'
|
|
1876
1889
|
Enabled: true
|
|
1877
1890
|
VersionAdded: '1.45'
|
|
1878
|
-
|
|
1891
|
+
<% end %>
|
|
1879
1892
|
|
|
1880
1893
|
Style/RedundantInitialize:
|
|
1881
1894
|
Description: 'Checks for redundant `initialize` methods.'
|
|
@@ -1977,13 +1990,13 @@ Style/RegexpLiteral:
|
|
|
1977
1990
|
# are found in the regexp string.
|
|
1978
1991
|
AllowInnerSlashes: false
|
|
1979
1992
|
|
|
1980
|
-
|
|
1993
|
+
<% if RuboCop::Version.document_version.to_f >= 1.40 %>
|
|
1981
1994
|
Style/RequireOrder:
|
|
1982
1995
|
Description: Sort `require` and `require_relative` in alphabetical order.
|
|
1983
1996
|
Enabled: true
|
|
1984
1997
|
SafeAutoCorrect: false
|
|
1985
1998
|
VersionAdded: '1.40'
|
|
1986
|
-
|
|
1999
|
+
<% end %>
|
|
1987
2000
|
|
|
1988
2001
|
Style/RescueModifier:
|
|
1989
2002
|
Description: 'Avoid using rescue in its modifier form.'
|
data/lib/rubomatic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubomatic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brands Insurance
|
|
@@ -112,9 +112,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
112
112
|
version: 3.0.1
|
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
|
-
- - "
|
|
115
|
+
- - ">="
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
117
|
+
version: '0'
|
|
118
118
|
requirements: []
|
|
119
119
|
rubygems_version: 3.2.15
|
|
120
120
|
signing_key:
|