table_sync 6.6.2 → 6.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 854d7166424d48ce354bac8c7ccbc9c93a452bb7582356ab30cda49e4c764e94
4
- data.tar.gz: ea93b2e0cecc02a135e03e72caebc14f684a338efcff1876f1ad76b52e73db72
3
+ metadata.gz: d79554682d06782ddf6862863e32666de78430b0ba10dce09b67158c68eba906
4
+ data.tar.gz: 808d0c20dc4a35e1cd39778be65e0116c954d5bbeb68f4ebee81b35064d6028d
5
5
  SHA512:
6
- metadata.gz: ce0b254960759e00fa22c05a5eb3f631f86f7a446d18666c95cf06a0ffbb899fb44991603f6a833c99061adf210b69efaff08065f0f09b69512baecff10e5dd7
7
- data.tar.gz: 26b182c2ee3fd0cb46f3c40f56257298e02e89bc29e96f4b402956586c18074970541155443b8b450d7b9ba3301feb8e3ca360ceb4ce2e5346c07edd833c21a3
6
+ metadata.gz: f6d8bc62fd1821244ceac8dc144fe9c5fc19a606bcd76cdcf6f55aa26d0926601affa3b56a6572205f2272f22d1f5d6959b0c86477cef6052a020ff28d69d8f2
7
+ data.tar.gz: 82ce14b2f01727197358cbd280f08168603772109c67150e419af5fe50af320504c9b4bb4ded0e4a1c6cb8129747d72112b4107f14f53cf2a0ff3a3ba462d30e
@@ -30,7 +30,7 @@ jobs:
30
30
  strategy:
31
31
  fail-fast: false
32
32
  matrix:
33
- ruby: ["3.1", "3.2", "3.3"]
33
+ ruby: ["3.1", "3.2", "3.3", "3.4"]
34
34
 
35
35
  name: ${{ matrix.ruby }}
36
36
 
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ inherit_gem:
3
3
 
4
4
  AllCops:
5
5
  TargetRubyVersion: 3.1
6
+ SuggestExtensions: false
6
7
  Include:
7
8
  - bin/*
8
9
  - lib/**/*.rb
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [6.7.0] - 2025-01-30
5
+ ### Fixed
6
+ - Removed `tainbox` gem from dependencies
7
+ - `rabbit_messaging` gem version is now locked to `>= 1.6.3`
8
+
4
9
  ## [6.6.1] - 2025-01-30
5
10
  ### Fixed
6
11
  - Delete table_name and schema_name as required for TableSync::Publishing::Raw
data/Gemfile CHANGED
@@ -16,5 +16,6 @@ gem "sequel"
16
16
  gem "timecop"
17
17
 
18
18
  gem "bundler"
19
+ gem "ostruct"
19
20
  gem "pry"
20
21
  gem "rake"
data/Gemfile.lock CHANGED
@@ -1,129 +1,127 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- table_sync (6.6.2)
4
+ table_sync (6.7.0)
5
5
  memery
6
- rabbit_messaging (>= 1.1.0)
6
+ rabbit_messaging (>= 1.6.3)
7
7
  rails
8
8
  self_data
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (7.1.5.1)
14
- actionpack (= 7.1.5.1)
15
- activesupport (= 7.1.5.1)
13
+ actioncable (7.2.2.1)
14
+ actionpack (= 7.2.2.1)
15
+ activesupport (= 7.2.2.1)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
18
  zeitwerk (~> 2.6)
19
- actionmailbox (7.1.5.1)
20
- actionpack (= 7.1.5.1)
21
- activejob (= 7.1.5.1)
22
- activerecord (= 7.1.5.1)
23
- activestorage (= 7.1.5.1)
24
- activesupport (= 7.1.5.1)
25
- mail (>= 2.7.1)
26
- net-imap
27
- net-pop
28
- net-smtp
29
- actionmailer (7.1.5.1)
30
- actionpack (= 7.1.5.1)
31
- actionview (= 7.1.5.1)
32
- activejob (= 7.1.5.1)
33
- activesupport (= 7.1.5.1)
34
- mail (~> 2.5, >= 2.5.4)
35
- net-imap
36
- net-pop
37
- net-smtp
19
+ actionmailbox (7.2.2.1)
20
+ actionpack (= 7.2.2.1)
21
+ activejob (= 7.2.2.1)
22
+ activerecord (= 7.2.2.1)
23
+ activestorage (= 7.2.2.1)
24
+ activesupport (= 7.2.2.1)
25
+ mail (>= 2.8.0)
26
+ actionmailer (7.2.2.1)
27
+ actionpack (= 7.2.2.1)
28
+ actionview (= 7.2.2.1)
29
+ activejob (= 7.2.2.1)
30
+ activesupport (= 7.2.2.1)
31
+ mail (>= 2.8.0)
38
32
  rails-dom-testing (~> 2.2)
39
- actionpack (7.1.5.1)
40
- actionview (= 7.1.5.1)
41
- activesupport (= 7.1.5.1)
33
+ actionpack (7.2.2.1)
34
+ actionview (= 7.2.2.1)
35
+ activesupport (= 7.2.2.1)
42
36
  nokogiri (>= 1.8.5)
43
37
  racc
44
- rack (>= 2.2.4)
38
+ rack (>= 2.2.4, < 3.2)
45
39
  rack-session (>= 1.0.1)
46
40
  rack-test (>= 0.6.3)
47
41
  rails-dom-testing (~> 2.2)
48
42
  rails-html-sanitizer (~> 1.6)
49
- actiontext (7.1.5.1)
50
- actionpack (= 7.1.5.1)
51
- activerecord (= 7.1.5.1)
52
- activestorage (= 7.1.5.1)
53
- activesupport (= 7.1.5.1)
43
+ useragent (~> 0.16)
44
+ actiontext (7.2.2.1)
45
+ actionpack (= 7.2.2.1)
46
+ activerecord (= 7.2.2.1)
47
+ activestorage (= 7.2.2.1)
48
+ activesupport (= 7.2.2.1)
54
49
  globalid (>= 0.6.0)
55
50
  nokogiri (>= 1.8.5)
56
- actionview (7.1.5.1)
57
- activesupport (= 7.1.5.1)
51
+ actionview (7.2.2.1)
52
+ activesupport (= 7.2.2.1)
58
53
  builder (~> 3.1)
59
54
  erubi (~> 1.11)
60
55
  rails-dom-testing (~> 2.2)
61
56
  rails-html-sanitizer (~> 1.6)
62
- activejob (7.1.5.1)
63
- activesupport (= 7.1.5.1)
57
+ activejob (7.2.2.1)
58
+ activesupport (= 7.2.2.1)
64
59
  globalid (>= 0.3.6)
65
- activemodel (7.1.5.1)
66
- activesupport (= 7.1.5.1)
67
- activerecord (7.1.5.1)
68
- activemodel (= 7.1.5.1)
69
- activesupport (= 7.1.5.1)
60
+ activemodel (7.2.2.1)
61
+ activesupport (= 7.2.2.1)
62
+ activerecord (7.2.2.1)
63
+ activemodel (= 7.2.2.1)
64
+ activesupport (= 7.2.2.1)
70
65
  timeout (>= 0.4.0)
71
- activestorage (7.1.5.1)
72
- actionpack (= 7.1.5.1)
73
- activejob (= 7.1.5.1)
74
- activerecord (= 7.1.5.1)
75
- activesupport (= 7.1.5.1)
66
+ activestorage (7.2.2.1)
67
+ actionpack (= 7.2.2.1)
68
+ activejob (= 7.2.2.1)
69
+ activerecord (= 7.2.2.1)
70
+ activesupport (= 7.2.2.1)
76
71
  marcel (~> 1.0)
77
- activesupport (7.1.5.1)
72
+ activesupport (7.2.2.1)
78
73
  base64
79
74
  benchmark (>= 0.3)
80
75
  bigdecimal
81
- concurrent-ruby (~> 1.0, >= 1.0.2)
76
+ concurrent-ruby (~> 1.0, >= 1.3.1)
82
77
  connection_pool (>= 2.2.5)
83
78
  drb
84
79
  i18n (>= 1.6, < 2)
85
80
  logger (>= 1.4.2)
86
81
  minitest (>= 5.1)
87
- mutex_m
88
82
  securerandom (>= 0.3)
89
- tzinfo (~> 2.0)
90
- amq-protocol (2.3.2)
91
- ast (2.4.2)
83
+ tzinfo (~> 2.0, >= 2.0.5)
84
+ amq-protocol (2.3.4)
85
+ ast (2.4.3)
92
86
  base64 (0.2.0)
93
87
  benchmark (0.4.0)
94
- bigdecimal (3.1.8)
88
+ bigdecimal (3.1.9)
95
89
  builder (3.3.0)
96
- bunny (2.23.0)
97
- amq-protocol (~> 2.3, >= 2.3.1)
90
+ bunny (2.24.0)
91
+ amq-protocol (~> 2.3)
98
92
  sorted_set (~> 1, >= 1.0.2)
93
+ cgi (0.4.2)
99
94
  coderay (1.1.3)
100
- concurrent-ruby (1.3.4)
101
- connection_pool (2.4.1)
95
+ concurrent-ruby (1.3.5)
96
+ connection_pool (2.5.3)
102
97
  crass (1.0.6)
103
98
  date (3.4.1)
104
- diff-lcs (1.5.0)
105
- docile (1.4.0)
106
- drb (2.2.1)
107
- erubi (1.13.0)
99
+ diff-lcs (1.6.2)
100
+ docile (1.4.1)
101
+ drb (2.2.3)
102
+ erb (4.0.4)
103
+ cgi (>= 0.3.3)
104
+ erubi (1.13.1)
108
105
  globalid (1.2.1)
109
106
  activesupport (>= 6.1)
110
- i18n (1.14.6)
107
+ i18n (1.14.7)
111
108
  concurrent-ruby (~> 1.0)
112
109
  io-console (0.8.0)
113
- irb (1.14.2)
110
+ irb (1.15.2)
111
+ pp (>= 0.6.0)
114
112
  rdoc (>= 4.0.0)
115
113
  reline (>= 0.4.2)
116
- json (2.6.3)
117
- kicks (3.1.1)
114
+ json (2.12.2)
115
+ kicks (3.2.0)
118
116
  bunny (~> 2.19)
119
117
  concurrent-ruby (~> 1.0)
120
118
  rake (>= 12.3, < 14.0)
121
119
  serverengine (~> 2.1)
122
120
  thor
