departure 6.6.0 → 6.8.0

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.
@@ -0,0 +1,274 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ departure (6.7.0)
5
+ activerecord (>= 6.0.0, < 7.3.0, != 7.0.0)
6
+ mysql2 (>= 0.4.0, < 0.6.0)
7
+ railties (>= 6.0.0, < 7.3.0, != 7.0.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actioncable (7.1.3)
13
+ actionpack (= 7.1.3)
14
+ activesupport (= 7.1.3)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ zeitwerk (~> 2.6)
18
+ actionmailbox (7.1.3)
19
+ actionpack (= 7.1.3)
20
+ activejob (= 7.1.3)
21
+ activerecord (= 7.1.3)
22
+ activestorage (= 7.1.3)
23
+ activesupport (= 7.1.3)
24
+ mail (>= 2.7.1)
25
+ net-imap
26
+ net-pop
27
+ net-smtp
28
+ actionmailer (7.1.3)
29
+ actionpack (= 7.1.3)
30
+ actionview (= 7.1.3)
31
+ activejob (= 7.1.3)
32
+ activesupport (= 7.1.3)
33
+ mail (~> 2.5, >= 2.5.4)
34
+ net-imap
35
+ net-pop
36
+ net-smtp
37
+ rails-dom-testing (~> 2.2)
38
+ actionpack (7.1.3)
39
+ actionview (= 7.1.3)
40
+ activesupport (= 7.1.3)
41
+ nokogiri (>= 1.8.5)
42
+ racc
43
+ rack (>= 2.2.4)
44
+ rack-session (>= 1.0.1)
45
+ rack-test (>= 0.6.3)
46
+ rails-dom-testing (~> 2.2)
47
+ rails-html-sanitizer (~> 1.6)
48
+ actiontext (7.1.3)
49
+ actionpack (= 7.1.3)
50
+ activerecord (= 7.1.3)
51
+ activestorage (= 7.1.3)
52
+ activesupport (= 7.1.3)
53
+ globalid (>= 0.6.0)
54
+ nokogiri (>= 1.8.5)
55
+ actionview (7.1.3)
56
+ activesupport (= 7.1.3)
57
+ builder (~> 3.1)
58
+ erubi (~> 1.11)
59
+ rails-dom-testing (~> 2.2)
60
+ rails-html-sanitizer (~> 1.6)
61
+ activejob (7.1.3)
62
+ activesupport (= 7.1.3)
63
+ globalid (>= 0.3.6)
64
+ activemodel (7.1.3)
65
+ activesupport (= 7.1.3)
66
+ activerecord (7.1.3)
67
+ activemodel (= 7.1.3)
68
+ activesupport (= 7.1.3)
69
+ timeout (>= 0.4.0)
70
+ activestorage (7.1.3)
71
+ actionpack (= 7.1.3)
72
+ activejob (= 7.1.3)
73
+ activerecord (= 7.1.3)
74
+ activesupport (= 7.1.3)
75
+ marcel (~> 1.0)
76
+ activesupport (7.1.3)
77
+ base64
78
+ bigdecimal
79
+ concurrent-ruby (~> 1.0, >= 1.0.2)
80
+ connection_pool (>= 2.2.5)
81
+ drb
82
+ i18n (>= 1.6, < 2)
83
+ minitest (>= 5.1)
84
+ mutex_m
85
+ tzinfo (~> 2.0)
86
+ appraisal (2.4.1)
87
+ bundler
88
+ rake
89
+ thor (>= 0.14.0)
90
+ ast (2.4.2)
91
+ base64 (0.2.0)
92
+ bigdecimal (3.1.8)
93
+ builder (3.3.0)
94
+ byebug (11.1.3)
95
+ climate_control (0.0.4)
96
+ activesupport (>= 3.0)
97
+ codeclimate-test-reporter (1.0.9)
98
+ simplecov (<= 0.13)
99
+ coderay (1.1.3)
100
+ concurrent-ruby (1.3.3)
101
+ connection_pool (2.4.1)
102
+ crass (1.0.6)
103
+ date (3.3.4)
104
+ diff-lcs (1.5.1)
105
+ docile (1.1.5)
106
+ drb (2.2.1)
107
+ erubi (1.13.0)
108
+ globalid (1.2.1)
109
+ activesupport (>= 6.1)
110
+ i18n (1.14.5)
111
+ concurrent-ruby (~> 1.0)
112
+ io-console (0.7.2)
113
+ irb (1.14.0)
114
+ rdoc (>= 4.0.0)
115
+ reline (>= 0.4.2)
116
+ json (2.7.2)
117
+ language_server-protocol (3.17.0.4)
118
+ lint_roller (1.1.0)
119
+ loofah (2.22.0)
120
+ crass (~> 1.0.2)
121
+ nokogiri (>= 1.12.0)
122
+ mail (2.8.1)
123
+ mini_mime (>= 0.1.1)
124
+ net-imap
125
+ net-pop
126
+ net-smtp
127
+ marcel (1.0.4)
128
+ method_source (1.1.0)
129
+ mini_mime (1.1.5)
130
+ minitest (5.24.1)
131
+ mutex_m (0.2.0)
132
+ mysql2 (0.5.6)
133
+ net-imap (0.4.12)
134
+ date
135
+ net-protocol
136
+ net-pop (0.1.2)
137
+ net-protocol
138
+ net-protocol (0.2.2)
139
+ timeout
140
+ net-smtp (0.5.0)
141
+ net-protocol
142
+ nio4r (2.7.3)
143
+ nokogiri (1.18.3-arm64-darwin)
144
+ racc (~> 1.4)
145
+ nokogiri (1.18.3-x86_64-linux-gnu)
146
+ racc (~> 1.4)
147
+ parallel (1.26.3)
148
+ parser (3.3.3.0)
149
+ ast (~> 2.4.1)
150
+ racc
151
+ pry (0.14.2)
152
+ coderay (~> 1.1)
153
+ method_source (~> 1.0)
154
+ pry-byebug (3.10.1)
155
+ byebug (~> 11.0)
156
+ pry (>= 0.13, < 0.15)
157
+ psych (5.1.2)
158
+ stringio
159
+ racc (1.8.0)
160
+ rack (3.0.10)
161
+ rack-session (2.0.0)
162
+ rack (>= 3.0.0)
163
+ rack-test (2.1.0)
164
+ rack (>= 1.3)
165
+ rackup (2.1.0)
166
+ rack (>= 3)
167
+ webrick (~> 1.8)
168
+ rails (7.1.3)
169
+ actioncable (= 7.1.3)
170
+ actionmailbox (= 7.1.3)
171
+ actionmailer (= 7.1.3)
172
+ actionpack (= 7.1.3)
173
+ actiontext (= 7.1.3)
174
+ actionview (= 7.1.3)
175
+ activejob (= 7.1.3)
176
+ activemodel (= 7.1.3)
177
+ activerecord (= 7.1.3)
178
+ activestorage (= 7.1.3)
179
+ activesupport (= 7.1.3)
180
+ bundler (>= 1.15.0)
181
+ railties (= 7.1.3)
182
+ rails-dom-testing (2.2.0)
183
+ activesupport (>= 5.0.0)
184
+ minitest
185
+ nokogiri (>= 1.6)
186
+ rails-html-sanitizer (1.6.0)
187
+ loofah (~> 2.21)
188
+ nokogiri (~> 1.14)
189
+ railties (7.1.3)
190
+ actionpack (= 7.1.3)
191
+ activesupport (= 7.1.3)
192
+ irb
193
+ rackup (>= 1.0.0)
194
+ rake (>= 12.2)
195
+ thor (~> 1.0, >= 1.2.2)
196
+ zeitwerk (~> 2.6)
197
+ rainbow (3.1.1)
198
+ rake (13.2.1)
199
+ rdoc (6.7.0)
200
+ psych (>= 4.0.0)
201
+ regexp_parser (2.10.0)
202
+ reline (0.5.9)
203
+ io-console (~> 0.5)
204
+ rspec (3.13.0)
205
+ rspec-core (~> 3.13.0)
206
+ rspec-expectations (~> 3.13.0)
207
+ rspec-mocks (~> 3.13.0)
208
+ rspec-core (3.13.0)
209
+ rspec-support (~> 3.13.0)
210
+ rspec-expectations (3.13.1)
211
+ diff-lcs (>= 1.2.0, < 2.0)
212
+ rspec-support (~> 3.13.0)
213
+ rspec-its (1.3.0)
214
+ rspec-core (>= 3.0.0)
215
+ rspec-expectations (>= 3.0.0)
216
+ rspec-mocks (3.13.1)
217
+ diff-lcs (>= 1.2.0, < 2.0)
218
+ rspec-support (~> 3.13.0)
219
+ rspec-support (3.13.1)
220
+ rubocop (1.74.0)
221
+ json (~> 2.3)
222
+ language_server-protocol (~> 3.17.0.2)
223
+ lint_roller (~> 1.1.0)
224
+ parallel (~> 1.10)
225
+ parser (>= 3.3.0.2)
226
+ rainbow (>= 2.2.2, < 4.0)
227
+ regexp_parser (>= 2.9.3, < 3.0)
228
+ rubocop-ast (>= 1.38.0, < 2.0)
229
+ ruby-progressbar (~> 1.7)
230
+ unicode-display_width (>= 2.4.0, < 4.0)
231
+ rubocop-ast (1.39.0)
232
+ parser (>= 3.3.1.0)
233
+ rubocop-performance (1.20.2)
234
+ rubocop (>= 1.48.1, < 2.0)
235
+ rubocop-ast (>= 1.30.0, < 2.0)
236
+ ruby-progressbar (1.13.0)
237
+ simplecov (0.13.0)
238
+ docile (~> 1.1.0)
239
+ json (>= 1.8, < 3)
240
+ simplecov-html (~> 0.10.0)
241
+ simplecov-html (0.10.2)
242
+ stringio (3.1.1)
243
+ thor (1.3.1)
244
+ timeout (0.4.1)
245
+ tzinfo (2.0.6)
246
+ concurrent-ruby (~> 1.0)
247
+ unicode-display_width (3.1.4)
248
+ unicode-emoji (~> 4.0, >= 4.0.4)
249
+ unicode-emoji (4.0.4)
250
+ webrick (1.8.1)
251
+ websocket-driver (0.7.6)
252
+ websocket-extensions (>= 0.1.0)
253
+ websocket-extensions (0.1.5)
254
+ zeitwerk (2.6.16)
255
+
256
+ PLATFORMS
257
+ arm64-darwin-23
258
+ x86_64-linux
259
+
260
+ DEPENDENCIES
261
+ appraisal (~> 2.4.1)
262
+ climate_control (~> 0.0.3)
263
+ codeclimate-test-reporter (~> 1.0.3)
264
+ departure!
265
+ pry-byebug
266
+ rails (= 7.1.3)
267
+ rake (>= 10.0)
268
+ rspec (~> 3.4, >= 3.4.0)
269
+ rspec-its (~> 1.2)
270
+ rubocop (~> 1.74.0)
271
+ rubocop-performance (~> 1.20.2)
272
+
273
+ BUNDLED WITH
274
+ 2.4.22
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'codeclimate-test-reporter', '~> 1.0.3', group: :test, require: nil
6
+ gem 'rails', '7.2.2.1'
7
+ gem 'rubocop', '~> 1.74.0', require: false
8
+ gem 'rubocop-performance', '~> 1.20.2', require: false
9
+
10
+ gemspec path: '../'
@@ -0,0 +1,276 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ departure (6.7.0)
5
+ activerecord (>= 6.0.0, < 7.3.0, != 7.0.0)
6
+ mysql2 (>= 0.4.0, < 0.6.0)
7
+ railties (>= 6.0.0, < 7.3.0, != 7.0.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actioncable (7.2.2.1)
13
+ actionpack (= 7.2.2.1)
14
+ activesupport (= 7.2.2.1)
15
+ nio4r (~> 2.0)
16
+ websocket-driver (>= 0.6.1)
17
+ zeitwerk (~> 2.6)
18
+ actionmailbox (7.2.2.1)
19
+ actionpack (= 7.2.2.1)
20
+ activejob (= 7.2.2.1)
21
+ activerecord (= 7.2.2.1)
22
+ activestorage (= 7.2.2.1)
23
+ activesupport (= 7.2.2.1)
24
+ mail (>= 2.8.0)
25
+ actionmailer (7.2.2.1)
26
+ actionpack (= 7.2.2.1)
27
+ actionview (= 7.2.2.1)
28
+ activejob (= 7.2.2.1)
29
+ activesupport (= 7.2.2.1)
30
+ mail (>= 2.8.0)
31
+ rails-dom-testing (~> 2.2)
32
+ actionpack (7.2.2.1)
33
+ actionview (= 7.2.2.1)
34
+ activesupport (= 7.2.2.1)
35
+ nokogiri (>= 1.8.5)
36
+ racc
37
+ rack (>= 2.2.4, < 3.2)
38
+ rack-session (>= 1.0.1)
39
+ rack-test (>= 0.6.3)
40
+ rails-dom-testing (~> 2.2)
41
+ rails-html-sanitizer (~> 1.6)
42
+ useragent (~> 0.16)
43
+ actiontext (7.2.2.1)
44
+ actionpack (= 7.2.2.1)
45
+ activerecord (= 7.2.2.1)
46
+ activestorage (= 7.2.2.1)
47
+ activesupport (= 7.2.2.1)
48
+ globalid (>= 0.6.0)
49
+ nokogiri (>= 1.8.5)
50
+ actionview (7.2.2.1)
51
+ activesupport (= 7.2.2.1)
52
+ builder (~> 3.1)
53
+ erubi (~> 1.11)
54
+ rails-dom-testing (~> 2.2)
55
+ rails-html-sanitizer (~> 1.6)
56
+ activejob (7.2.2.1)
57
+ activesupport (= 7.2.2.1)
58
+ globalid (>= 0.3.6)
59
+ activemodel (7.2.2.1)
60
+ activesupport (= 7.2.2.1)
61
+ activerecord (7.2.2.1)
62
+ activemodel (= 7.2.2.1)
63
+ activesupport (= 7.2.2.1)
64
+ timeout (>= 0.4.0)
65
+ activestorage (7.2.2.1)
66
+ actionpack (= 7.2.2.1)
67
+ activejob (= 7.2.2.1)
68
+ activerecord (= 7.2.2.1)
69
+ activesupport (= 7.2.2.1)
70
+ marcel (~> 1.0)
71
+ activesupport (7.2.2.1)
72
+ base64
73
+ benchmark (>= 0.3)
74
+ bigdecimal
75
+ concurrent-ruby (~> 1.0, >= 1.3.1)
76
+ connection_pool (>= 2.2.5)
77
+ drb
78
+ i18n (>= 1.6, < 2)
79
+ logger (>= 1.4.2)
80
+ minitest (>= 5.1)
81
+ securerandom (>= 0.3)
82
+ tzinfo (~> 2.0, >= 2.0.5)
83
+ appraisal (2.4.1)
84
+ bundler
85
+ rake
86
+ thor (>= 0.14.0)
87
+ ast (2.4.2)
88
+ base64 (0.2.0)
89
+ benchmark (0.4.0)
90
+ bigdecimal (3.1.9)
91
+ builder (3.3.0)
92
+ byebug (11.1.3)
93
+ climate_control (0.0.4)
94
+ activesupport (>= 3.0)
95
+ codeclimate-test-reporter (1.0.9)
96
+ simplecov (<= 0.13)
97
+ coderay (1.1.3)
98
+ concurrent-ruby (1.3.5)
99
+ connection_pool (2.5.0)
100
+ crass (1.0.6)
101
+ date (3.4.1)
102
+ diff-lcs (1.6.0)
103
+ docile (1.1.5)
104
+ drb (2.2.1)
105
+ erubi (1.13.1)
106
+ globalid (1.2.1)
107
+ activesupport (>= 6.1)
108
+ i18n (1.14.7)
109
+ concurrent-ruby (~> 1.0)
110
+ io-console (0.8.0)
111
+ irb (1.15.1)
112
+ pp (>= 0.6.0)
113
+ rdoc (>= 4.0.0)
114
+ reline (>= 0.4.2)
115
+ json (2.10.1)
116
+ language_server-protocol (3.17.0.4)
117
+ lint_roller (1.1.0)
118
+ logger (1.6.6)
119
+ loofah (2.24.0)
120
+ crass (~> 1.0.2)
121
+ nokogiri (>= 1.12.0)
122
+ mail (2.8.1)
123
+ mini_mime (>= 0.1.1)
124
+ net-imap
125
+ net-pop
126
+ net-smtp
127
+ marcel (1.0.4)
128
+ method_source (1.1.0)
129
+ mini_mime (1.1.5)
130
+ minitest (5.25.4)
131
+ mysql2 (0.5.6)
132
+ net-imap (0.5.6)
133
+ date
134
+ net-protocol
135
+ net-pop (0.1.2)
136
+ net-protocol
137
+ net-protocol (0.2.2)
138
+ timeout
139
+ net-smtp (0.5.1)
140
+ net-protocol
141
+ nio4r (2.7.4)
142
+ nokogiri (1.18.3-x86_64-linux-gnu)
143
+ racc (~> 1.4)
144
+ parallel (1.26.3)
145
+ parser (3.3.7.1)
146
+ ast (~> 2.4.1)
147
+ racc
148
+ pp (0.6.2)
149
+ prettyprint
150
+ prettyprint (0.2.0)
151
+ pry (0.14.2)
152
+ coderay (~> 1.1)
153
+ method_source (~> 1.0)
154
+ pry-byebug (3.10.1)
155
+ byebug (~> 11.0)
156
+ pry (>= 0.13, < 0.15)
157
+ psych (5.2.3)
158
+ date
159
+ stringio
160
+ racc (1.8.1)
161
+ rack (3.1.11)
162
+ rack-session (2.1.0)
163
+ base64 (>= 0.1.0)
164
+ rack (>= 3.0.0)
165
+ rack-test (2.2.0)
166
+ rack (>= 1.3)
167
+ rackup (2.2.1)
168
+ rack (>= 3)
169
+ rails (7.2.2.1)
170
+ actioncable (= 7.2.2.1)
171
+ actionmailbox (= 7.2.2.1)
172
+ actionmailer (= 7.2.2.1)
173
+ actionpack (= 7.2.2.1)
174
+ actiontext (= 7.2.2.1)
175
+ actionview (= 7.2.2.1)
176
+ activejob (= 7.2.2.1)
177
+ activemodel (= 7.2.2.1)
178
+ activerecord (= 7.2.2.1)
179
+ activestorage (= 7.2.2.1)
180
+ activesupport (= 7.2.2.1)
181
+ bundler (>= 1.15.0)
182
+ railties (= 7.2.2.1)
183
+ rails-dom-testing (2.2.0)
184
+ activesupport (>= 5.0.0)
185
+ minitest
186
+ nokogiri (>= 1.6)
187
+ rails-html-sanitizer (1.6.2)
188
+ loofah (~> 2.21)
189
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
190
+ railties (7.2.2.1)
191
+ actionpack (= 7.2.2.1)
192
+ activesupport (= 7.2.2.1)
193
+ irb (~> 1.13)
194
+ rackup (>= 1.0.0)
195
+ rake (>= 12.2)
196
+ thor (~> 1.0, >= 1.2.2)
197
+ zeitwerk (~> 2.6)
198
+ rainbow (3.1.1)
199
+ rake (13.2.1)
200
+ rdoc (6.12.0)
201
+ psych (>= 4.0.0)
202
+ regexp_parser (2.10.0)
203
+ reline (0.6.0)
204
+ io-console (~> 0.5)
205
+ rspec (3.13.0)
206
+ rspec-core (~> 3.13.0)
207
+ rspec-expectations (~> 3.13.0)
208
+ rspec-mocks (~> 3.13.0)
209
+ rspec-core (3.13.3)
210
+ rspec-support (~> 3.13.0)
211
+ rspec-expectations (3.13.3)
212
+ diff-lcs (>= 1.2.0, < 2.0)
213
+ rspec-support (~> 3.13.0)
214
+ rspec-its (1.3.1)
215
+ rspec-core (>= 3.0.0)
216
+ rspec-expectations (>= 3.0.0)
217
+ rspec-mocks (3.13.2)
218
+ diff-lcs (>= 1.2.0, < 2.0)
219
+ rspec-support (~> 3.13.0)
220
+ rspec-support (3.13.2)
221
+ rubocop (1.74.0)
222
+ json (~> 2.3)
223
+ language_server-protocol (~> 3.17.0.2)
224
+ lint_roller (~> 1.1.0)
225
+ parallel (~> 1.10)
226
+ parser (>= 3.3.0.2)
227
+ rainbow (>= 2.2.2, < 4.0)
228
+ regexp_parser (>= 2.9.3, < 3.0)
229
+ rubocop-ast (>= 1.38.0, < 2.0)
230
+ ruby-progressbar (~> 1.7)
231
+ unicode-display_width (>= 2.4.0, < 4.0)
232
+ rubocop-ast (1.38.1)
233
+ parser (>= 3.3.1.0)
234
+ rubocop-performance (1.20.2)
235
+ rubocop (>= 1.48.1, < 2.0)
236
+ rubocop-ast (>= 1.30.0, < 2.0)
237
+ ruby-progressbar (1.13.0)
238
+ securerandom (0.4.1)
239
+ simplecov (0.13.0)
240
+ docile (~> 1.1.0)
241
+ json (>= 1.8, < 3)
242
+ simplecov-html (~> 0.10.0)
243
+ simplecov-html (0.10.2)
244
+ stringio (3.1.5)
245
+ thor (1.3.2)
246
+ timeout (0.4.3)
247
+ tzinfo (2.0.6)
248
+ concurrent-ruby (~> 1.0)
249
+ unicode-display_width (3.1.4)
250
+ unicode-emoji (~> 4.0, >= 4.0.4)
251
+ unicode-emoji (4.0.4)
252
+ useragent (0.16.11)
253
+ websocket-driver (0.7.7)
254
+ base64
255
+ websocket-extensions (>= 0.1.0)
256
+ websocket-extensions (0.1.5)
257
+ zeitwerk (2.6.18)
258
+
259
+ PLATFORMS
260
+ x86_64-linux
261
+
262
+ DEPENDENCIES
263
+ appraisal (~> 2.4.1)
264
+ climate_control (~> 0.0.3)
265
+ codeclimate-test-reporter (~> 1.0.3)
266
+ departure!
267
+ pry-byebug
268
+ rails (= 7.2.2.1)
269
+ rake (>= 10.0)
270
+ rspec (~> 3.4, >= 3.4.0)
271
+ rspec-its (~> 1.2)
272
+ rubocop (~> 1.74.0)
273
+ rubocop-performance (~> 1.20.2)
274
+
275
+ BUNDLED WITH
276
+ 2.4.22
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_record/connection_handling'
4
+
5
+ module ActiveRecord
6
+ module ConnectionHandling
7
+ # Establishes a connection to the database that's used by all Active
8
+ # Record objects.
9
+ def percona_connection(config)
10
+ if config[:username].nil?
11
+ config = config.dup if config.frozen?
12
+ config[:username] = 'root'
13
+ end
14
+
15
+ Departure::RailsAdapter.for_current.create_connection_adapter(**config)
16
+ end
17
+ end
18
+ end
@@ -1,46 +1,12 @@
1
1
  require 'active_record/connection_adapters/abstract_mysql_adapter'
2
2
  require 'active_record/connection_adapters/statement_pool'
3
3
  require 'active_record/connection_adapters/mysql2_adapter'
4
+ require 'active_record/connection_adapters/patch_connection_handling'
4
5
  require 'active_support/core_ext/string/filters'
5
6
  require 'departure'
6
7
  require 'forwardable'
7
8
 
8
9
  module ActiveRecord
9
- module ConnectionHandling
10
- # Establishes a connection to the database that's used by all Active
11
- # Record objects.
12
- def percona_connection(config)
13
- if config[:username].nil?
14
- config = config.dup if config.frozen?
15
- config[:username] = 'root'
16
- end
17
- mysql2_connection = mysql2_connection(config)
18
-
19
- connection_details = Departure::ConnectionDetails.new(config)
20
- verbose = ActiveRecord::Migration.verbose
21
- sanitizers = [
22
- Departure::LogSanitizers::PasswordSanitizer.new(connection_details)
23
- ]
24
- percona_logger = Departure::LoggerFactory.build(sanitizers: sanitizers, verbose: verbose)
25
- cli_generator = Departure::CliGenerator.new(connection_details)
26
-
27
- runner = Departure::Runner.new(
28
- percona_logger,
29
- cli_generator,
30
- mysql2_connection
31
- )
32
-
33
- connection_options = { mysql_adapter: mysql2_connection }
34
-
35
- ConnectionAdapters::DepartureAdapter.new(
36
- runner,
37
- logger,
38
- connection_options,
39
- config
40
- )
41
- end
42
- end
43
-
44
10
  module ConnectionAdapters
45
11
  class DepartureAdapter < AbstractMysqlAdapter
46
12
  TYPE_MAP = Type::TypeMap.new.tap { |m| initialize_type_map(m) } if defined?(initialize_type_map)