data_migrate 9.4.2 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,77 +1,78 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- data_migrate (9.4.2)
4
+ data_migrate (11.0.0)
5
5
  activerecord (>= 6.1)
6
6
  railties (>= 6.1)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- actioncable (7.1.0)
12
- actionpack (= 7.1.0)
13
- activesupport (= 7.1.0)
11
+ actioncable (7.1.3.4)
12
+ actionpack (= 7.1.3.4)
13
+ activesupport (= 7.1.3.4)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
16
  zeitwerk (~> 2.6)
17
- actionmailbox (7.1.0)
18
- actionpack (= 7.1.0)
19
- activejob (= 7.1.0)
20
- activerecord (= 7.1.0)
21
- activestorage (= 7.1.0)
22
- activesupport (= 7.1.0)
17
+ actionmailbox (7.1.3.4)
18
+ actionpack (= 7.1.3.4)
19
+ activejob (= 7.1.3.4)
20
+ activerecord (= 7.1.3.4)
21
+ activestorage (= 7.1.3.4)
22
+ activesupport (= 7.1.3.4)
23
23
  mail (>= 2.7.1)
24
24
  net-imap
25
25
  net-pop
26
26
  net-smtp
27
- actionmailer (7.1.0)
28
- actionpack (= 7.1.0)
29
- actionview (= 7.1.0)
30
- activejob (= 7.1.0)
31
- activesupport (= 7.1.0)
27
+ actionmailer (7.1.3.4)
28
+ actionpack (= 7.1.3.4)
29
+ actionview (= 7.1.3.4)
30
+ activejob (= 7.1.3.4)
31
+ activesupport (= 7.1.3.4)
32
32
  mail (~> 2.5, >= 2.5.4)
33
33
  net-imap
34
34
  net-pop
35
35
  net-smtp
36
36
  rails-dom-testing (~> 2.2)
37
- actionpack (7.1.0)
38
- actionview (= 7.1.0)
39
- activesupport (= 7.1.0)
37
+ actionpack (7.1.3.4)
38
+ actionview (= 7.1.3.4)
39
+ activesupport (= 7.1.3.4)
40
40
  nokogiri (>= 1.8.5)
41
+ racc
41
42
  rack (>= 2.2.4)
42
43
  rack-session (>= 1.0.1)
43
44
  rack-test (>= 0.6.3)
44
45
  rails-dom-testing (~> 2.2)
45
46
  rails-html-sanitizer (~> 1.6)
46
- actiontext (7.1.0)
47
- actionpack (= 7.1.0)
48
- activerecord (= 7.1.0)
49
- activestorage (= 7.1.0)
50
- activesupport (= 7.1.0)
47
+ actiontext (7.1.3.4)
48
+ actionpack (= 7.1.3.4)
49
+ activerecord (= 7.1.3.4)
50
+ activestorage (= 7.1.3.4)
51
+ activesupport (= 7.1.3.4)
51
52
  globalid (>= 0.6.0)
52
53
  nokogiri (>= 1.8.5)
53
- actionview (7.1.0)
54
- activesupport (= 7.1.0)
54
+ actionview (7.1.3.4)
55
+ activesupport (= 7.1.3.4)
55
56
  builder (~> 3.1)
56
57
  erubi (~> 1.11)
57
58
  rails-dom-testing (~> 2.2)
58
59
  rails-html-sanitizer (~> 1.6)
59
- activejob (7.1.0)
60
- activesupport (= 7.1.0)
60
+ activejob (7.1.3.4)
61
+ activesupport (= 7.1.3.4)
61
62
  globalid (>= 0.3.6)
62
- activemodel (7.1.0)
63
- activesupport (= 7.1.0)
64
- activerecord (7.1.0)
65
- activemodel (= 7.1.0)
66
- activesupport (= 7.1.0)
63
+ activemodel (7.1.3.4)
64
+ activesupport (= 7.1.3.4)
65
+ activerecord (7.1.3.4)
66
+ activemodel (= 7.1.3.4)
67
+ activesupport (= 7.1.3.4)
67
68
  timeout (>= 0.4.0)