123
- lamian (1.10.0)
124
- rails (>= 4.2)
125
- logger (1.6.3)
126
- loofah (2.23.1)
121
+ language_server-protocol (3.17.0.5)
122
+ lint_roller (1.1.0)
123
+ logger (1.7.0)
124
+ loofah (2.24.1)
127
125
  crass (~> 1.0.2)
128
126
  nokogiri (>= 1.12.0)
129
127
  mail (2.8.1)
@@ -132,76 +130,93 @@ GEM
132
130
  net-pop
133
131
  net-smtp
134
132
  marcel (1.0.4)
135
- memery (1.5.0)
136
- ruby2_keywords (~> 0.0.2)
133
+ memery (1.7.0)
137
134
  method_source (1.1.0)
138
135
  mini_mime (1.1.5)
139
- mini_portile2 (2.8.8)
140
- minitest (5.25.4)
141
- mutex_m (0.3.0)
142
- net-imap (0.5.2)
136
+ mini_portile2 (2.8.9)
137
+ minitest (5.25.5)
138
+ net-imap (0.5.8)
143
139
  date
144
140
  net-protocol
145
141
  net-pop (0.1.2)
146
142
  net-protocol
147
143
  net-protocol (0.2.2)
148
144
  timeout
149
- net-smtp (0.5.0)
145
+ net-smtp (0.5.1)
150
146
  net-protocol
151
147
  nio4r (2.7.4)
152
- nokogiri (1.17.2)
148
+ nokogiri (1.18.8)
153
149
  mini_portile2 (~> 2.8.2)
154
150
  racc (~> 1.4)
155
- parallel (1.23.0)
156
- parser (3.2.2.3)
151
+ nokogiri (1.18.8-aarch64-linux-gnu)
152
+ racc (~> 1.4)
153
+ nokogiri (1.18.8-aarch64-linux-musl)
154
+ racc (~> 1.4)
155
+ nokogiri (1.18.8-arm-linux-gnu)
156
+ racc (~> 1.4)
157
+ nokogiri (1.18.8-arm-linux-musl)
158
+ racc (~> 1.4)
159
+ nokogiri (1.18.8-arm64-darwin)
160
+ racc (~> 1.4)
161
+ nokogiri (1.18.8-x86_64-darwin)
162
+ racc (~> 1.4)
163
+ nokogiri (1.18.8-x86_64-linux-gnu)
164
+ racc (~> 1.4)
165
+ nokogiri (1.18.8-x86_64-linux-musl)
166
+ racc (~> 1.4)
167
+ ostruct (0.6.1)
168
+ parallel (1.27.0)
169
+ parser (3.3.8.0)
157
170
  ast (~> 2.4.1)
158
171
  racc
159
- pg (1.5.3)
160
- pry (0.14.2)
172
+ pg (1.5.9)
173
+ pp (0.6.2)
174
+ prettyprint
175
+ prettyprint (0.2.0)
176
+ prism (1.4.0)
177
+ pry (0.15.2)
161
178
  coderay (~> 1.1)
162
179
  method_source (~> 1.0)
163
- psych (5.2.1)
180
+ psych (5.2.6)
164
181
  date
165
182
  stringio
166
- rabbit_messaging (1.1.0)
183
+ rabbit_messaging (1.6.3)
167
184
  bunny (~> 2.0)
168
- kicks (~> 3)
169
- lamian
170
- rails (>= 6.1)
171
- tainbox
185
+ kicks
172
186
  racc (1.8.1)
173
- rack (3.1.8)
174
- rack-session (2.0.0)
187
+ rack (3.1.15)
188
+ rack-session (2.1.1)
189
+ base64 (>= 0.1.0)
175
190
  rack (>= 3.0.0)
176
- rack-test (2.1.0)
191
+ rack-test (2.2.0)
177
192
  rack (>= 1.3)
178
193
  rackup (2.2.1)
179
194
  rack (>= 3)
180
- rails (7.1.5.1)
181
- actioncable (= 7.1.5.1)
182
- actionmailbox (= 7.1.5.1)
183
- actionmailer (= 7.1.5.1)
184
- actionpack (= 7.1.5.1)
185
- actiontext (= 7.1.5.1)
186
- actionview (= 7.1.5.1)
187
- activejob (= 7.1.5.1)
188
- activemodel (= 7.1.5.1)
189
- activerecord (= 7.1.5.1)
190
- activestorage (= 7.1.5.1)
191
- activesupport (= 7.1.5.1)
195
+ rails (7.2.2.1)
196
+ actioncable (= 7.2.2.1)
197
+ actionmailbox (= 7.2.2.1)
198
+ actionmailer (= 7.2.2.1)
199
+ actionpack (= 7.2.2.1)
200
+ actiontext (= 7.2.2.1)
201
+ actionview (= 7.2.2.1)
202
+ activejob (= 7.2.2.1)
203
+ activemodel (= 7.2.2.1)
204
+ activerecord (= 7.2.2.1)
205
+ activestorage (= 7.2.2.1)
206
+ activesupport (= 7.2.2.1)
192
207
  bundler (>= 1.15.0)
193
- railties (= 7.1.5.1)
194
- rails-dom-testing (2.2.0)
208
+ railties (= 7.2.2.1)
209
+ rails-dom-testing (2.3.0)
195
210
  activesupport (>= 5.0.0)
196
211
  minitest
197
212
  nokogiri (>= 1.6)
