table_sync 6.6.1 → 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: cae47295c6b798e4c669cfeaa34366fb92c4d843a69bbb35b3f2ffb43423a014
4
- data.tar.gz: fd233855c36684a20dfe7087fec56f018e1192b0c5850521a0b70b6e78256657
3
+ metadata.gz: f4d1d604c8c1a1763773507a30a2b40e1d8c6cfc36db1d55bc678f17ceb4e514
4
+ data.tar.gz: 86bea118946a433c2105ec1a0a439ff16283002bbf6c678987341faa0a59a206
5
5
  SHA512:
6
- metadata.gz: bd5f9c538a3470a8cca2362aa0e1cbda8b35d1f1b464d7f92f30dac2b4277ff6b736691b7fbebac7304e32c4075a0e8623601a9d8cbe7da4e4ff1b614b5d9e64
7
- data.tar.gz: 0b763134f33803a4fc46738968150cf44adffaebb134e327aec225abe6ceda9eafcc3002eb5fe15a646b0903f684eb842ac1015dba2a525806e873e0354cb5e6
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
 
@@ -43,7 +43,6 @@ jobs:
43
43
  bundler-cache: true
44
44
 
45
45
  - run: psql -c 'CREATE DATABASE table_sync_test'
46
- - run: bundle exec rake bundle:audit
47
46
  - run: bundle exec rubocop
48
47
  - run: bundle exec rspec
49
48
 
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,6 +16,6 @@ gem "sequel"
16
16
  gem "timecop"
17
17
 
18
18
  gem "bundler"
19
- gem "bundler-audit"
19
+ gem "ostruct"
20
20
  gem "pry"
21
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.1)
4
+ table_sync (6.6.3)
5
5
  memery
6
6
  rabbit_messaging (>= 1.1.0)
7
7
  rails
@@ -10,123 +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
- bundler-audit (0.9.1)
97
- bundler (>= 1.2.0, < 3)
98
- thor (~> 1.0)
99
- bunny (2.23.0)
100
- amq-protocol (~> 2.3, >= 2.3.1)
90
+ bunny (2.24.0)
91
+ amq-protocol (~> 2.3)
101
92
  sorted_set (~> 1, >= 1.0.2)
93
+ cgi (0.4.2)
102
94
  coderay (1.1.3)
103
- concurrent-ruby (1.3.4)
104
- connection_pool (2.4.1)
95
+ concurrent-ruby (1.3.5)
96
+ connection_pool (2.5.3)
105
97
  crass (1.0.6)
106
98
  date (3.4.1)
107
- diff-lcs (1.5.0)
108
- docile (1.4.0)
109
- drb (2.2.1)
110
- 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)
111
105
  globalid (1.2.1)
112
106
  activesupport (>= 6.1)
113
- i18n (1.14.6)
107
+ i18n (1.14.7)
114
108
  concurrent-ruby (~> 1.0)
115
109
  io-console (0.8.0)
116
- irb (1.14.2)
110
+ irb (1.15.2)
111
+ pp (>= 0.6.0)
117
112
  rdoc (>= 4.0.0)
118
113
  reline (>= 0.4.2)
119
- json (2.6.3)
120
- kicks (3.1.1)
114
+ json (2.12.2)
115
+ kicks (3.2.0)
121
116
  bunny (~> 2.19)
122
117
  concurrent-ruby (~> 1.0)
123
118
  rake (>= 12.3, < 14.0)
124
119
  serverengine (~> 2.1)
125
120
  thor
126
- lamian (1.10.0)
127
- rails (>= 4.2)
128
- logger (1.6.3)
129
- 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)
130
125
  crass (~> 1.0.2)
131
126
  nokogiri (>= 1.12.0)
132
127
  mail (2.8.1)
@@ -135,76 +130,78 @@ GEM
135
130
  net-pop
136
131
  net-smtp
137
132
  marcel (1.0.4)
138
- memery (1.5.0)
139
- ruby2_keywords (~> 0.0.2)
133
+ memery (1.7.0)
140
134
  method_source (1.1.0)
141
135
  mini_mime (1.1.5)
142
- mini_portile2 (2.8.8)
143
- minitest (5.25.4)
144
- mutex_m (0.3.0)
145
- net-imap (0.5.2)
136
+ mini_portile2 (2.8.9)
137
+ minitest (5.25.5)
138
+ net-imap (0.5.8)
146
139
  date
147
140
  net-protocol
148
141
  net-pop (0.1.2)
149
142
  net-protocol
150
143
  net-protocol (0.2.2)
151
144
  timeout
152
- net-smtp (0.5.0)
145
+ net-smtp (0.5.1)
153
146
  net-protocol
154
147
  nio4r (2.7.4)
155
- nokogiri (1.17.2)
148
+ nokogiri (1.18.8)
156
149
  mini_portile2 (~> 2.8.2)
157
150
  racc (~> 1.4)
158
- parallel (1.23.0)
159
- parser (3.2.2.3)
151
+ ostruct (0.6.1)
152
+ parallel (1.27.0)
153
+ parser (3.3.8.0)
160
154
  ast (~> 2.4.1)
161
155
  racc
162
- pg (1.5.3)
163
- 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)
164
162
  coderay (~> 1.1)
165
163
  method_source (~> 1.0)
166
- psych (5.2.1)
164
+ psych (5.2.6)
167
165
  date
168
166
  stringio
169
- rabbit_messaging (1.1.0)
167
+ rabbit_messaging (1.5.0)
170
168
  bunny (~> 2.0)
171
- kicks (~> 3)
172
- lamian
173
- rails (>= 6.1)
169
+ kicks
174
170
  tainbox
175
171
  racc (1.8.1)
176
- rack (3.1.8)
177
- rack-session (2.0.0)
172
+ rack (3.1.15)
173
+ rack-session (2.1.1)
174
+ base64 (>= 0.1.0)
178
175
  rack (>= 3.0.0)
179
- rack-test (2.1.0)
176
+ rack-test (2.2.0)
180
177
  rack (>= 1.3)
181
178
  rackup (2.2.1)
182
179
  rack (>= 3)
183
- rails (7.1.5.1)
184
- actioncable (= 7.1.5.1)
185
- actionmailbox (= 7.1.5.1)
186
- actionmailer (= 7.1.5.1)
187
- actionpack (= 7.1.5.1)
188
- actiontext (= 7.1.5.1)
189
- actionview (= 7.1.5.1)
190
- activejob (= 7.1.5.1)
191
- activemodel (= 7.1.5.1)
192
- activerecord (= 7.1.5.1)
193
- activestorage (= 7.1.5.1)
194
- 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)
195
192
  bundler (>= 1.15.0)
196
- railties (= 7.1.5.1)
197
- rails-dom-testing (2.2.0)
193
+ railties (= 7.2.2.1)
194
+ rails-dom-testing (2.3.0)
198
195
  activesupport (>= 5.0.0)
199
196
  minitest
200
197
  nokogiri (>= 1.6)
201
198
  rails-html-sanitizer (1.6.2)
202
199
  loofah (~> 2.21)
203
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)
204
- railties (7.1.5.1)
205
- actionpack (= 7.1.5.1)
206
- activesupport (= 7.1.5.1)
207
- irb
201
+ railties (7.2.2.1)
202
+ actionpack (= 7.2.2.1)
203
+ activesupport (= 7.2.2.1)
204
+ irb (~> 1.13)
208
205
  rackup (>= 1.0.0)
209
206
  rake (>= 12.2)
210
207
  thor (~> 1.0, >= 1.2.2)
@@ -212,91 +209,104 @@ GEM
212
209
  rainbow (3.1.1)
213
210
  rake (13.2.1)
214
211
  rbtree (0.4.6)
215
- rdoc (6.9.1)
212
+ rdoc (6.14.0)
213
+ erb
216
214
  psych (>= 4.0.0)
217
- regexp_parser (2.8.1)
218
- reline (0.6.0)
215
+ regexp_parser (2.10.0)
216
+ reline (0.6.1)
219
217
  io-console (~> 0.5)
220
- rexml (3.3.9)
221
- rspec (3.12.0)
222
- rspec-core (~> 3.12.0)
223
- rspec-expectations (~> 3.12.0)
224
- rspec-mocks (~> 3.12.0)
225
- rspec-core (3.12.2)
226
- rspec-support (~> 3.12.0)
227
- 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)
228
225
  diff-lcs (>= 1.2.0, < 2.0)
229
- rspec-support (~> 3.12.0)
230
- rspec-mocks (3.12.6)
226
+ rspec-support (~> 3.13.0)
227
+ rspec-mocks (3.13.5)
231
228
  diff-lcs (>= 1.2.0, < 2.0)
232
- rspec-support (~> 3.12.0)
233
- rspec-support (3.12.1)
234
- rubocop (1.50.2)
229
+ rspec-support (~> 3.13.0)
230
+ rspec-support (3.13.4)
231
+ rubocop (1.75.8)
235
232
  json (~> 2.3)
233
+ language_server-protocol (~> 3.17.0.2)
234
+ lint_roller (~> 1.1.0)
236
235
  parallel (~> 1.10)
237
- parser (>= 3.2.0.0)
236
+ parser (>= 3.3.0.2)
238
237
  rainbow (>= 2.2.2, < 4.0)
239
- regexp_parser (>= 1.8, < 3.0)
240
- rexml (>= 3.2.5, < 4.0)
241
- rubocop-ast (>= 1.28.0, < 2.0)
238
+ regexp_parser (>= 2.9.3, < 3.0)
239
+ rubocop-ast (>= 1.44.0, < 2.0)
242
240
  ruby-progressbar (~> 1.7)
