table_sync 6.6.2 → 6.6.3

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: f4d1d604c8c1a1763773507a30a2b40e1d8c6cfc36db1d55bc678f17ceb4e514
4
+ data.tar.gz: 86bea118946a433c2105ec1a0a439ff16283002bbf6c678987341faa0a59a206
5
5
  SHA512:
6
- metadata.gz: ce0b254960759e00fa22c05a5eb3f631f86f7a446d18666c95cf06a0ffbb899fb44991603f6a833c99061adf210b69efaff08065f0f09b69512baecff10e5dd7
7
- data.tar.gz: 26b182c2ee3fd0cb46f3c40f56257298e02e89bc29e96f4b402956586c18074970541155443b8b450d7b9ba3301feb8e3ca360ceb4ce2e5346c07edd833c21a3
6
+ metadata.gz: 15dd05d1f45a0ed1227ae4b9f39141d549ccb3e6e24b34be3b22c69669b54c1e25ae41eebde4a760d30a2729ba7c923561296e1e64ceb2d77f76df6dd0d6b471
7
+ data.tar.gz: 7d275fb8fcc32aefcea932b2c5f2dcd4e289889214141423fe5842bfda5eb4399d6cd3dcb1482aa12fd976ea9c7863c12ac8d9fe704aa021954ba5cb8a7f8d7d
@@ -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/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,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- table_sync (6.6.2)
4
+ table_sync (6.6.3)
5
5
  memery
6
6
  rabbit_messaging (>= 1.1.0)
7
7
  rails
@@ -10,120 +10,118 @@ PATH
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,78 @@ 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
+ ostruct (0.6.1)
152
+ parallel (1.27.0)
153
+ parser (3.3.8.0)
157
154
  ast (~> 2.4.1)
158
155
  racc
159
- pg (1.5.3)
160
- pry (0.14.2)
156
+ pg (1.5.9)
157
+ pp (0.6.2)
158
+ prettyprint
159
+ prettyprint (0.2.0)
160
+ prism (1.4.0)
161
+ pry (0.15.2)
161
162
  coderay (~> 1.1)
162
163
  method_source (~> 1.0)
163
- psych (5.2.1)
164
+ psych (5.2.6)
164
165
  date
165
166
  stringio
166
- rabbit_messaging (1.1.0)
167
+ rabbit_messaging (1.5.0)
167
168
  bunny (~> 2.0)
168
- kicks (~> 3)
169
- lamian
170
- rails (>= 6.1)
169
+ kicks
171
170
  tainbox
172
171
  racc (1.8.1)
173
- rack (3.1.8)
174
- rack-session (2.0.0)
172
+ rack (3.1.15)
173
+ rack-session (2.1.1)
174
+ base64 (>= 0.1.0)
175
175
  rack (>= 3.0.0)
176
- rack-test (2.1.0)
176
+ rack-test (2.2.0)
177
177
  rack (>= 1.3)
178
178
  rackup (2.2.1)
179
179
  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)
180
+ rails (7.2.2.1)
181
+ actioncable (= 7.2.2.1)
182
+ actionmailbox (= 7.2.2.1)
183
+ actionmailer (= 7.2.2.1)
184
+ actionpack (= 7.2.2.1)
185
+ actiontext (= 7.2.2.1)
186
+ actionview (= 7.2.2.1)
187
+ activejob (= 7.2.2.1)
188
+ activemodel (= 7.2.2.1)
189
+ activerecord (= 7.2.2.1)
190
+ activestorage (= 7.2.2.1)
191
+ activesupport (= 7.2.2.1)
192
192
  bundler (>= 1.15.0)
193
- railties (= 7.1.5.1)
194
- rails-dom-testing (2.2.0)
193
+ railties (= 7.2.2.1)
194
+ rails-dom-testing (2.3.0)
195
195
  activesupport (>= 5.0.0)
196
196
  minitest
197
197
  nokogiri (>= 1.6)
198
198
  rails-html-sanitizer (1.6.2)
199
199
  loofah (~> 2.21)
200
200
  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
201
+ railties (7.2.2.1)
202
+ actionpack (= 7.2.2.1)
203
+ activesupport (= 7.2.2.1)
204
+ irb (~> 1.13)
205
205
  rackup (>= 1.0.0)
206
206
  rake (>= 12.2)
207
207
  thor (~> 1.0, >= 1.2.2)
@@ -209,91 +209,104 @@ GEM
209
209
  rainbow (3.1.1)
210
210
  rake (13.2.1)
211
211
  rbtree (0.4.6)
212
- rdoc (6.9.1)
212
+ rdoc (6.14.0)
213
+ erb
213
214
  psych (>= 4.0.0)
214
- regexp_parser (2.8.1)
215
- reline (0.6.0)
215
+ regexp_parser (2.10.0)
216
+ reline (0.6.1)
216
217
  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)
218
+ rspec (3.13.1)
219
+ rspec-core (~> 3.13.0)
220
+ rspec-expectations (~> 3.13.0)
221
+ rspec-mocks (~> 3.13.0)
222
+ rspec-core (3.13.4)
223
+ rspec-support (~> 3.13.0)
224
+ rspec-expectations (3.13.5)
225
225
  diff-lcs (>= 1.2.0, < 2.0)
226
- rspec-support (~> 3.12.0)
227
- rspec-mocks (3.12.6)
226
+ rspec-support (~> 3.13.0)
227
+ rspec-mocks (3.13.5)
228
228
  diff-lcs (>= 1.2.0, < 2.0)
229
- rspec-support (~> 3.12.0)
230
- rspec-support (3.12.1)
231
- rubocop (1.50.2)
229
+ rspec-support (~> 3.13.0)
230
+ rspec-support (3.13.4)
231
+ rubocop (1.75.8)
232
232
  json (~> 2.3)
233
+ language_server-protocol (~> 3.17.0.2)
234
+ lint_roller (~> 1.1.0)
233
235
  parallel (~> 1.10)
234
- parser (>= 3.2.0.0)
236
+ parser (>= 3.3.0.2)
235
237
  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)
238
+ regexp_parser (>= 2.9.3, < 3.0)
239
+ rubocop-ast (>= 1.44.0, < 2.0)
239
240
  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)
241
+ unicode-display_width (>= 2.4.0, < 4.0)
242
+ rubocop-ast (1.44.1)
243
+ parser (>= 3.3.7.2)
244
+ prism (~> 1.4)
245
+ rubocop-config-umbrellio (1.75.0.104)
246
+ rubocop (~> 1.75.0)
247
+ rubocop-factory_bot (~> 2.27.0)
248
+ rubocop-performance (~> 1.25.0)
249
+ rubocop-rails (~> 2.32.0)
250
+ rubocop-rake (~> 0.7.0)
251
+ rubocop-rspec (~> 3.6.0)
252
+ rubocop-sequel (~> 0.4.0)
253
+ rubocop-factory_bot (2.27.1)
254
+ lint_roller (~> 1.1)
255
+ rubocop (~> 1.72, >= 1.72.1)
256
+ rubocop-performance (1.25.0)
257
+ lint_roller (~> 1.1)
258
+ rubocop (>= 1.75.0, < 2.0)
259
+ rubocop-ast (>= 1.38.0, < 2.0)
260
+ rubocop-rails (2.32.0)
256
261
  activesupport (>= 4.2.0)
262
+ lint_roller (~> 1.1)
257
263
  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)
264
+ rubocop (>= 1.75.0, < 2.0)
265
+ rubocop-ast (>= 1.44.0, < 2.0)
266
+ rubocop-rake (0.7.1)
267
+ lint_roller (~> 1.1)
268
+ rubocop (>= 1.72.1)
269
+ rubocop-rspec (3.6.0)
270
+ lint_roller (~> 1.1)
271
+ rubocop (~> 1.72, >= 1.72.1)
272
+ rubocop-sequel (0.4.1)
273
+ lint_roller (~> 1.1)
274
+ rubocop (>= 1.72.1, < 2)
266
275
  ruby-progressbar (1.13.0)
