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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0022087bc8e99cf2bc4e2f3baedb7b2b0ad587ff426f9bcd340646553662c866'
4
- data.tar.gz: ce12e03910ea987ce6a38b809e30e62a37ce22faf0d9ab6c48c0fb4d3b482e5c
3
+ metadata.gz: 21928f0fea19acf1ebaa7f52ce8959beb23971a5628cd22adca0247639a8a0c3
4
+ data.tar.gz: 54a78c51ce7b5067492e5c0c5ada239b0f70c6263357e6240d6e06135802bfcb
5
5
  SHA512:
6
- metadata.gz: 536056846d52490c2fdebbedafb3e4db06704a3f18bb6c1bcf7fbcb9f85e19bc3385f0911fb9358a26bbf4e2c0d56338fd5790821b7881297c51dd73fb9c3356
7
- data.tar.gz: 6c4b6f308b59b2cfcf50cde30072d848f5c5656cba79f0b2248b02a5ef2daf169d9f76d92090ac6e18284f4803a20bd38c80258fc3693254e0a1c9051fbf8114
6
+ metadata.gz: a6e502ebe71d6da7432ac0a7c4e63ae3909a2c697b569d35142bcfb7c0dab53985c0eab0508824ec8beeb5b181048dbb43e07cee9278b14a445151bd9c2003ec
7
+ data.tar.gz: bcf97b0d4a3bd15992ee9cdb68b550f5d60d8eabcb1f44e683fd9306a70111f958380eefbcd43835b5c97a41cae91ed2e1d76ed3042a0aec6fdd7b63848b2c6c
data/.rubocop.yml CHANGED
@@ -4,8 +4,6 @@ plugins:
4
4
  - rubocop-rspec
5
5
  - rubocop-performance
6
6
  - rubocop-rake
7
-
8
- require:
9
7
  - sevencop
10
8
 
11
9
  AllCops:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-migration (0.7.0)
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.0)
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.26.3)
43
- parser (3.3.7.4)
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.12)
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.0)
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.5.0)
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.47.0)
97
+ sevencop (0.48.0)
98
98
  activesupport
99
- rubocop
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
- parser.parse(buffer)
219
- end
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
- source: @content
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Migration
5
- VERSION = '0.7.0'
5
+ VERSION = '0.7.1'
6
6
  end
7
7
  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.0
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: 2025-04-09 00:00:00.000000000 Z
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.3.27
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: []