68
- activestorage (7.1.0)
69
- actionpack (= 7.1.0)
70
- activejob (= 7.1.0)
71
- activerecord (= 7.1.0)
72
- activesupport (= 7.1.0)
69
+ activestorage (7.1.3.4)
70
+ actionpack (= 7.1.3.4)
71
+ activejob (= 7.1.3.4)
72
+ activerecord (= 7.1.3.4)
73
+ activesupport (= 7.1.3.4)
73
74
  marcel (~> 1.0)
74
- activesupport (7.1.0)
75
+ activesupport (7.1.3.4)
75
76
  base64
76
77
  bigdecimal
77
78
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -87,26 +88,25 @@ GEM
87
88
  thor (>= 0.14.0)
88
89
  ast (2.4.2)
89
90
  base64 (0.2.0)
90
- bigdecimal (3.1.6)
91
- builder (3.2.4)
91
+ bigdecimal (3.1.8)
92
+ builder (3.3.0)
92
93
  childprocess (4.1.0)
93
94
  coderay (1.1.3)
94
- concurrent-ruby (1.2.3)
95
+ concurrent-ruby (1.3.4)
95
96
  connection_pool (2.4.1)
96
97
  crass (1.0.6)
97
98
  date (3.3.4)
98
99
  diff-lcs (1.5.0)
99
- drb (2.2.0)
100
- ruby2_keywords
101
- erubi (1.12.0)
100
+ drb (2.2.1)
101
+ erubi (1.13.0)
102
102
  globalid (1.2.1)
103
103
  activesupport (>= 6.1)
104
- i18n (1.14.1)
104
+ i18n (1.14.5)
105
105
  concurrent-ruby (~> 1.0)
106
106
  iniparse (1.5.0)
107
107
  io-console (0.7.2)
108
- irb (1.11.2)
109
- rdoc
108
+ irb (1.14.0)
109
+ rdoc (>= 4.0.0)
110
110
  reline (>= 0.4.2)
111
111
  json (2.6.3)
112
112
  language_server-protocol (3.17.0.3)
@@ -121,21 +121,25 @@ GEM
121
121
  marcel (1.0.4)
122
122
  method_source (1.0.0)
123
123
  mini_mime (1.1.5)
124
- minitest (5.22.2)
124
+ minitest (5.25.1)
125
125
  mutex_m (0.2.0)
126
- net-imap (0.4.10)
126
+ net-imap (0.4.14)
127
127
  date
128
128
  net-protocol
129
129
  net-pop (0.1.2)
130
130
  net-protocol
131
131
  net-protocol (0.2.2)
132
132
  timeout
133
- net-smtp (0.4.0.1)
133
+ net-smtp (0.5.0)
134
134
  net-protocol
135
- nio4r (2.7.0)
136
- nokogiri (1.16.2-arm64-darwin)
135
+ nio4r (2.7.3)
136
+ nokogiri (1.16.7-aarch64-linux)
137
+ racc (~> 1.4)
138
+ nokogiri (1.16.7-arm64-darwin)
139
+ racc (~> 1.4)
140
+ nokogiri (1.16.7-x86_64-darwin)
137
141
  racc (~> 1.4)
138
- nokogiri (1.16.2-x86_64-linux)
142
+ nokogiri (1.16.7-x86_64-linux)
139
143
  racc (~> 1.4)
140
144
  overcommit (0.60.0)
141
145
  childprocess (>= 0.6.3, < 5)
@@ -150,8 +154,8 @@ GEM
150
154
  method_source (~> 1.0)
151
155
  psych (5.1.2)
152
156
  stringio
153
- racc (1.7.3)
154
- rack (3.0.9.1)
157
+ racc (1.8.1)
158
+ rack (3.1.7)
155
159
  rack-session (2.0.0)
156
160
  rack (>= 3.0.0)
157
161
  rack-test (2.1.0)
@@ -159,20 +163,20 @@ GEM
159
163
  rackup (2.1.0)
160
164
  rack (>= 3)
161
165
  webrick (~> 1.8)
162
- rails (7.1.0)
163
- actioncable (= 7.1.0)
164
- actionmailbox (= 7.1.0)
165
- actionmailer (= 7.1.0)
166
- actionpack (= 7.1.0)
167
- actiontext (= 7.1.0)
168
- actionview (= 7.1.0)
169
- activejob (= 7.1.0)
170
- activemodel (= 7.1.0)
171
- activerecord (= 7.1.0)
172
- activestorage (= 7.1.0)
173
- activesupport (= 7.1.0)
166
+ rails (7.1.3.4)
167
+ actioncable (= 7.1.3.4)
168
+ actionmailbox (= 7.1.3.4)
169
+ actionmailer (= 7.1.3.4)
170
+ actionpack (= 7.1.3.4)
171
+ actiontext (= 7.1.3.4)
172
+ actionview (= 7.1.3.4)
173
+ activejob (= 7.1.3.4)
174
+ activemodel (= 7.1.3.4)
175
+ activerecord (= 7.1.3.4)
176
+ activestorage (= 7.1.3.4)
177
+ activesupport (= 7.1.3.4)
174
178
  bundler (>= 1.15.0)
175
- railties (= 7.1.0)
179
+ railties (= 7.1.3.4)
176
180
  rails-dom-testing (2.2.0)
177
181
  activesupport (>= 5.0.0)
178
182
  minitest
@@ -180,21 +184,21 @@ GEM
180
184
  rails-html-sanitizer (1.6.0)
181
185
  loofah (~> 2.21)
182
186
  nokogiri (~> 1.14)
183
- railties (7.1.0)
184
- actionpack (= 7.1.0)
185
- activesupport (= 7.1.0)
187
+ railties (7.1.3.4)
188
+ actionpack (= 7.1.3.4)
189
+ activesupport (= 7.1.3.4)
186
190
  irb
187
191
  rackup (>= 1.0.0)
188
192
  rake (>= 12.2)
189
193
  thor (~> 1.0, >= 1.2.2)
190
194
  zeitwerk (~> 2.6)
191
195
  rainbow (3.1.1)
192
- rake (13.1.0)
196
+ rake (13.2.1)
193
197
  rb-readline (0.5.5)
194
- rdoc (6.6.2)
198
+ rdoc (6.7.0)
195
199
  psych (>= 4.0.0)
196
200
  regexp_parser (2.8.1)
197
- reline (0.4.3)
201
+ reline (0.5.9)
198
202
  io-console (~> 0.5)
199
203
  rexml (3.2.5)
200
204
  rspec (3.12.0)
@@ -224,10 +228,11 @@ GEM
224
228
  rubocop-ast (1.29.0)
225
229
  parser (>= 3.2.1.0)
226
230
  ruby-progressbar (1.13.0)
227
- ruby2_keywords (0.0.5)
231
+ sqlite3 (1.7.2-aarch64-linux)
228
232
  sqlite3 (1.7.2-arm64-darwin)
233
+ sqlite3 (1.7.2-x86_64-darwin)
229
234
  sqlite3 (1.7.2-x86_64-linux)
230
- stringio (3.1.0)
235
+ stringio (3.1.1)
231
236
  thor (1.3.1)
232
237
  timecop (0.9.6)
233
238
  timeout (0.4.1)
@@ -238,11 +243,13 @@ GEM
238
243
  websocket-driver (0.7.6)
239
244
  websocket-extensions (>= 0.1.0)
240
245
  websocket-extensions (0.1.5)
241
- zeitwerk (2.6.13)
246
+ zeitwerk (2.6.17)
242
247
 
243
248
  PLATFORMS
249
+ aarch64-linux
244
250
  arm64-darwin-22
245
251
  arm64-darwin-23
252
+ x86_64-darwin-22
246
253
  x86_64-linux
247
254
 
248
255
  DEPENDENCIES
@@ -250,7 +257,7 @@ DEPENDENCIES
250
257
  data_migrate!
251
258
  overcommit
252
259
  pry
253
- rails (= 7.1.0)
260
+ rails (~> 7.1.0)
254
261
  rake
255
262
  rb-readline
256
263
  rspec
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 7.2.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,269 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ data_migrate (11.0.0)
5
+ activerecord (>= 6.1)
6
+ railties (>= 6.1)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actioncable (7.2.0)
12
+ actionpack (= 7.2.0)
13
+ activesupport (= 7.2.0)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ zeitwerk (~> 2.6)
17
+ actionmailbox (7.2.0)
18
+ actionpack (= 7.2.0)
19
+ activejob (= 7.2.0)
20
+ activerecord (= 7.2.0)
21
+ activestorage (= 7.2.0)
22
+ activesupport (= 7.2.0)
23
+ mail (>= 2.8.0)
24
+ actionmailer (7.2.0)
25
+ actionpack (= 7.2.0)
26
+ actionview (= 7.2.0)
27
+ activejob (= 7.2.0)
28
+ activesupport (= 7.2.0)
29
+ mail (>= 2.8.0)
30
+ rails-dom-testing (~> 2.2)
31
+ actionpack (7.2.0)
32
+ actionview (= 7.2.0)
33
+ activesupport (= 7.2.0)
34
+ nokogiri (>= 1.8.5)
35
+ racc
36
+ rack (>= 2.2.4, < 3.2)
37
+ rack-session (>= 1.0.1)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.2)
40
+ rails-html-sanitizer (~> 1.6)
41
+ useragent (~> 0.16)
42
+ actiontext (7.2.0)
43
+ actionpack (= 7.2.0)
44
+ activerecord (= 7.2.0)
45
+ activestorage (= 7.2.0)
46
+ activesupport (= 7.2.0)
47
+ globalid (>= 0.6.0)
48
+ nokogiri (>= 1.8.5)
49
+ actionview (7.2.0)
50
+ activesupport (= 7.2.0)
51
+ builder (~> 3.1)
52
+ erubi (~> 1.11)
53
+ rails-dom-testing (~> 2.2)
54
+ rails-html-sanitizer (~> 1.6)
55
+ activejob (7.2.0)
56
+ activesupport (= 7.2.0)
57
+ globalid (>= 0.3.6)
58
+ activemodel (7.2.0)
59
+ activesupport (= 7.2.0)
60
+ activerecord (7.2.0)
61
+ activemodel (= 7.2.0)
62
+ activesupport (= 7.2.0)
63
+ timeout (>= 0.4.0)
64
+ activestorage (7.2.0)
65
+ actionpack (= 7.2.0)
66
+ activejob (= 7.2.0)
67
+ activerecord (= 7.2.0)
68
+ activesupport (= 7.2.0)
69
+ marcel (~> 1.0)
70
+ activesupport (7.2.0)
71
+ base64
72
+ bigdecimal
73
+ concurrent-ruby (~> 1.0, >= 1.3.1)
74
+ connection_pool (>= 2.2.5)
75
+ drb
76
+ i18n (>= 1.6, < 2)
77
+ logger (>= 1.4.2)
78
+ minitest (>= 5.1)
79
+ securerandom (>= 0.3)
80
+ tzinfo (~> 2.0, >= 2.0.5)
81
+ appraisal (2.5.0)
82
+ bundler
83
+ rake
84
+ thor (>= 0.14.0)
85
+ ast (2.4.2)
86
+ base64 (0.2.0)
87
+ bigdecimal (3.1.8)
88
+ builder (3.3.0)
89
+ childprocess (5.0.0)
90
+ coderay (1.1.3)
91
+ concurrent-ruby (1.3.4)
92
+ connection_pool (2.4.1)
93
+ crass (1.0.6)
94
+ date (3.3.4)
95
+ diff-lcs (1.5.1)
96
+ drb (2.2.1)
97
+ erubi (1.13.0)
98
+ globalid (1.2.1)
99
+ activesupport (>= 6.1)
100
+ i18n (1.14.5)
101
+ concurrent-ruby (~> 1.0)
102
+ iniparse (1.5.0)
103
+ io-console (0.7.2)
104
+ irb (1.14.0)
105
+ rdoc (>= 4.0.0)
106
+ reline (>= 0.4.2)
107
+ json (2.7.2)
108
+ language_server-protocol (3.17.0.3)
109
+ logger (1.6.0)
110
+ loofah (2.22.0)
111
+ crass (~> 1.0.2)
112
+ nokogiri (>= 1.12.0)
113
+ mail (2.8.1)
114
+ mini_mime (>= 0.1.1)
115
+ net-imap
116
+ net-pop
117
+ net-smtp
118
+ marcel (1.0.4)
119
+ method_source (1.1.0)
120
+ mini_mime (1.1.5)
121
+ minitest (5.25.1)
122
+ net-imap (0.4.14)
123
+ date
124
+ net-protocol
125
+ net-pop (0.1.2)
126
+ net-protocol
127
+ net-protocol (0.2.2)
128
+ timeout
129
+ net-smtp (0.5.0)
130
+ net-protocol
131
+ nio4r (2.7.3)
132
+ nokogiri (1.16.7-aarch64-linux)
133
+ racc (~> 1.4)
134
+ nokogiri (1.16.7-arm64-darwin)
135
+ racc (~> 1.4)
136
+ nokogiri (1.16.7-x86_64-darwin)
137
+ racc (~> 1.4)
138
+ nokogiri (1.16.7-x86_64-linux)
139
+ racc (~> 1.4)
140
+ overcommit (0.63.0)
141
+ childprocess (>= 0.6.3, < 6)
142
+ iniparse (~> 1.4)
143
+ rexml (~> 3.2)
144
+ parallel (1.24.0)
145
+ parser (3.3.1.0)
146
+ ast (~> 2.4.1)
147
+ racc
148
+ pry (0.14.2)
149
+ coderay (~> 1.1)
150
+ method_source (~> 1.0)
151
+ psych (5.1.2)
152
+ stringio
153
+ racc (1.8.1)
154
+ rack (3.1.7)
155
+ rack-session (2.0.0)
156
+ rack (>= 3.0.0)
157
+ rack-test (2.1.0)
158
+ rack (>= 1.3)
159
+ rackup (2.1.0)
160
+ rack (>= 3)
161
+ webrick (~> 1.8)
162
+ rails (7.2.0)
163
+ actioncable (= 7.2.0)
164
+ actionmailbox (= 7.2.0)
165
+ actionmailer (= 7.2.0)
166
+ actionpack (= 7.2.0)
167
+ actiontext (= 7.2.0)
168
+ actionview (= 7.2.0)
169
+ activejob (= 7.2.0)
170
+ activemodel (= 7.2.0)
171
+ activerecord (= 7.2.0)
172
+ activestorage (= 7.2.0)
173
+ activesupport (= 7.2.0)
174
+ bundler (>= 1.15.0)
175
+ railties (= 7.2.0)
176
+ rails-dom-testing (2.2.0)
177
+ activesupport (>= 5.0.0)
178
+ minitest
179
+ nokogiri (>= 1.6)
180
+ rails-html-sanitizer (1.6.0)
181
+ loofah (~> 2.21)
182
+ nokogiri (~> 1.14)
183
+ railties (7.2.0)
184
+ actionpack (= 7.2.0)
185
+ activesupport (= 7.2.0)
186
+ irb (~> 1.13)
187
+ rackup (>= 1.0.0)
188
+ rake (>= 12.2)
189
+ thor (~> 1.0, >= 1.2.2)
190
+ zeitwerk (~> 2.6)
191
+ rainbow (3.1.1)
192
+ rake (13.2.1)
193
+ rb-readline (0.5.5)
194
+ rdoc (6.7.0)
195
+ psych (>= 4.0.0)
196
+ regexp_parser (2.9.2)
197
+ reline (0.5.9)
198
+ io-console (~> 0.5)
199
+ rexml (3.2.8)
200
+ strscan (>= 3.0.9)
201
+ rspec (3.13.0)
202
+ rspec-core (~> 3.13.0)
203
+ rspec-expectations (~> 3.13.0)
204
+ rspec-mocks (~> 3.13.0)
205
+ rspec-core (3.13.0)
206
+ rspec-support (~> 3.13.0)
207
+ rspec-expectations (3.13.0)
208
+ diff-lcs (>= 1.2.0, < 2.0)
209
+ rspec-support (~> 3.13.0)
210
+ rspec-mocks (3.13.1)
211
+ diff-lcs (>= 1.2.0, < 2.0)
212
+ rspec-support (~> 3.13.0)
213
+ rspec-support (3.13.1)
214
+ rubocop (1.64.0)
215
+ json (~> 2.3)
216
+ language_server-protocol (>= 3.17.0)
217
+ parallel (~> 1.10)
218
+ parser (>= 3.3.0.2)
219
+ rainbow (>= 2.2.2, < 4.0)
220
+ regexp_parser (>= 1.8, < 3.0)
221
+ rexml (>= 3.2.5, < 4.0)
222
+ rubocop-ast (>= 1.31.1, < 2.0)
223
+ ruby-progressbar (~> 1.7)
224
+ unicode-display_width (>= 2.4.0, < 3.0)
225
+ rubocop-ast (1.31.3)
226
+ parser (>= 3.3.1.0)
227
+ ruby-progressbar (1.13.0)
228
+ securerandom (0.3.1)
229
+ sqlite3 (2.0.2-aarch64-linux-gnu)
230
+ sqlite3 (2.0.2-arm64-darwin)
231
+ sqlite3 (2.0.2-x86_64-darwin)
232
+ sqlite3 (2.0.2-x86_64-linux-gnu)
233
+ stringio (3.1.1)
234
+ strscan (3.1.0)
235
+ thor (1.3.1)
236
+ timecop (0.9.8)
237
+ timeout (0.4.1)
238
+ tzinfo (2.0.6)
239
+ concurrent-ruby (~> 1.0)
240
+ unicode-display_width (2.5.0)
241
+ useragent (0.16.10)
242
+ webrick (1.8.1)
243
+ websocket-driver (0.7.6)
244
+ websocket-extensions (>= 0.1.0)
245
+ websocket-extensions (0.1.5)
246
+ zeitwerk (2.6.17)
247
+
248
+ PLATFORMS
249
+ aarch64-linux
250
+ arm64-darwin-23
251
+ x86_64-darwin-22
252
+ x86_64-linux
253
+
254
+ DEPENDENCIES
255
+ appraisal
256
+ data_migrate!
257
+ overcommit
258
+ pry
259
+ rails (~> 7.2.0)
260
+ rake
261
+ rb-readline
262
+ rspec
263
+ rspec-core
264
+ rubocop
265
+ sqlite3
266
+ timecop
267
+
268
+ BUNDLED WITH
269
+ 2.4.17
@@ -179,9 +179,14 @@ module DataMigrate
179
179
 
180
180
  ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
181
181
 
182
- db_configs = ActiveRecord::Base.configurations.configs_for(env_name: ActiveRecord::Tasks::DatabaseTasks.env)
182
+ schema_mapped_versions = if DataMigrate::RailsHelper.rails_version_equal_to_or_higher_than_7_1
183
+ ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions
184
+ else
185
+ db_configs = ActiveRecord::Base.configurations.configs_for(env_name: ActiveRecord::Tasks::DatabaseTasks.env)
186
+
187
+ ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions(db_configs)
188
+ end
183
189
 
184
- schema_mapped_versions = ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions(db_configs)
185
190
  data_mapped_versions = DataMigrate::DatabaseTasks.db_configs_with_versions
186
191
 
187
192
  mapped_versions = schema_mapped_versions.merge(data_mapped_versions) do |_key, schema_db_configs, data_db_configs|
@@ -1,6 +1,11 @@
1
1
  module DataMigrate
2
2
  class RailsHelper
3
3
  class << self
4
+ def rails_version_equal_to_or_higher_than_7_2
5
+ return @equal_to_or_higher_than_7_2 if defined?(@equal_to_or_higher_than_7_2)
6
+
7
+ @equal_to_or_higher_than_7_2 = Gem::Dependency.new("railties", ">= 7.2.0.alpha").match?("railties", Gem.loaded_specs["railties"].version, true)
8
+ end
4
9
  def rails_version_equal_to_or_higher_than_7_1
5
10
  return @equal_to_or_higher_than_7_1 if defined?(@equal_to_or_higher_than_7_1)
6
11
 
@@ -14,7 +19,9 @@ module DataMigrate
14
19
  end
15
20
 
16
21
  def internal_metadata
17
- if rails_version_equal_to_or_higher_than_7_1
22
+ if rails_version_equal_to_or_higher_than_7_2
23
+ ActiveRecord::Base.connection_pool.internal_metadata
24
+ elsif rails_version_equal_to_or_higher_than_7_1
18
25
  ActiveRecord::Base.connection.internal_metadata
19
26
  else
20
27
  ActiveRecord::InternalMetadata
@@ -22,7 +29,9 @@ module DataMigrate
22
29
  end
23
30
 
24
31
  def schema_migration
25
- if rails_version_equal_to_or_higher_than_7_1
32
+ if rails_version_equal_to_or_higher_than_7_2
33
+ ActiveRecord::Base.connection_pool.schema_migration
34
+ elsif rails_version_equal_to_or_higher_than_7_1
26
35
  ActiveRecord::Base.connection.schema_migration
27
36
  else
28
37
  ActiveRecord::SchemaMigration
@@ -54,7 +63,9 @@ module DataMigrate
54
63
  end
55
64
 
56
65
  def data_schema_migration
