mry 0.55.0.0 → 0.56.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mry/added_cops.rb +7 -0
- data/lib/mry/rewriters.rb +9 -17
- data/lib/mry/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6ef63a923f323f2d4f87bcd1b522968dc28ec1b9b6560c00b2d76d08f53bea6
|
4
|
+
data.tar.gz: 5ea5fa919085b67e6bcbab54274b33687bddff0426198fb9a7c672ddccd24ab2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c1d5e7f242421ee2e96736d04de93b4ba91fc30bb744cb4e312deda4f159ec27b68d34b83695de4e761246083548ce6bc9bf670d02cdf4e94f728cb540b74a
|
7
|
+
data.tar.gz: 9b16f564b5863a482a3225594e8b6cead45e635b98ad48d7c38c1dcc143f7006268a271353f808d7d9859499f47f4101e0225fdaa11e4fbdfb5779938bdb6a68
|
data/lib/mry/added_cops.rb
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
module Mry
|
2
2
|
module AddedCops
|
3
3
|
Cops = {
|
4
|
+
Gem::Version.new('0.56.0') => %w[
|
5
|
+
Lint/SplatKeywordArguments
|
6
|
+
Performance/InefficientHashSearch
|
7
|
+
Lint/ErbNewArguments
|
8
|
+
Rails/AssertNot
|
9
|
+
Rails/RefuteMethods
|
10
|
+
],
|
4
11
|
Gem::Version.new('0.55.0') => %w[
|
5
12
|
Performance/UnneededSort
|
6
13
|
Lint/SafeNavigationConsistency
|
data/lib/mry/rewriters.rb
CHANGED
@@ -3,6 +3,10 @@ module Mry
|
|
3
3
|
class Rewriter_Master < YAMLRewriter::Rewriter
|
4
4
|
end
|
5
5
|
|
6
|
+
class Rewriter_0_56_0 < YAMLRewriter::Rewriter
|
7
|
+
define_rule ['Style/EmptyLineAfterGuardClause' => 'Layout/EmptyLineAfterGuardClause']
|
8
|
+
end
|
9
|
+
|
6
10
|
class Rewriter_0_55_0 < YAMLRewriter::Rewriter
|
7
11
|
end
|
8
12
|
|
@@ -164,23 +168,11 @@ module Mry
|
|
164
168
|
define_rule ['Style/SpaceAroundOperators', 'MultiSpaceAllowedForOperators' => 'AllowForAlignment']
|
165
169
|
end
|
166
170
|
|
167
|
-
Rewriters =
|
168
|
-
Gem::Version.new('
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
Gem::Version.new('0.51.0') => Rewriter_0_51_0,
|
173
|
-
Gem::Version.new('0.50.0') => Rewriter_0_50_0,
|
174
|
-
Gem::Version.new('0.49.0') => Rewriter_0_49_0,
|
175
|
-
Gem::Version.new('0.47.0') => Rewriter_0_47_0,
|
176
|
-
Gem::Version.new('0.46.0') => Rewriter_0_46_0,
|
177
|
-
Gem::Version.new('0.45.0') => Rewriter_0_45_0,
|
178
|
-
Gem::Version.new('0.44.0') => Rewriter_0_44_0,
|
179
|
-
Gem::Version.new('0.43.0') => Rewriter_0_43_0,
|
180
|
-
Gem::Version.new('0.42.0') => Rewriter_0_42_0,
|
181
|
-
Gem::Version.new('0.41.0') => Rewriter_0_41_0,
|
182
|
-
Gem::Version.new('0') => Rewriter_0,
|
183
|
-
}.freeze
|
171
|
+
Rewriters = self.constants.grep(/^Rewriter_\d/).map do |name|
|
172
|
+
version = Gem::Version.new(name[/Rewriter_(.+)$/, 1].gsub('_', '.'))
|
173
|
+
klass = const_get(name)
|
174
|
+
[version, klass]
|
175
|
+
end.sort.reverse.to_h
|
184
176
|
|
185
177
|
def self.rewriters(target)
|
186
178
|
return [(Rewriters.values + [Rewriter_Master]).reverse, []] if target == :master
|
data/lib/mry/version.rb
CHANGED