mry 0.51.0.0 → 0.52.0.0

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: 15b17045e3852894486fa3b095d0536a4eeeb446
4
- data.tar.gz: 1aa5bb16b8377e503de0b91d1b3f521f5b32940d
3
+ metadata.gz: bd762e726ed1b37d981d592c615ef04ec49e2e3e
4
+ data.tar.gz: 0d75d6869075114267dbf6e632de91f971420824
5
5
  SHA512:
6
- metadata.gz: e47372ddb2b2f9c06fe378b56740bbdf191c30c0bda199152534a9675707cc0a336937cea8d8735868cc355c01baeaed7e83c7b3e26f3d2aa838dbe7d1f0bba3
7
- data.tar.gz: bf21b7bbb54d800d21a4382415eb21601db68015b37df7fabc9229f85f117c6a51c2bbacca59741b7f2b1be27170c385c094fddc4d22a1d2e3bb7f9c75b52514
6
+ metadata.gz: 84b6dfb378db69f13820789269f831ac43e09708d5f46bb444b70bcc57bc991df404556dd5fc58e7445fc86bbe1141f79bf7242530ac910326a30a2a264dc278
7
+ data.tar.gz: ce570da53bd36e88fb8eed66064b9b2117d0d5b2015c548d37cfb0b7eb67e4810a6be99f3de4e282cb4382ee3d235c03a6953540571d2c2498001eceabe24c6a
data/README.md CHANGED
@@ -4,8 +4,8 @@ Mry Migrates .Rubocop.Yml :muscle:
4
4
 
5
5
 
6
6
  RuboCop has many many breaking changes, because it is before version 1.0.
7
- So, if you update RuboCop version, in many cases .rubocop.yml breaks...
8
- This tool supports migrating `.rubocop.yml`. It automatically rename the configuration in your `.rubocop.yml` that is renamed by updating RuboCop. So, with this tool, you do not have to be afraid of updating RuboCop anymore!
7
+ So, if you update your RuboCop version, .rubocop.yml breaks in many cases...
8
+ This tool supports migrating `.rubocop.yml`. It automatically renames the configuration in your `.rubocop.yml` that was renamed by the updated RuboCop version. So, with this tool, you do not have to be afraid of updating RuboCop anymore!
9
9
 
10
10
  ## Installation
11
11
 
@@ -31,15 +31,15 @@ Update `.rubocop.yml` to latest release:
31
31
  $ mry .rubocop.yml
32
32
  ```
33
33
 
34
- Update `.rubocop.yml` to version 0.48.0:
34
+ Update `.rubocop.yml` to a specified version:
35
35
 
36
36
  ```bash
37
37
  $ mry --target=0.51.0 .rubocop.yml
38
38
  ```
39
39
 
40
- And you can specify current RuboCop version.
41
- If you specify current RuboCop version, mry adds cops that are added in new version RuboCop to your `.rubocop.yml`.
42
- By this feature, you can check new features of RuboCop with mry.
40
+ And you can specify the current RuboCop version.
41
+ If you specify a new RuboCop version, mry adds cops that were added in this new RuboCop version to your `.rubocop.yml`.
42
+ With this feature, you can check new RuboCop cops with mry.
43
43
 
44
44
  ```bash
45
45
  $ mry --from=0.50.0 --target=0.51.0 .rubocop.yml
@@ -1,6 +1,32 @@
1
1
  module Mry
2
2
  module AddedCops
3
3
  Cops = {
4
+ Gem::Version.new('0.52.0') => %w[
5
+ Style/StringHashKeys
6
+ Style/RandomWithOffset
7
+ Lint/ShadowedArgument
8
+ Lint/MissingCopEnableDirective
9
+ Rails/EnvironmentComparison
10
+ Style/EmptyBlockParameter
11
+ Style/EmptyLambdaParameter
12
+ Style/TrailingBodyOnMethodDefinition
13
+ Rails/InverseOf
14
+ Style/TrailingMethodEndStatement
15
+ Gemspec/RequiredRubyVersion
16
+ Lint/NestedPercentLiteral
17
+ Gemspec/DuplicatedAssignment
18
+ Style/ColonMethodDefinition
19
+ Layout/ClassStructure
20
+ Rails/CreateTableWithTimestamps
21
+ Style/ExtendSelf
22
+ Rails/RedundantReceiverInWithOptions
23
+ Style/EvalWithLocation
24
+ Layout/EmptyLinesAroundArguments
25
+ Layout/SpaceInsideReferenceBrackets
26
+ Layout/SpaceInsideArrayLiteralBrackets
27
+ Rails/LexicallyScopedActionFilter
28
+ Rails/Presence
29
+ ],
4
30
  Gem::Version.new('0.51.0') => %w[
5
31
  Rails/UnknownEnv
6
32
  Style/StderrPuts
@@ -147,7 +173,11 @@ module Mry
147
173
  cops = added_cops(from: from, to: to)
148
174
  return if cops.empty?
149
175
 
150
- in_tmpdir do
176
+ in_tmpdir do |dir|
177
+ dir.join('.rubocop.yml').write(<<~YAML)
178
+ Rails:
179
+ Enabled: true
180
+ YAML
151
181
  stdout do
152
182
  RuboCop::CLI.new.run(['--show-cops', cops.join(',')])
153
183
  end
@@ -3,6 +3,10 @@ module Mry
3
3
  class Rewriter_Master < YAMLRewriter::Rewriter
4
4
  end
5
5
 
6
+ class Rewriter_0_52_0 < YAMLRewriter::Rewriter
7
+ define_rule ['Lint/RescueWithoutErrorClass' => 'Style/RescueStandardError']
8
+ end
9
+
6
10
  class Rewriter_0_51_0 < YAMLRewriter::Rewriter
7
11
  define_rule ['Lint/LiteralInCondition' => 'Lint/LiteralAsCondition']
8
12
  end
@@ -136,6 +140,7 @@ module Mry
136
140
  class Rewriter_0_41_0 < YAMLRewriter::Rewriter
137
141
  define_rule ['Style/DeprecatedHashMethods' => 'Style/PreferredHashMethods']
138
142
  end
143
+
139
144
  class Rewriter_0 < YAMLRewriter::Rewriter
140
145
  define_rule ['Style/SingleSpaceBeforeFirstArg' => 'Style/SpaceBeforeFirstArg']
141
146
  define_rule ['Lint/SpaceBeforeFirstArg' => 'Style/SpaceBeforeFirstArg']
@@ -145,6 +150,7 @@ module Mry
145
150
  end
146
151
 
147
152
  Rewriters = {
153
+ Gem::Version.new('0.52.0') => Rewriter_0_51_0,
148
154
  Gem::Version.new('0.51.0') => Rewriter_0_51_0,
149
155
  Gem::Version.new('0.50.0') => Rewriter_0_50_0,
150
156
  Gem::Version.new('0.49.0') => Rewriter_0_49_0,
@@ -1,3 +1,3 @@
1
1
  module Mry
2
- VERSION = "0.51.0.0"
2
+ VERSION = "0.52.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.51.0.0
4
+ version: 0.52.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Kuwabara
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-19 00:00:00.000000000 Z
11
+ date: 2017-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop