rubocop-migration 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -12
- data/data/reserved_words_mysql.txt +14 -6
- data/lib/rubocop/cop/migration/add_index_duplicate.rb +6 -1
- data/lib/rubocop/cop/migration/remove_column.rb +3 -0
- data/lib/rubocop/cop/migration/reserved_word_mysql.rb +1 -1
- data/lib/rubocop/migration/version.rb +1 -1
- data/rubocop-migration.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6111e3315299e3a1c4253b7d510ad1f6a55d47b02972e0e375c28afba5e7c843
|
4
|
+
data.tar.gz: efda513621a03f5ead2875ef266f53db6359560d28fc31431e81ec1e3c63397c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 493f7789e8f84e6175892ec5155d34a5ac5b48b961b82244f0d079401d999a3ddd96b316c5d61ffa48087377b6647318806254420461308db66b5f3e3bc9d175
|
7
|
+
data.tar.gz: bd1382048435dd5e43b049a9572732ba801cd7fe4617a05e3a0097afd75f8c5b4237b15caade091b279338f907d2327cc9495e922a55e9660d1ff56b406188a9
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-migration (0.
|
4
|
+
rubocop-migration (0.6.0)
|
5
5
|
activesupport
|
6
6
|
rubocop (>= 1.34)
|
7
|
-
rubocop-rails
|
7
|
+
rubocop-rails (>= 2.24)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -38,7 +38,7 @@ GEM
|
|
38
38
|
ast (~> 2.4.1)
|
39
39
|
racc
|
40
40
|
racc (1.7.3)
|
41
|
-
rack (3.
|
41
|
+
rack (3.1.9)
|
42
42
|
rainbow (3.1.1)
|
43
43
|
rake (13.1.0)
|
44
44
|
regexp_parser (2.9.0)
|
@@ -56,7 +56,7 @@ GEM
|
|
56
56
|
diff-lcs (>= 1.2.0, < 2.0)
|
57
57
|
rspec-support (~> 3.12.0)
|
58
58
|
rspec-support (3.12.1)
|
59
|
-
rubocop (1.
|
59
|
+
rubocop (1.63.4)
|
60
60
|
json (~> 2.3)
|
61
61
|
language_server-protocol (>= 3.17.0)
|
62
62
|
parallel (~> 1.10)
|
@@ -64,11 +64,11 @@ GEM
|
|
64
64
|
rainbow (>= 2.2.2, < 4.0)
|
65
65
|
regexp_parser (>= 1.8, < 3.0)
|
66
66
|
rexml (>= 3.2.5, < 4.0)
|
67
|
-
rubocop-ast (>= 1.
|
67
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
68
68
|
ruby-progressbar (~> 1.7)
|
69
69
|
unicode-display_width (>= 2.4.0, < 3.0)
|
70
|
-
rubocop-ast (1.
|
71
|
-
parser (>= 3.
|
70
|
+
rubocop-ast (1.31.2)
|
71
|
+
parser (>= 3.3.0.4)
|
72
72
|
rubocop-capybara (2.20.0)
|
73
73
|
rubocop (~> 1.41)
|
74
74
|
rubocop-factory_bot (2.25.1)
|
@@ -76,17 +76,20 @@ GEM
|
|
76
76
|
rubocop-performance (1.20.2)
|
77
77
|
rubocop (>= 1.48.1, < 2.0)
|
78
78
|
rubocop-ast (>= 1.30.0, < 2.0)
|
79
|
-
rubocop-rails (2.
|
79
|
+
rubocop-rails (2.29.1)
|
80
80
|
activesupport (>= 4.2.0)
|
81
81
|
rack (>= 1.1)
|
82
|
-
rubocop (>= 1.
|
83
|
-
rubocop-ast (>= 1.
|
82
|
+
rubocop (>= 1.52.0, < 2.0)
|
83
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
84
84
|
rubocop-rake (0.6.0)
|
85
85
|
rubocop (~> 1.0)
|
86
|
-
rubocop-rspec (2.
|
86
|
+
rubocop-rspec (2.29.2)
|
87
87
|
rubocop (~> 1.40)
|
88
88
|
rubocop-capybara (~> 2.17)
|
89
89
|
rubocop-factory_bot (~> 2.22)
|
90
|
+
rubocop-rspec_rails (~> 2.28)
|
91
|
+
rubocop-rspec_rails (2.28.3)
|
92
|
+
rubocop (~> 1.40)
|
90
93
|
ruby-progressbar (1.13.0)
|
91
94
|
ruby2_keywords (0.0.5)
|
92
95
|
sevencop (0.35.1)
|
@@ -97,7 +100,7 @@ GEM
|
|
97
100
|
unicode-display_width (2.5.0)
|
98
101
|
|
99
102
|
PLATFORMS
|
100
|
-
|
103
|
+
ruby
|
101
104
|
|
102
105
|
DEPENDENCIES
|
103
106
|
rake
|
@@ -11,7 +11,6 @@ algorithm
|
|
11
11
|
all
|
12
12
|
alter
|
13
13
|
always
|
14
|
-
analyse
|
15
14
|
analyze
|
16
15
|
and
|
17
16
|
any
|
@@ -23,6 +22,7 @@ asensitive
|
|
23
22
|
at
|
24
23
|
attribute
|
25
24
|
authentication
|
25
|
+
auto
|
26
26
|
auto_increment
|
27
27
|
autoextend_size
|
28
28
|
avg
|
@@ -30,6 +30,7 @@ avg_row_length
|
|
30
30
|
backup
|
31
31
|
before
|
32
32
|
begin
|
33
|
+
bernoulli
|
33
34
|
between
|
34
35
|
bigint
|
35
36
|
binary
|
@@ -42,6 +43,7 @@ boolean
|
|
42
43
|
both
|
43
44
|
btree
|
44
45
|
buckets
|
46
|
+
bulk
|
45
47
|
by
|
46
48
|
byte
|
47
49
|
cache
|
@@ -128,7 +130,6 @@ delay_key_write
|
|
128
130
|
delayed
|
129
131
|
delete
|
130
132
|
dense_rank
|
131
|
-
des_key_file
|
132
133
|
desc
|
133
134
|
describe
|
134
135
|
description
|
@@ -211,6 +212,7 @@ full
|
|
211
212
|
fulltext
|
212
213
|
function
|
213
214
|
general
|
215
|
+
generate
|
214
216
|
generated
|
215
217
|
geomcollection
|
216
218
|
geometry
|
@@ -227,6 +229,7 @@ group_replication
|
|
227
229
|
grouping
|
228
230
|
groups
|
229
231
|
gtid_only
|
232
|
+
gtids
|
230
233
|
handler
|
231
234
|
hash
|
232
235
|
having
|
@@ -267,6 +270,7 @@ int3
|
|
267
270
|
int4
|
268
271
|
int8
|
269
272
|
integer
|
273
|
+
intersect
|
270
274
|
interval
|
271
275
|
into
|
272
276
|
invisible
|
@@ -314,6 +318,7 @@ localtimestamp
|
|
314
318
|
lock
|
315
319
|
locked
|
316
320
|
locks
|
321
|
+
log
|
317
322
|
logfile
|
318
323
|
logs
|
319
324
|
long
|
@@ -321,6 +326,7 @@ longblob
|
|
321
326
|
longtext
|
322
327
|
loop
|
323
328
|
low_priority
|
329
|
+
manual
|
324
330
|
master
|
325
331
|
master_auto_position
|
326
332
|
master_bind
|
@@ -335,7 +341,6 @@ master_password
|
|
335
341
|
master_port
|
336
342
|
master_public_key_path
|
337
343
|
master_retry_count
|
338
|
-
master_server_id
|
339
344
|
master_ssl
|
340
345
|
master_ssl_ca
|
341
346
|
master_ssl_capath
|
@@ -435,6 +440,8 @@ over
|
|
435
440
|
owner
|
436
441
|
pack_keys
|
437
442
|
page
|
443
|
+
parallel
|
444
|
+
parse_tree
|
438
445
|
parser
|
439
446
|
partial
|
440
447
|
partition
|
@@ -469,6 +476,7 @@ profile
|
|
469
476
|
profiles
|
470
477
|
proxy
|
471
478
|
purge
|
479
|
+
qualify
|
472
480
|
quarter
|
473
481
|
query
|
474
482
|
quick
|
@@ -484,7 +492,6 @@ rebuild
|
|
484
492
|
recover
|
485
493
|
recursive
|
486
494
|
redo_buffer_size
|
487
|
-
redofile
|
488
495
|
redundant
|
489
496
|
reference
|
490
497
|
references
|
@@ -497,7 +504,6 @@ relay_thread
|
|
497
504
|
relaylog
|
498
505
|
release
|
499
506
|
reload
|
500
|
-
remote
|
501
507
|
remove
|
502
508
|
rename
|
503
509
|
reorganize
|
@@ -546,6 +552,7 @@ row_format
|
|
546
552
|
row_number
|
547
553
|
rows
|
548
554
|
rtree
|
555
|
+
s3
|
549
556
|
savepoint
|
550
557
|
schedule
|
551
558
|
schema
|
@@ -617,7 +624,6 @@ sql_after_mts_gaps
|
|
617
624
|
sql_before_gtids
|
618
625
|
sql_big_result
|
619
626
|
sql_buffer_result
|
620
|
-
sql_cache
|
621
627
|
sql_calc_found_rows
|
622
628
|
sql_no_cache
|
623
629
|
sql_small_result
|
@@ -662,6 +668,7 @@ table
|
|
662
668
|
table_checksum
|
663
669
|
table_name
|
664
670
|
tables
|
671
|
+
tablesample
|
665
672
|
tablespace
|
666
673
|
temporary
|
667
674
|
temptable
|
@@ -705,6 +712,7 @@ unsigned
|
|
705
712
|
until
|
706
713
|
update
|
707
714
|
upgrade
|
715
|
+
url
|
708
716
|
usage
|
709
717
|
use
|
710
718
|
use_frm
|
@@ -135,9 +135,14 @@ module RuboCop
|
|
135
135
|
haystack.join(',').start_with?(needle.join(','))
|
136
136
|
end
|
137
137
|
|
138
|
+
# @return [Symbol]
|
139
|
+
def parser
|
140
|
+
respond_to?(:parser_engine) ? parser_engine : :parser_whitequark
|
141
|
+
end
|
142
|
+
|
138
143
|
# @return [RuboCop::Rails::SchemaLoader::Schema, nil]
|
139
144
|
def schema
|
140
|
-
@schema ||= ::RuboCop::Rails::SchemaLoader.load(target_ruby_version)
|
145
|
+
@schema ||= ::RuboCop::Rails::SchemaLoader.load(target_ruby_version, parser)
|
141
146
|
end
|
142
147
|
|
143
148
|
# @param node [RuboCop::AST::SendNode]
|
@@ -10,6 +10,9 @@ module RuboCop
|
|
10
10
|
#
|
11
11
|
# Active Record caches database columns at runtime, so if you drop a column, it can cause exceptions until your app reboots.
|
12
12
|
#
|
13
|
+
# Note that since this cop goes to read arbitrary model files,
|
14
|
+
# false negatives occur in situations where RuboCop's cache is being used.
|
15
|
+
#
|
13
16
|
# @safety
|
14
17
|
# The logic to check if it is included in `ignored_columns` may fail.
|
15
18
|
#
|
@@ -19,7 +19,7 @@ module RuboCop
|
|
19
19
|
|
20
20
|
MSG = 'Avoid using MySQL reserved words as identifiers.'
|
21
21
|
|
22
|
-
# Obtained from https://dev.mysql.com/doc/refman/8.
|
22
|
+
# Obtained from https://dev.mysql.com/doc/refman/8.4/en/keywords.html.
|
23
23
|
PATH_TO_RESERVED_WORDS_FILE = File.expand_path(
|
24
24
|
'../../../../data/reserved_words_mysql.txt',
|
25
25
|
__dir__
|
data/rubocop-migration.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.24'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.24'
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- r7kamura@gmail.com
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.5.11
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: RuboCop extension focused on ActiveRecord migration.
|