57
- if rails_version_equal_to_or_higher_than_7_1
66
+ if rails_version_equal_to_or_higher_than_7_2
67
+ DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection_pool)
68
+ elsif rails_version_equal_to_or_higher_than_7_1
58
69
  DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection)
59
70
  else
60
71
  DataMigrate::DataSchemaMigration
@@ -1,3 +1,3 @@
1
1
  module DataMigrate
2
- VERSION = "9.4.2".freeze
2
+ VERSION = "11.0.0".freeze
3
3
  end
@@ -4,7 +4,7 @@ require "spec_helper"
4
4
 
5
5
  describe DataMigrate::DataMigrator do
6
6
  let(:context) { DataMigrate::MigrationContext.new("spec/db/data") }
7
- let(:schema_context) { ActiveRecord::MigrationContext.new("spec/db/migrate", ActiveRecord::Base.connection.schema_migration) }
7
+ let(:schema_context) { ActiveRecord::MigrationContext.new("spec/db/migrate", ar_schema_migration) }
8
8
  let(:db_config) do
9
9
  {
10
10
  adapter: "sqlite3",
@@ -105,4 +105,13 @@ describe DataMigrate::DataMigrator do
105
105
  expect(versions.count).to eq(0)
106
106
  end
107
107
  end
108
+
109
+ # schema migration changed in Rails 7.2, from the connection to the pool object.
110
+ def ar_schema_migration
111
+ if ActiveRecord::Base.connection_pool.respond_to?(:schema_migration)
112
+ ActiveRecord::Base.connection_pool.schema_migration
113
+ else
114
+ ActiveRecord::Base.connection.schema_migration
115
+ end
116
+ end
108
117
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_migrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.4.2
4
+ version: 11.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew J Vargo
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-08-14 00:00:00.000000000 Z
13
+ date: 2024-09-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -212,6 +212,8 @@ files:
212
212
  - gemfiles/rails_7.0.gemfile.lock
213
213
  - gemfiles/rails_7.1.gemfile
214
214
  - gemfiles/rails_7.1.gemfile.lock
215
+ - gemfiles/rails_7.2.gemfile
216
+ - gemfiles/rails_7.2.gemfile.lock
215
217
  - lib/capistrano/data_migrate.rb
216
218
  - lib/capistrano/data_migrate/migrate.rb
217
219
  - lib/data_migrate.rb