267
- ruby2_keywords (0.0.5)
268
276
  securerandom (0.4.1)
269
277
  self_data (1.3.0)
270
- sequel (5.71.0)
278
+ sequel (5.92.0)
279
+ bigdecimal
271
280
  serverengine (2.4.0)
272
281
  base64 (~> 0.1)
273
282
  logger (~> 1.4)
274
283
  sigdump (~> 0.2.2)
275
- set (1.1.1)
284
+ set (1.1.2)
276
285
  sigdump (0.2.5)
277
286
  simplecov (0.22.0)
278
287
  docile (~> 1.1)
279
288
  simplecov-html (~> 0.11)
280
289
  simplecov_json_formatter (~> 0.1)
281
- simplecov-html (0.12.3)
290
+ simplecov-html (0.13.1)
282
291
  simplecov-lcov (0.8.0)
283
292
  simplecov_json_formatter (0.1.4)
284
293
  sorted_set (1.0.3)
285
294
  rbtree
286
295
  set (~> 1.0)
287
- stringio (3.1.2)
296
+ stringio (3.1.7)
288
297
  tainbox (2.1.2)
289
298
  activesupport
290
299
  thor (1.3.2)
291
- timecop (0.9.7)
300
+ timecop (0.9.10)
292
301
  timeout (0.4.3)
293
302
  tzinfo (2.0.6)
294
303
  concurrent-ruby (~> 1.0)
295
- unicode-display_width (2.4.2)
296
- websocket-driver (0.7.6)
304
+ unicode-display_width (3.1.4)
305
+ unicode-emoji (~> 4.0, >= 4.0.4)
306
+ unicode-emoji (4.0.4)
307
+ useragent (0.16.11)
308
+ websocket-driver (0.8.0)
309
+ base64
297
310
  websocket-extensions (>= 0.1.0)
298
311
  websocket-extensions (0.1.5)
299
312
  zeitwerk (2.6.18)
@@ -305,6 +318,7 @@ DEPENDENCIES
305
318
  activejob
306
319
  activerecord
307
320
  bundler
321
+ ostruct
308
322
  pg
309
323
  pry
310
324
  rake
@@ -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
@@ -12,7 +12,7 @@ module TableSync::Publishing::Message
12
12
  attribute :event
13
13
 
14
14
  def initialize(params)
15
- super(params)
15
+ super
16
16
 
17
17
  @objects = find_or_init_objects
18
18
 
@@ -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
@@ -48,7 +48,7 @@ class TableSync::Receiving::Handler < Rabbit::EventHandler
48
48
  event_name = event_name.to_sym
49
49
 
50
50
  if event_name.in?(TableSync::Event::VALID_RESOLVED_EVENTS)
51
- super(event_name)
51
+ super
52
52
  else
53
53
  raise TableSync::UndefinedEvent.new(event)
54
54
  end
@@ -143,9 +143,9 @@ class TableSync::Receiving::Handler < Rabbit::EventHandler
143
143
  end
144
144
 
145
145
  if event == :update
146
- model.after_commit { config.after_commit_on_update(**params.merge(results:)) }
146
+ model.after_commit { config.after_commit_on_update(**params, results:) }
147
147
  else
148
- model.after_commit { config.after_commit_on_destroy(**params.merge(results:)) }
148
+ model.after_commit { config.after_commit_on_destroy(**params, results:) }
149
149
  end
150
150
  end
151
151
  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
 
@@ -15,7 +15,7 @@ module TableSync::Setup
15
15
  attribute :unless_condition
16
16
 
17
17
  def initialize(attrs)
18
- super(attrs)
18
+ super
19
19
 
20
20
  self.on = Array.wrap(on).map(&:to_sym)
21
21
 
@@ -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.6.3"
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.1.0"
31
+ spec.add_dependency "rails"
32
+ spec.add_dependency "self_data"
33
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umbrellio