198
213
  rails-html-sanitizer (1.6.2)
199
214
  loofah (~> 2.21)
200
215
  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)
201
- railties (7.1.5.1)
202
- actionpack (= 7.1.5.1)
203
- activesupport (= 7.1.5.1)
204
- irb
216
+ railties (7.2.2.1)
217
+ actionpack (= 7.2.2.1)
218
+ activesupport (= 7.2.2.1)
219
+ irb (~> 1.13)
205
220
  rackup (>= 1.0.0)
206
221
  rake (>= 12.2)
207
222
  thor (~> 1.0, >= 1.2.2)
@@ -209,102 +224,122 @@ GEM
209
224
  rainbow (3.1.1)
210
225
  rake (13.2.1)
211
226
  rbtree (0.4.6)
212
- rdoc (6.9.1)
227
+ rdoc (6.14.0)
228
+ erb
213
229
  psych (>= 4.0.0)
214
- regexp_parser (2.8.1)
215
- reline (0.6.0)
230
+ regexp_parser (2.10.0)
231
+ reline (0.6.1)
216
232
  io-console (~> 0.5)
217
- rexml (3.3.9)
218
- rspec (3.12.0)
219
- rspec-core (~> 3.12.0)
220
- rspec-expectations (~> 3.12.0)
221
- rspec-mocks (~> 3.12.0)
222
- rspec-core (3.12.2)
223
- rspec-support (~> 3.12.0)
224
- rspec-expectations (3.12.3)
233
+ rspec (3.13.1)
234
+ rspec-core (~> 3.13.0)
235
+ rspec-expectations (~> 3.13.0)
236
+ rspec-mocks (~> 3.13.0)
237
+ rspec-core (3.13.4)
238
+ rspec-support (~> 3.13.0)
239
+ rspec-expectations (3.13.5)
225
240
  diff-lcs (>= 1.2.0, < 2.0)
226
- rspec-support (~> 3.12.0)
227
- rspec-mocks (3.12.6)
241
+ rspec-support (~> 3.13.0)
242
+ rspec-mocks (3.13.5)
228
243
  diff-lcs (>= 1.2.0, < 2.0)
229
- rspec-support (~> 3.12.0)
230
- rspec-support (3.12.1)
231
- rubocop (1.50.2)
244
+ rspec-support (~> 3.13.0)
245
+ rspec-support (3.13.4)
246
+ rubocop (1.75.8)
232
247
  json (~> 2.3)
248
+ language_server-protocol (~> 3.17.0.2)
249
+ lint_roller (~> 1.1.0)
233
250
  parallel (~> 1.10)
234
- parser (>= 3.2.0.0)
251
+ parser (>= 3.3.0.2)
235
252
  rainbow (>= 2.2.2, < 4.0)
236
- regexp_parser (>= 1.8, < 3.0)
237
- rexml (>= 3.2.5, < 4.0)
238
- rubocop-ast (>= 1.28.0, < 2.0)
253
+ regexp_parser (>= 2.9.3, < 3.0)
254
+ rubocop-ast (>= 1.44.0, < 2.0)
239
255
  ruby-progressbar (~> 1.7)
240
- unicode-display_width (>= 2.4.0, < 3.0)
241
- rubocop-ast (1.29.0)
242
- parser (>= 3.2.1.0)
243
- rubocop-capybara (2.18.0)
244
- rubocop (~> 1.41)
245
- rubocop-config-umbrellio (1.50.0.85)
246
- rubocop (~> 1.50.0)
247
- rubocop-performance (~> 1.17.0)
248
- rubocop-rails (~> 2.19.0)
249
- rubocop-rake (~> 0.6.0)
250
- rubocop-rspec (~> 2.20.0)
251
- rubocop-sequel (~> 0.3.3)
252
- rubocop-performance (1.17.1)
253
- rubocop (>= 1.7.0, < 2.0)
254
- rubocop-ast (>= 0.4.0)
255
- rubocop-rails (2.19.1)
256
+ unicode-display_width (>= 2.4.0, < 4.0)
257
+ rubocop-ast (1.44.1)
258
+ parser (>= 3.3.7.2)
259
+ prism (~> 1.4)
260
+ rubocop-config-umbrellio (1.75.0.104)
261
+ rubocop (~> 1.75.0)
262
+ rubocop-factory_bot (~> 2.27.0)
263
+ rubocop-performance (~> 1.25.0)
264
+ rubocop-rails (~> 2.32.0)
265
+ rubocop-rake (~> 0.7.0)
266
+ rubocop-rspec (~> 3.6.0)
267
+ rubocop-sequel (~> 0.4.0)
268
+ rubocop-factory_bot (2.27.1)
269
+ lint_roller (~> 1.1)
270
+ rubocop (~> 1.72, >= 1.72.1)
271
+ rubocop-performance (1.25.0)
272
+ lint_roller (~> 1.1)
273
+ rubocop (>= 1.75.0, < 2.0)
274
+ rubocop-ast (>= 1.38.0, < 2.0)
275
+ rubocop-rails (2.32.0)
256
276
  activesupport (>= 4.2.0)
277
+ lint_roller (~> 1.1)
257
278
  rack (>= 1.1)
258
- rubocop (>= 1.33.0, < 2.0)
259
- rubocop-rake (0.6.0)
260
- rubocop (~> 1.0)
261
- rubocop-rspec (2.20.0)
262
- rubocop (~> 1.33)
263
- rubocop-capybara (~> 2.17)
264
- rubocop-sequel (0.3.4)
265
- rubocop (~> 1.0)
279
+ rubocop (>= 1.75.0, < 2.0)
280
+ rubocop-ast (>= 1.44.0, < 2.0)
281
+ rubocop-rake (0.7.1)
282
+ lint_roller (~> 1.1)
283
+ rubocop (>= 1.72.1)
284
+ rubocop-rspec (3.6.0)
285
+ lint_roller (~> 1.1)
286
+ rubocop (~> 1.72, >= 1.72.1)
287
+ rubocop-sequel (0.4.1)
288
+ lint_roller (~> 1.1)
289
+ rubocop (>= 1.72.1, < 2)
266
290
  ruby-progressbar (1.13.0)
267
- ruby2_keywords (0.0.5)
268
291
  securerandom (0.4.1)
269
292
  self_data (1.3.0)
270
- sequel (5.71.0)
293
+ sequel (5.92.0)
294
+ bigdecimal
271
295
  serverengine (2.4.0)
272
296
  base64 (~> 0.1)
273
297
  logger (~> 1.4)
274
298
  sigdump (~> 0.2.2)
275
- set (1.1.1)
299
+ set (1.1.2)
276
300
  sigdump (0.2.5)
277
301
  simplecov (0.22.0)
278
302
  docile (~> 1.1)
279
303
  simplecov-html (~> 0.11)
280
304
  simplecov_json_formatter (~> 0.1)
281
- simplecov-html (0.12.3)
305
+ simplecov-html (0.13.1)
282
306
  simplecov-lcov (0.8.0)
283
307
  simplecov_json_formatter (0.1.4)
284
308
  sorted_set (1.0.3)
285
309
  rbtree
286
310
  set (~> 1.0)
287
- stringio (3.1.2)
288
- tainbox (2.1.2)
289
- activesupport
311
+ stringio (3.1.7)
290
312
  thor (1.3.2)
291
- timecop (0.9.7)
313
+ timecop (0.9.10)
292
314
  timeout (0.4.3)
293
315
  tzinfo (2.0.6)
294
316
  concurrent-ruby (~> 1.0)
295
- unicode-display_width (2.4.2)
296
- websocket-driver (0.7.6)
317
+ unicode-display_width (3.1.4)
318
+ unicode-emoji (~> 4.0, >= 4.0.4)
319
+ unicode-emoji (4.0.4)
320
+ useragent (0.16.11)
321
+ websocket-driver (0.8.0)
322
+ base64
297
323
  websocket-extensions (>= 0.1.0)
298
324
  websocket-extensions (0.1.5)
299
325
  zeitwerk (2.6.18)
300
326
 
301
327
  PLATFORMS
328
+ aarch64-linux-gnu
329
+ aarch64-linux-musl
330
+ arm-linux-gnu
331
+ arm-linux-musl
332
+ arm64-darwin
302
333
  ruby
334
+ x86_64-darwin
335
+ x86_64-linux-gnu
336
+ x86_64-linux-musl
303
337
 
304
338
  DEPENDENCIES
305
339
  activejob
306
340
  activerecord
307
341
  bundler
342
+ ostruct
308
343
  pg
309
344
  pry
310
345
  rake
@@ -1,18 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TableSync::Publishing::Batch
4
- include Tainbox
5
- include TableSync::Utils::RequiredValidator
4
+ attr_accessor :object_class,
5
+ :original_attributes,
6
+ :custom_version,
7
+ :routing_key,
8
+ :headers,
9
+ :event
6
10
 
7
- attribute :object_class
8
- attribute :original_attributes
9
- attribute :custom_version
10
- attribute :routing_key
11
- attribute :headers
11
+ def initialize(attrs = {})
12
+ attrs = attrs.with_indifferent_access
12
13
 
13
- attribute :event, default: :update
14
+ self.object_class = attrs[:object_class]
15
+ self.original_attributes = attrs[:original_attributes]
16
+ self.custom_version = attrs[:custom_version]
17
+ self.routing_key = attrs[:routing_key]
18
+ self.headers = attrs[:headers]
19
+ self.event = attrs.fetch(:event, :update).to_sym
14
20
 
15
- require_attributes :object_class, :original_attributes
21
+ validate_required_attributes!
22
+ end
16
23
 
17
24
  def publish_later
18
25
  job.perform_later(job_attributes)
@@ -30,6 +37,27 @@ class TableSync::Publishing::Batch
30
37
 
31
38
  private
32
39
 
40
+ def validate_required_attributes!
41
+ missing = []
42
+ missing << :object_class if object_class.nil?
43
+ missing << :original_attributes if original_attributes.nil?
44
+
45
+ unless missing.empty?
46
+ raise ArgumentError, "Some of required attributes is not provided: #{missing.inspect}"
47
+ end
48
+ end
49
+
50
+ def attributes
51
+ {
52
+ object_class: object_class,
53
+ original_attributes: original_attributes,
54
+ custom_version: custom_version,
55
+ routing_key: routing_key,
56
+ headers: headers,
57
+ event: event,
58
+ }
59
+ end
60
+
33
61
  # JOB
34
62
 
35
63
  def job
