rubocop-migration 0.7.0 → 0.7.1
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/.rubocop.yml +0 -2
- data/Gemfile.lock +10 -9
- data/lib/rubocop/cop/migration/remove_column.rb +12 -29
- data/lib/rubocop/migration/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21928f0fea19acf1ebaa7f52ce8959beb23971a5628cd22adca0247639a8a0c3
|
4
|
+
data.tar.gz: 54a78c51ce7b5067492e5c0c5ada239b0f70c6263357e6240d6e06135802bfcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e502ebe71d6da7432ac0a7c4e63ae3909a2c697b569d35142bcfb7c0dab53985c0eab0508824ec8beeb5b181048dbb43e07cee9278b14a445151bd9c2003ec
|
7
|
+
data.tar.gz: bcf97b0d4a3bd15992ee9cdb68b550f5d60d8eabcb1f44e683fd9306a70111f958380eefbcd43835b5c97a41cae91ed2e1d76ed3042a0aec6fdd7b63848b2c6c
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-migration (0.7.
|
4
|
+
rubocop-migration (0.7.1)
|
5
5
|
activesupport
|
6
6
|
lint_roller (>= 1.1)
|
7
7
|
rubocop (>= 1.72.1)
|
@@ -28,7 +28,7 @@ GEM
|
|
28
28
|
benchmark (0.4.0)
|
29
29
|
bigdecimal (3.1.9)
|
30
30
|
concurrent-ruby (1.3.5)
|
31
|
-
connection_pool (2.5.
|
31
|
+
connection_pool (2.5.1)
|
32
32
|
diff-lcs (1.6.1)
|
33
33
|
drb (2.2.1)
|
34
34
|
i18n (1.14.7)
|
@@ -39,13 +39,13 @@ GEM
|
|
39
39
|
logger (1.7.0)
|
40
40
|
minitest (5.25.5)
|
41
41
|
mutex_m (0.3.0)
|
42
|
-
parallel (1.
|
43
|
-
parser (3.3.
|
42
|
+
parallel (1.27.0)
|
43
|
+
parser (3.3.8.0)
|
44
44
|
ast (~> 2.4.1)
|
45
45
|
racc
|
46
46
|
prism (1.4.0)
|
47
47
|
racc (1.8.1)
|
48
|
-
rack (3.1.
|
48
|
+
rack (3.1.13)
|
49
49
|
rainbow (3.1.1)
|
50
50
|
rake (13.2.1)
|
51
51
|
regexp_parser (2.10.0)
|
@@ -73,7 +73,7 @@ GEM
|
|
73
73
|
rubocop-ast (>= 1.44.0, < 2.0)
|
74
74
|
ruby-progressbar (~> 1.7)
|
75
75
|
unicode-display_width (>= 2.4.0, < 4.0)
|
76
|
-
rubocop-ast (1.44.
|
76
|
+
rubocop-ast (1.44.1)
|
77
77
|
parser (>= 3.3.7.2)
|
78
78
|
prism (~> 1.4)
|
79
79
|
rubocop-performance (1.25.0)
|
@@ -89,14 +89,15 @@ GEM
|
|
89
89
|
rubocop-rake (0.7.1)
|
90
90
|
lint_roller (~> 1.1)
|
91
91
|
rubocop (>= 1.72.1)
|
92
|
-
rubocop-rspec (3.
|
92
|
+
rubocop-rspec (3.6.0)
|
93
93
|
lint_roller (~> 1.1)
|
94
94
|
rubocop (~> 1.72, >= 1.72.1)
|
95
95
|
ruby-progressbar (1.13.0)
|
96
96
|
securerandom (0.3.2)
|
97
|
-
sevencop (0.
|
97
|
+
sevencop (0.48.0)
|
98
98
|
activesupport
|
99
|
-
|
99
|
+
lint_roller (>= 1.1)
|
100
|
+
rubocop (>= 1.72.1)
|
100
101
|
tzinfo (2.0.6)
|
101
102
|
concurrent-ruby (~> 1.0)
|
102
103
|
unicode-display_width (3.1.4)
|
@@ -170,6 +170,7 @@ module RuboCop
|
|
170
170
|
)
|
171
171
|
Parser.call(
|
172
172
|
content: content,
|
173
|
+
parser_engine: respond_to?(:parser_engine) ? parser_engine : :parser_whitequark,
|
173
174
|
path: path,
|
174
175
|
target_ruby_version: target_ruby_version
|
175
176
|
)
|
@@ -184,16 +185,19 @@ module RuboCop
|
|
184
185
|
class Parser
|
185
186
|
class << self
|
186
187
|
# @param content [String]
|
188
|
+
# @param parser_engine [Symbol]
|
187
189
|
# @param path [String]
|
188
190
|
# @param target_ruby_version [#to_s]
|
189
191
|
# @return [RuboCop::AST::Node]
|
190
192
|
def call(
|
191
193
|
content:,
|
194
|
+
parser_engine:,
|
192
195
|
path:,
|
193
196
|
target_ruby_version:
|
194
197
|
)
|
195
198
|
new(
|
196
199
|
content: content,
|
200
|
+
parser_engine: parser_engine,
|
197
201
|
path: path,
|
198
202
|
target_ruby_version: target_ruby_version
|
199
203
|
).call
|
@@ -201,50 +205,29 @@ module RuboCop
|
|
201
205
|
end
|
202
206
|
|
203
207
|
# @param content [String]
|
208
|
+
# @param parser_engine [Symbol]
|
204
209
|
# @param path [String]
|
205
210
|
# @param target_ruby_version [#to_s]
|
206
211
|
def initialize(
|
207
212
|
content:,
|
213
|
+
parser_engine:,
|
208
214
|
path:,
|
209
215
|
target_ruby_version:
|
210
216
|
)
|
211
217
|
@content = content
|
218
|
+
@parser_engine = parser_engine
|
212
219
|
@path = path
|
213
220
|
@target_ruby_version = target_ruby_version
|
214
221
|
end
|
215
222
|
|
216
223
|
# @return [RuboCop::AST::Node]
|
217
224
|
def call
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
private
|
222
|
-
|
223
|
-
# @return [Parser::Source::Buffer]
|
224
|
-
def buffer
|
225
|
-
::Parser::Source::Buffer.new(
|
225
|
+
::RuboCop::ProcessedSource.new(
|
226
|
+
@content,
|
227
|
+
@target_ruby_version,
|
226
228
|
@path,
|
227
|
-
|
228
|
-
)
|
229
|
-
end
|
230
|
-
|
231
|
-
# @return [RuboCop::AST::Builder]
|
232
|
-
def builder
|
233
|
-
::RuboCop::AST::Builder.new
|
234
|
-
end
|
235
|
-
|
236
|
-
def parser
|
237
|
-
parser_class.new(builder)
|
238
|
-
end
|
239
|
-
|
240
|
-
# @return [Class]
|
241
|
-
def parser_class
|
242
|
-
::Parser.const_get(parser_class_name)
|
243
|
-
end
|
244
|
-
|
245
|
-
# @return [String]
|
246
|
-
def parser_class_name
|
247
|
-
"Ruby#{@target_ruby_version.to_s.delete('.')}"
|
229
|
+
parser_engine: @parser_engine
|
230
|
+
).ast
|
248
231
|
end
|
249
232
|
end
|
250
233
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -66,7 +65,6 @@ dependencies:
|
|
66
65
|
- - ">="
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '2.24'
|
69
|
-
description:
|
70
68
|
email:
|
71
69
|
- r7kamura@gmail.com
|
72
70
|
executables: []
|
@@ -117,7 +115,6 @@ metadata:
|
|
117
115
|
source_code_uri: https://github.com/r7kamura/rubocop-migration
|
118
116
|
changelog_uri: https://github.com/r7kamura/rubocop-migration/releases
|
119
117
|
default_lint_roller_plugin: RuboCop::Migration::Plugin
|
120
|
-
post_install_message:
|
121
118
|
rdoc_options: []
|
122
119
|
require_paths:
|
123
120
|
- lib
|
@@ -132,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
129
|
- !ruby/object:Gem::Version
|
133
130
|
version: '0'
|
134
131
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
136
|
-
signing_key:
|
132
|
+
rubygems_version: 3.6.7
|
137
133
|
specification_version: 4
|
138
134
|
summary: RuboCop plugin for ActiveRecord migration.
|
139
135
|
test_files: []
|