table_sync 6.0.3 → 6.0.4
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 +4 -4
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +64 -68
- data/lib/table_sync/publishing/helpers/debounce.rb +4 -4
- data/lib/table_sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c48d862b8330d868a174505278c8a49003bf7538c27385f5dab5698758066081
|
|
4
|
+
data.tar.gz: 20069f9959c72c74e1df331c41cc641ba5ea864413580624a99ccacd0334915d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0fd5d6406e00b91cf5f89fa16fa4d507b47fa7abdb801d1697a1607b3f97891947164dcfa73c516514b8fb42b3832717b4410753697f6857b59588a927d07d45
|
|
7
|
+
data.tar.gz: 4e42062c80868f36a8b49b2e2d1c3c3ee6cb630aafaced024382f7d079a3bcd8afc17c6668bcf8dc9cd188f86e54d168b125c88d29906cfbc52c2982d011a63c
|
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.0.4] - 2022-02-05
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `Debouncer` calculates proper `next_sync_time`
|
|
8
|
+
|
|
4
9
|
## [6.0.3] - 2021-12-09
|
|
5
10
|
### Fixed
|
|
6
11
|
Fixed bug when routing key is nil.
|
|
@@ -45,7 +50,7 @@ Separate classes for publishing, object data, Rabbit params, debounce, serializa
|
|
|
45
50
|
|
|
46
51
|
6. Changed ORMAdapters.
|
|
47
52
|
|
|
48
|
-
7. Destroyed objects are initialized.
|
|
53
|
+
7. Destroyed objects are initialized.
|
|
49
54
|
Now custom attributes for destruction will be called on instances.
|
|
50
55
|
- Obj.table_sync_destroy_attributes() -> Obj#attributes_for_destroy
|
|
51
56
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
table_sync (6.0.
|
|
4
|
+
table_sync (6.0.4)
|
|
5
5
|
memery
|
|
6
6
|
rabbit_messaging
|
|
7
7
|
rails
|
|
@@ -10,60 +10,60 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
actioncable (6.1.4.
|
|
14
|
-
actionpack (= 6.1.4.
|
|
15
|
-
activesupport (= 6.1.4.
|
|
13
|
+
actioncable (6.1.4.4)
|
|
14
|
+
actionpack (= 6.1.4.4)
|
|
15
|
+
activesupport (= 6.1.4.4)
|
|
16
16
|
nio4r (~> 2.0)
|
|
17
17
|
websocket-driver (>= 0.6.1)
|
|
18
|
-
actionmailbox (6.1.4.
|
|
19
|
-
actionpack (= 6.1.4.
|
|
20
|
-
activejob (= 6.1.4.
|
|
21
|
-
activerecord (= 6.1.4.
|
|
22
|
-
activestorage (= 6.1.4.
|
|
23
|
-
activesupport (= 6.1.4.
|
|
18
|
+
actionmailbox (6.1.4.4)
|
|
19
|
+
actionpack (= 6.1.4.4)
|
|
20
|
+
activejob (= 6.1.4.4)
|
|
21
|
+
activerecord (= 6.1.4.4)
|
|
22
|
+
activestorage (= 6.1.4.4)
|
|
23
|
+
activesupport (= 6.1.4.4)
|
|
24
24
|
mail (>= 2.7.1)
|
|
25
|
-
actionmailer (6.1.4.
|
|
26
|
-
actionpack (= 6.1.4.
|
|
27
|
-
actionview (= 6.1.4.
|
|
28
|
-
activejob (= 6.1.4.
|
|
29
|
-
activesupport (= 6.1.4.
|
|
25
|
+
actionmailer (6.1.4.4)
|
|
26
|
+
actionpack (= 6.1.4.4)
|
|
27
|
+
actionview (= 6.1.4.4)
|
|
28
|
+
activejob (= 6.1.4.4)
|
|
29
|
+
activesupport (= 6.1.4.4)
|
|
30
30
|
mail (~> 2.5, >= 2.5.4)
|
|
31
31
|
rails-dom-testing (~> 2.0)
|
|
32
|
-
actionpack (6.1.4.
|
|
33
|
-
actionview (= 6.1.4.
|
|
34
|
-
activesupport (= 6.1.4.
|
|
32
|
+
actionpack (6.1.4.4)
|
|
33
|
+
actionview (= 6.1.4.4)
|
|
34
|
+
activesupport (= 6.1.4.4)
|
|
35
35
|
rack (~> 2.0, >= 2.0.9)
|
|
36
36
|
rack-test (>= 0.6.3)
|
|
37
37
|
rails-dom-testing (~> 2.0)
|
|
38
38
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
39
|
-
actiontext (6.1.4.
|
|
40
|
-
actionpack (= 6.1.4.
|
|
41
|
-
activerecord (= 6.1.4.
|
|
42
|
-
activestorage (= 6.1.4.
|
|
43
|
-
activesupport (= 6.1.4.
|
|
39
|
+
actiontext (6.1.4.4)
|
|
40
|
+
actionpack (= 6.1.4.4)
|
|
41
|
+
activerecord (= 6.1.4.4)
|
|
42
|
+
activestorage (= 6.1.4.4)
|
|
43
|
+
activesupport (= 6.1.4.4)
|
|
44
44
|
nokogiri (>= 1.8.5)
|
|
45
|
-
actionview (6.1.4.
|
|
46
|
-
activesupport (= 6.1.4.
|
|
45
|
+
actionview (6.1.4.4)
|
|
46
|
+
activesupport (= 6.1.4.4)
|
|
47
47
|
builder (~> 3.1)
|
|
48
48
|
erubi (~> 1.4)
|
|
49
49
|
rails-dom-testing (~> 2.0)
|
|
50
50
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
51
|
-
activejob (6.1.4.
|
|
52
|
-
activesupport (= 6.1.4.
|
|
51
|
+
activejob (6.1.4.4)
|
|
52
|
+
activesupport (= 6.1.4.4)
|
|
53
53
|
globalid (>= 0.3.6)
|
|
54
|
-
activemodel (6.1.4.
|
|
55
|
-
activesupport (= 6.1.4.
|
|
56
|
-
activerecord (6.1.4.
|
|
57
|
-
activemodel (= 6.1.4.
|
|
58
|
-
activesupport (= 6.1.4.
|
|
59
|
-
activestorage (6.1.4.
|
|
60
|
-
actionpack (= 6.1.4.
|
|
61
|
-
activejob (= 6.1.4.
|
|
62
|
-
activerecord (= 6.1.4.
|
|
63
|
-
activesupport (= 6.1.4.
|
|
54
|
+
activemodel (6.1.4.4)
|
|
55
|
+
activesupport (= 6.1.4.4)
|
|
56
|
+
activerecord (6.1.4.4)
|
|
57
|
+
activemodel (= 6.1.4.4)
|
|
58
|
+
activesupport (= 6.1.4.4)
|
|
59
|
+
activestorage (6.1.4.4)
|
|
60
|
+
actionpack (= 6.1.4.4)
|
|
61
|
+
activejob (= 6.1.4.4)
|
|
62
|
+
activerecord (= 6.1.4.4)
|
|
63
|
+
activesupport (= 6.1.4.4)
|
|
64
64
|
marcel (~> 1.0.0)
|
|
65
65
|
mini_mime (>= 1.1.0)
|
|
66
|
-
activesupport (6.1.4.
|
|
66
|
+
activesupport (6.1.4.4)
|
|
67
67
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
68
68
|
i18n (>= 1.6, < 2)
|
|
69
69
|
minitest (>= 5.1)
|
|
@@ -84,16 +84,13 @@ GEM
|
|
|
84
84
|
diff-lcs (1.4.4)
|
|
85
85
|
docile (1.3.5)
|
|
86
86
|
erubi (1.10.0)
|
|
87
|
-
|
|
88
|
-
actionmailer (>= 4.0, < 7)
|
|
89
|
-
activesupport (>= 4.0, < 7)
|
|
90
|
-
globalid (0.5.2)
|
|
87
|
+
globalid (1.0.0)
|
|
91
88
|
activesupport (>= 5.0)
|
|
92
|
-
i18n (1.
|
|
89
|
+
i18n (1.9.1)
|
|
93
90
|
concurrent-ruby (~> 1.0)
|
|
94
|
-
lamian (1.
|
|
91
|
+
lamian (1.5.0)
|
|
95
92
|
rails (>= 4.2)
|
|
96
|
-
loofah (2.
|
|
93
|
+
loofah (2.13.0)
|
|
97
94
|
crass (~> 1.0.2)
|
|
98
95
|
nokogiri (>= 1.5.9)
|
|
99
96
|
mail (2.7.1)
|
|
@@ -104,7 +101,7 @@ GEM
|
|
|
104
101
|
method_source (1.0.0)
|
|
105
102
|
mini_mime (1.1.2)
|
|
106
103
|
mini_portile2 (2.6.1)
|
|
107
|
-
minitest (5.
|
|
104
|
+
minitest (5.15.0)
|
|
108
105
|
nio4r (2.5.8)
|
|
109
106
|
nokogiri (1.12.5)
|
|
110
107
|
mini_portile2 (~> 2.6.1)
|
|
@@ -116,9 +113,8 @@ GEM
|
|
|
116
113
|
pry (0.14.0)
|
|
117
114
|
coderay (~> 1.1)
|
|
118
115
|
method_source (~> 1.0)
|
|
119
|
-
rabbit_messaging (0.12.
|
|
116
|
+
rabbit_messaging (0.12.1)
|
|
120
117
|
bunny (~> 2.0)
|
|
121
|
-
exception_notification
|
|
122
118
|
lamian
|
|
123
119
|
rails (>= 5.2)
|
|
124
120
|
sneakers (~> 2.0)
|
|
@@ -127,35 +123,35 @@ GEM
|
|
|
127
123
|
rack (2.2.3)
|
|
128
124
|
rack-test (1.1.0)
|
|
129
125
|
rack (>= 1.0, < 3)
|
|
130
|
-
rails (6.1.4.
|
|
131
|
-
actioncable (= 6.1.4.
|
|
132
|
-
actionmailbox (= 6.1.4.
|
|
133
|
-
actionmailer (= 6.1.4.
|
|
134
|
-
actionpack (= 6.1.4.
|
|
135
|
-
actiontext (= 6.1.4.
|
|
136
|
-
actionview (= 6.1.4.
|
|
137
|
-
activejob (= 6.1.4.
|
|
138
|
-
activemodel (= 6.1.4.
|
|
139
|
-
activerecord (= 6.1.4.
|
|
140
|
-
activestorage (= 6.1.4.
|
|
141
|
-
activesupport (= 6.1.4.
|
|
126
|
+
rails (6.1.4.4)
|
|
127
|
+
actioncable (= 6.1.4.4)
|
|
128
|
+
actionmailbox (= 6.1.4.4)
|
|
129
|
+
actionmailer (= 6.1.4.4)
|
|
130
|
+
actionpack (= 6.1.4.4)
|
|
131
|
+
actiontext (= 6.1.4.4)
|
|
132
|
+
actionview (= 6.1.4.4)
|
|
133
|
+
activejob (= 6.1.4.4)
|
|
134
|
+
activemodel (= 6.1.4.4)
|
|
135
|
+
activerecord (= 6.1.4.4)
|
|
136
|
+
activestorage (= 6.1.4.4)
|
|
137
|
+
activesupport (= 6.1.4.4)
|
|
142
138
|
bundler (>= 1.15.0)
|
|
143
|
-
railties (= 6.1.4.
|
|
139
|
+
railties (= 6.1.4.4)
|
|
144
140
|
sprockets-rails (>= 2.0.0)
|
|
145
141
|
rails-dom-testing (2.0.3)
|
|
146
142
|
activesupport (>= 4.2.0)
|
|
147
143
|
nokogiri (>= 1.6)
|
|
148
144
|
rails-html-sanitizer (1.4.2)
|
|
149
145
|
loofah (~> 2.3)
|
|
150
|
-
railties (6.1.4.
|
|
151
|
-
actionpack (= 6.1.4.
|
|
152
|
-
activesupport (= 6.1.4.
|
|
146
|
+
railties (6.1.4.4)
|
|
147
|
+
actionpack (= 6.1.4.4)
|
|
148
|
+
activesupport (= 6.1.4.4)
|
|
153
149
|
method_source
|
|
154
150
|
rake (>= 0.13)
|
|
155
151
|
thor (~> 1.0)
|
|
156
152
|
rainbow (3.0.0)
|
|
157
153
|
rake (13.0.6)
|
|
158
|
-
rbtree (0.4.
|
|
154
|
+
rbtree (0.4.5)
|
|
159
155
|
regexp_parser (2.1.1)
|
|
160
156
|
rexml (3.2.5)
|
|
161
157
|
rspec (3.10.0)
|
|
@@ -230,13 +226,13 @@ GEM
|
|
|
230
226
|
sprockets (4.0.2)
|
|
231
227
|
concurrent-ruby (~> 1.0)
|
|
232
228
|
rack (> 1, < 3)
|
|
233
|
-
sprockets-rails (3.4.
|
|
229
|
+
sprockets-rails (3.4.2)
|
|
234
230
|
actionpack (>= 5.2)
|
|
235
231
|
activesupport (>= 5.2)
|
|
236
232
|
sprockets (>= 3.0.0)
|
|
237
233
|
tainbox (2.1.2)
|
|
238
234
|
activesupport
|
|
239
|
-
thor (1.1
|
|
235
|
+
thor (1.2.1)
|
|
240
236
|
timecop (0.9.4)
|
|
241
237
|
tzinfo (2.0.4)
|
|
242
238
|
concurrent-ruby (~> 1.0)
|
|
@@ -244,7 +240,7 @@ GEM
|
|
|
244
240
|
websocket-driver (0.7.5)
|
|
245
241
|
websocket-extensions (>= 0.1.0)
|
|
246
242
|
websocket-extensions (0.1.5)
|
|
247
|
-
zeitwerk (2.4
|
|
243
|
+
zeitwerk (2.5.4)
|
|
248
244
|
|
|
249
245
|
PLATFORMS
|
|
250
246
|
ruby
|
|
@@ -63,7 +63,7 @@ module TableSync::Publishing::Helpers
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
def skip?
|
|
66
|
-
|
|
66
|
+
sync_in_the_future? && upsert_event? # case 3.1
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
memoize def next_sync_time
|
|
@@ -87,16 +87,16 @@ module TableSync::Publishing::Helpers
|
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
def debounce_time_passed?
|
|
90
|
-
cached_sync_time + debounce_time.seconds
|
|
90
|
+
cached_sync_time + debounce_time.seconds <= current_time
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
def debounce_time_not_passed?
|
|
94
|
-
cached_sync_time + debounce_time.seconds
|
|
94
|
+
cached_sync_time + debounce_time.seconds > current_time
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# CASE 3
|
|
98
98
|
def sync_in_the_future?
|
|
99
|
-
cached_sync_time && (cached_sync_time > current_time)
|
|
99
|
+
!!cached_sync_time && (cached_sync_time > current_time)
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
def destroy_event?
|
data/lib/table_sync/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: table_sync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0.
|
|
4
|
+
version: 6.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Umbrellio
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: memery
|