@@ -73,7 +73,7 @@ module TableSync::Publishing::Helpers
73
73
  return current_time if sync_in_the_past? && debounce_time_passed? # case 2.1
74
74
  return debounced_sync_time if sync_in_the_past? && debounce_time_not_passed? # case 2.2
75
75
 
76
- return debounced_sync_time if sync_in_the_future? && destroy_event? # case 3.2
76
+ debounced_sync_time if sync_in_the_future? && destroy_event? # case 3.2
77
77
  end
78
78
 
79
79
  # CASE 1
@@ -2,17 +2,18 @@
2
2
 
3
3
  module TableSync::Publishing::Message
4
4
  class Base
5
- include Tainbox
5
+ attr_accessor :custom_version,
6
+ :object_class,
7
+ :original_attributes,
8
+ :event
6
9
 
7
10
  attr_reader :objects
8
11
 
9
- attribute :custom_version
10
- attribute :object_class
11
- attribute :original_attributes
12
- attribute :event
13
-
14
- def initialize(params)
15
- super(params)
12
+ def initialize(params = {})
13
+ self.custom_version = params[:custom_version]
14
+ self.object_class = params[:object_class]
15
+ self.original_attributes = params[:original_attributes]
16
+ self.event = params[:event].to_sym
16
17
 
17
18
  @objects = find_or_init_objects
18
19
 
@@ -2,12 +2,18 @@
2
2
 
3
3
  module TableSync::Publishing::Message
4
4
  class Batch < Base
5
- attribute :headers
6
- attribute :routing_key
5
+ attr_accessor :headers, :routing_key
6
+
7
+ def initialize(params = {})
8
+ super
9
+
10
+ self.headers = params[:headers]
11
+ self.routing_key = params[:routing_key]
12
+ end
7
13
 
8
14
  def params
9
15
  TableSync::Publishing::Params::Batch.new(
10
- attributes.slice(:object_class, :headers, :routing_key).compact,
16
+ { object_class:, headers:, routing_key: }.compact,
11
17
  ).construct
12
18
  end
13
19
  end
@@ -2,17 +2,25 @@
2
2
 
3
3
  module TableSync::Publishing::Message
4
4
  class Raw
5
- include Tainbox
5
+ attr_accessor :model_name,
6
+ :table_name,
7
+ :schema_name,
8
+ :original_attributes,
9
+ :routing_key,
10
+ :headers,
11
+ :custom_version,
12
+ :event
6
13
 
7
- attribute :model_name
8
- attribute :table_name
9
- attribute :schema_name
10
- attribute :original_attributes
11
-
12
- attribute :routing_key
13
- attribute :headers
14
- attribute :custom_version
15
- attribute :event
14
+ def initialize(params = {})
15
+ self.model_name = params[:model_name]
16
+ self.table_name = params[:table_name]
17
+ self.schema_name = params[:schema_name]
18
+ self.original_attributes = params[:original_attributes]
19
+ self.routing_key = params[:routing_key]
20
+ self.headers = params[:headers]
21
+ self.custom_version = params[:custom_version]
22
+ self.event = params[:event]
23
+ end
16
24
 
17
25
  def publish
18
26
  Rabbit.publish(message_params)
@@ -49,7 +57,7 @@ module TableSync::Publishing::Message
49
57
 
50
58
  def params
51
59
  TableSync::Publishing::Params::Raw.new(
52
- attributes.slice(:model_name, :headers, :routing_key).compact,
60
+ { model_name:, headers:, routing_key: }.compact,
53
61
  ).construct
54
62
  end
55
63
  end
@@ -2,13 +2,27 @@
2
2
 
3
3
  module TableSync::Publishing::Params
4
4
  class Batch < Base
5
- include Tainbox
5
+ attr_accessor :object_class
6
+ attr_writer :exchange_name, :routing_key, :headers
6
7
 
7
- attribute :object_class
8
+ def initialize(attrs = {})
9
+ self.object_class = attrs[:object_class]
10
+ @exchange_name = attrs[:exchange_name]
11
+ @routing_key = attrs[:routing_key]
12
+ @headers = attrs[:headers]
13
+ end
14
+
15
+ def exchange_name
16
+ @exchange_name || TableSync.exchange_name
17
+ end
8
18
 
9
- attribute :exchange_name, default: -> { TableSync.exchange_name }
10
- attribute :routing_key, default: -> { calculated_routing_key }
11
- attribute :headers, default: -> { calculated_headers }
19
+ def routing_key
20
+ @routing_key || calculated_routing_key
21
+ end
22
+
23
+ def headers
24
+ @headers || calculated_headers
25
+ end
12
26
 
13
27
  private
14
28
 
@@ -2,8 +2,13 @@
2
2
 
3
3
  module TableSync::Publishing::Params
4
4
  class Raw < Batch
5
- attribute :model_name
5
+ attr_accessor :model_name
6
6
 
7
7
  alias_method :object_class, :model_name
8
+
9
+ def initialize(attrs = {})
10
+ super
11
+ self.model_name = attrs[:model_name]
12
+ end
8
13
  end
9
14
  end
@@ -1,18 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TableSync::Publishing::Raw
4
- include Tainbox
5
4
  include TableSync::Utils::RequiredValidator
6
5
 