243
- unicode-display_width (>= 2.4.0, < 3.0)
244
- rubocop-ast (1.29.0)
245
- parser (>= 3.2.1.0)
246
- rubocop-capybara (2.18.0)
247
- rubocop (~> 1.41)
248
- rubocop-config-umbrellio (1.50.0.85)
249
- rubocop (~> 1.50.0)
250
- rubocop-performance (~> 1.17.0)
251
- rubocop-rails (~> 2.19.0)
252
- rubocop-rake (~> 0.6.0)
253
- rubocop-rspec (~> 2.20.0)
254
- rubocop-sequel (~> 0.3.3)
255
- rubocop-performance (1.17.1)
256
- rubocop (>= 1.7.0, < 2.0)
257
- rubocop-ast (>= 0.4.0)
258
- 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)
259
261
  activesupport (>= 4.2.0)
262
+ lint_roller (~> 1.1)
260
263
  rack (>= 1.1)
261
- rubocop (>= 1.33.0, < 2.0)
262
- rubocop-rake (0.6.0)
263
- rubocop (~> 1.0)
264
- rubocop-rspec (2.20.0)
265
- rubocop (~> 1.33)
266
- rubocop-capybara (~> 2.17)
267
- rubocop-sequel (0.3.4)
268
- 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)
269
275
  ruby-progressbar (1.13.0)
270
- ruby2_keywords (0.0.5)
271
276
  securerandom (0.4.1)
272
277
  self_data (1.3.0)
273
- sequel (5.71.0)
278
+ sequel (5.92.0)
279
+ bigdecimal
274
280
  serverengine (2.4.0)
275
281
  base64 (~> 0.1)
276
282
  logger (~> 1.4)
277
283
  sigdump (~> 0.2.2)
278
- set (1.1.1)
284
+ set (1.1.2)
279
285
  sigdump (0.2.5)
280
286
  simplecov (0.22.0)
281
287
  docile (~> 1.1)
282
288
  simplecov-html (~> 0.11)
283
289
  simplecov_json_formatter (~> 0.1)
284
- simplecov-html (0.12.3)
290
+ simplecov-html (0.13.1)
285
291
  simplecov-lcov (0.8.0)
286
292
  simplecov_json_formatter (0.1.4)
287
293
  sorted_set (1.0.3)
288
294
  rbtree
289
295
  set (~> 1.0)
290
- stringio (3.1.2)
296
+ stringio (3.1.7)
291
297
  tainbox (2.1.2)
292
298
  activesupport
293
299
  thor (1.3.2)
294
- timecop (0.9.7)
300
+ timecop (0.9.10)
295
301
  timeout (0.4.3)
296
302
  tzinfo (2.0.6)
297
303
  concurrent-ruby (~> 1.0)
298
- unicode-display_width (2.4.2)
299
- 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
300
310
  websocket-extensions (>= 0.1.0)
301
311
  websocket-extensions (0.1.5)
302
312
  zeitwerk (2.6.18)
@@ -308,7 +318,7 @@ DEPENDENCIES
308
318
  activejob
309
319
  activerecord
310
320
  bundler
311
- bundler-audit
321
+ ostruct
312
322
  pg
313
323
  pry
314
324
  rake
@@ -321,4 +331,4 @@ DEPENDENCIES
321
331
  timecop
322
332
 
323
333
  BUNDLED WITH
324
- 2.4.6
334
+ 2.6.9
data/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bundler/gem_tasks"
4
- require "bundler/audit/task"
5
4
  require "rspec/core/rake_task"
6
5
  require "rubocop"
7
6
  require "rubocop-rspec"
@@ -17,6 +16,5 @@ RuboCop::RakeTask.new(:rubocop) do |t|
17
16
  end
18
17
 
19
18
  RSpec::Core::RakeTask.new(:rspec)
20
- Bundler::Audit::Task.new
21
19
 
22
20
  task default: :rspec
@@ -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
@@ -124,11 +124,11 @@ module TableSync::Publishing::Helpers
124
124
  end
125
125
 
126
126
  def cache_next_sync_time
127
- Rails.cache.write(
128
- cache_key,
129
- next_sync_time,
130
- expires_at: next_sync_time + debounce_time.seconds,
131
- )
127
+ expires_at = next_sync_time + debounce_time.seconds
128
+ expires_in = expires_at - Time.current
129
+ return if expires_in.negative?
130
+
131
+ Rails.cache.write(cache_key, next_sync_time, expires_in:)
132
132
  end
133
133
 
134
134
  def cache_key
@@ -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.1"
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,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.6.1
4
+ version: 6.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Umbrellio
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-01-30 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: memery
@@ -135,7 +134,6 @@ homepage: https://github.com/umbrellio/table_sync
135
134
  licenses:
136
135
  - MIT
137
136
  metadata: {}
138
- post_install_message:
139
137
  rdoc_options: []
140
138
  require_paths:
141
139
  - lib
@@ -150,8 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
148
  - !ruby/object:Gem::Version
151
149
  version: '0'
152
150
  requirements: []
153
- rubygems_version: 3.5.3
154
- signing_key:
151
+ rubygems_version: 3.6.9
155
152
  specification_version: 4
156
153
  summary: DB Table synchronization between microservices based on Model's event system
157
154
  and RabbitMQ messaging