7
- attribute :model_name
8
- attribute :table_name
9
- attribute :schema_name
10
- attribute :original_attributes
11
- attribute :custom_version
12
- attribute :routing_key
13
- attribute :headers
6
+ attr_accessor :model_name,
7
+ :table_name,
8
+ :schema_name,
9
+ :original_attributes,
10
+ :custom_version,
11
+ :routing_key,
12
+ :headers,
13
+ :event
14
14
 
15
- attribute :event, default: :update
15
+ def initialize(attributes = {})
16
+ attributes = attributes.with_indifferent_access
17
+
18
+ self.model_name = attributes[:model_name]
19
+ self.table_name = attributes[:table_name]
20
+ self.schema_name = attributes[:schema_name]
21
+ self.original_attributes = attributes[:original_attributes]
22
+ self.custom_version = attributes[:custom_version]
23
+ self.routing_key = attributes[:routing_key]
24
+ self.headers = attributes[:headers]
25
+ self.event = attributes.fetch(:event, :update).to_sym
26
+ end
16
27
 
17
28
  require_attributes :model_name, :original_attributes
18
29
 
@@ -23,4 +34,19 @@ class TableSync::Publishing::Raw
23
34
  def message
24
35
  TableSync::Publishing::Message::Raw.new(attributes)
25
36
  end
37
+
38
+ private
39
+
40
+ def attributes
41
+ {
42
+ model_name: model_name,
43
+ table_name: table_name,
44
+ schema_name: schema_name,
45
+ original_attributes: original_attributes,
46
+ custom_version: custom_version,
47
+ routing_key: routing_key,
48
+ headers: headers,
49
+ event: event,
50
+ }
51
+ end
26
52
  end
@@ -1,14 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TableSync::Publishing::Single
4
- include Tainbox
5
4
  include Memery
6
5
 
7
- attribute :object_class
8
- attribute :original_attributes
9
- attribute :debounce_time
10
- attribute :custom_version
11
- attribute :event, Symbol, default: :update
6
+ attr_accessor :object_class,
7
+ :original_attributes,
8
+ :debounce_time,
9
+ :custom_version,
10
+ :event
11
+
12
+ def initialize(attrs = {})
13
+ attrs = attrs.with_indifferent_access
14
+
15
+ self.object_class = attrs[:object_class]
16
+ self.original_attributes = attrs[:original_attributes]
17
+ self.debounce_time = attrs[:debounce_time]
18
+ self.custom_version = attrs[:custom_version]
19
+ self.event = attrs.fetch(:event, :update)
20
+ end
12
21
 
13
22
  # expect job to have perform_at method
14
23
  # debounce destroyed event
@@ -40,6 +49,16 @@ class TableSync::Publishing::Single
40
49
 
41
50
  private
42
51
 
52
+ def attributes
53
+ {
54
+ object_class: object_class,
55
+ original_attributes: original_attributes,
56
+ debounce_time: debounce_time,
57
+ custom_version: custom_version,
58
+ event: event,
59
+ }
60
+ end
61
+
43
62
  # JOB
44
63
 
45
64
  def job
@@ -32,7 +32,7 @@ module TableSync::Receiving
32
32
  # through `Receiving::ConfigDecorator#method_missing` which always executes `config.option`
33
33
 
34
34
  def add_option(name, value_setter_wrapper:, value_as_proc_setter_wrapper:, default:)
35
- ivar = "@#{name}".to_sym
35
+ ivar = :"@#{name}"
36
36
 
37
37
  @default_values_for_options ||= {}
38
38
  @default_values_for_options[ivar] = default
@@ -3,10 +3,16 @@
3
3
  class TableSync::Receiving::Handler < Rabbit::EventHandler
4
4
  extend TableSync::Receiving::DSL
5
5
 
6
- # Rabbit::EventHandler uses Tainbox and performs `handler.new(message).call`
7
- attribute :event
8
- attribute :model
9
- attribute :version
6
+ attr_accessor :version
7
+ attr_reader :event, :model
8
+
9
+ def initialize(message)
10
+ super
11
+
12
+ self.event = message.data[:event]
13
+ self.model = message.data[:model]
14
+ self.version = message.data[:version]
15
+ end
10
16
 
11
17
  def call
12
18
  configs.each do |config|
@@ -40,22 +46,22 @@ class TableSync::Receiving::Handler < Rabbit::EventHandler
40
46
  private
41
47
 
42
48
  # redefine setter from Rabbit::EventHandler
43
- def data=(data)
44
- super(Array.wrap(data[:attributes]))
49
+ def data=(raw_data)
50
+ super(Array.wrap(raw_data[:attributes]))
45
51
  end
46
52
 
47
53
  def event=(event_name)
48
54
  event_name = event_name.to_sym
49
55
 
50
56
  if event_name.in?(TableSync::Event::VALID_RESOLVED_EVENTS)
51
- super(event_name)
57
+ @event = event_name
52
58
  else
53
59
  raise TableSync::UndefinedEvent.new(event)
54
60
  end
55
61
  end
56
62
 
57
63
  def model=(model_name)
58
- super(model_name.to_s)
64
+ @model = model_name.to_s
59
65
  end
60
66
 
61
67
  def configs
@@ -143,9 +149,9 @@ class TableSync::Receiving::Handler < Rabbit::EventHandler
143
149
  end
144
150
 
145
151
  if event == :update
146
- model.after_commit { config.after_commit_on_update(**params.merge(results:)) }
152
+ model.after_commit { config.after_commit_on_update(**params, results:) }
147
153
  else
148
- model.after_commit { config.after_commit_on_destroy(**params.merge(results:)) }
154
+ model.after_commit { config.after_commit_on_destroy(**params, results:) }
149
155
  end
150
156
  end
151
157
  end
@@ -85,7 +85,7 @@ module TableSync::Receiving::Model
85
85
  end
86
86
 
87
87
  def destroy(data:, target_keys:, version_key:)
88
- sanitized_data = data.map { |attr| attr.select { |key, _value| target_keys.include?(key) } }
88
+ sanitized_data = data.map { |attr| attr.slice(*target_keys) }
89
89
 
90
90
  query = nil
91
91
  sanitized_data.each_with_index do |row, index|
@@ -41,7 +41,7 @@ module TableSync::Receiving::Model
41
41
  end
42
42
 
43
43
  def destroy(data:, target_keys:, version_key:)
44
- sanitized_data = data.map { |attr| attr.select { |key, _value| target_keys.include?(key) } }
44
+ sanitized_data = data.map { |attr| attr.slice(*target_keys) }
45
45
  sanitized_data = type_cast(sanitized_data)
46
46
  result = dataset.returning.where(::Sequel.|(*sanitized_data)).delete
47
47
 
@@ -2,20 +2,16 @@
2
2
 
3
3
  module TableSync::Setup
4
4
  class Base
5
- include Tainbox
6
-
7
5
  EVENTS = %i[create update destroy].freeze
8
6
  INVALID_EVENT = Class.new(StandardError)
9
7
  INVALID_CONDITION = Class.new(StandardError)
10
8
 
11
- attribute :object_class
12
- attribute :debounce_time
13
- attribute :on
14
- attribute :if_condition
15
- attribute :unless_condition
9
+ attr_accessor :object_class, :debounce_time, :on, :if_condition, :unless_condition
16
10
 
17
- def initialize(attrs)
18
- super(attrs)
11
+ def initialize(attrs = {})
12
+ attrs.each do |key, value|
13
+ public_send("#{key}=", value)
14
+ end
19
15
 
20
16
  self.on = Array.wrap(on).map(&:to_sym)
21
17
 
@@ -7,7 +7,7 @@ module TableSync::Setup
7
7
  def define_after_commit(event)
8
8
  options = options_exposed_for_block
9
9
 
10
- object_class.define_method("after_#{event}".to_sym) do
10
+ object_class.define_method(:"after_#{event}") do
11
11
  if instance_eval(&options[:if]) && !instance_eval(&options[:unless])
12
12
  db.after_commit do
13
13
  TableSync::Publishing::Single.new(
@@ -3,7 +3,7 @@
3
3
  class TableSync::Utils::ProcArray < Proc
4
4
  def initialize(&)
5
5
  @array = []
6
- super(&)
6
+ super
7
7
  end
8
8
 
9
9
  def push(&block)
@@ -36,7 +36,7 @@ module TableSync::Utils
36
36
 
37
37
  def proc_keywords_resolver(&proc_for_wrap)
38
38
  available_keywords = proc_for_wrap.parameters
39
- .select { |type, _name| type == :keyreq }
39
+ .select { |type, _name| type == :keyreq } # rubocop:disable Style/HashSlice
40
40
  .map { |_type, name| name }
41
41
 
42
42
  proc do |keywords = {}, &block|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TableSync
4
- VERSION = "6.6.2"
4
+ VERSION = "6.7.0"
5
5
  end
data/table_sync.gemspec CHANGED
@@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
26
26
  f.match(%r{^(test|spec|features)/})
27
27
  end
28
28
 
29
- spec.add_runtime_dependency "memery"
30
- spec.add_runtime_dependency "rabbit_messaging", ">= 1.1.0"
31
- spec.add_runtime_dependency "rails"
32
- spec.add_runtime_dependency "self_data"
29
+ spec.add_dependency "memery"
30
+ spec.add_dependency "rabbit_messaging", ">= 1.6.3"
31
+ spec.add_dependency "rails"
32
+ spec.add_dependency "self_data"
33
33
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.6.2
4
+ version: 6.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umbrellio
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-06-25 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: memery
@@ -29,14 +30,14 @@ dependencies:
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
- version: 1.1.0
33
+ version: 1.6.3
33
34
  type: :runtime
34
35
  prerelease: false
35
36
  version_requirements: !ruby/object:Gem::Requirement
36
37
  requirements:
37
38
  - - ">="
38
39
  - !ruby/object:Gem::Version
39
- version: 1.1.0
40
+ version: 1.6.3
40
41
  - !ruby/object:Gem::Dependency
41
42
  name: rails
42
43
  requirement: !ruby/object:Gem::Requirement
@@ -134,6 +135,7 @@ homepage: https://github.com/umbrellio/table_sync
134
135
  licenses:
135
136
  - MIT
136
137
  metadata: {}
138
+ post_install_message:
137
139
  rdoc_options: []
138
140
  require_paths:
139
141
  - lib
@@ -148,7 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
150
  - !ruby/object:Gem::Version
149
151
  version: '0'
150
152
  requirements: []
151
- rubygems_version: 3.6.9
153
+ rubygems_version: 3.5.3
154
+ signing_key:
152
155
  specification_version: 4
153
156
  summary: DB Table synchronization between microservices based on Model's event system
154
157
  and RabbitMQ messaging