table_sync 6.1.0 → 6.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.rubocop.yml +7 -1
- data/CHANGELOG.md +51 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +181 -136
- data/lib/table_sync/instrument.rb +1 -1
- data/lib/table_sync/instrument_adapter/active_support.rb +3 -3
- data/lib/table_sync/orm_adapter/base.rb +1 -1
- data/lib/table_sync/publishing/batch.rb +4 -1
- data/lib/table_sync/publishing/data/objects.rb +7 -6
- data/lib/table_sync/publishing/data/raw.rb +4 -3
- data/lib/table_sync/publishing/helpers/debounce.rb +5 -1
- data/lib/table_sync/publishing/message/base.rb +7 -4
- data/lib/table_sync/publishing/message/raw.rb +7 -4
- data/lib/table_sync/publishing/message/single.rb +1 -1
- data/lib/table_sync/publishing/params/base.rb +3 -3
- data/lib/table_sync/publishing/raw.rb +4 -1
- data/lib/table_sync/publishing/single.rb +4 -4
- data/lib/table_sync/receiving/config_decorator.rb +7 -7
- data/lib/table_sync/receiving/dsl.rb +1 -1
- data/lib/table_sync/receiving/handler.rb +25 -21
- data/lib/table_sync/receiving/model/active_record.rb +7 -7
- data/lib/table_sync/receiving/model/sequel.rb +6 -6
- data/lib/table_sync/setup/active_record.rb +1 -1
- data/lib/table_sync/setup/base.rb +1 -1
- data/lib/table_sync/setup/sequel.rb +1 -1
- data/lib/table_sync/utils/proc_array.rb +4 -4
- data/lib/table_sync/utils/required_validator.rb +43 -0
- data/lib/table_sync/utils.rb +1 -0
- data/lib/table_sync/version.rb +1 -1
- data/lib/table_sync.rb +1 -1
- data/table_sync.gemspec +2 -18
- metadata +7 -188
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cae47295c6b798e4c669cfeaa34366fb92c4d843a69bbb35b3f2ffb43423a014
|
4
|
+
data.tar.gz: fd233855c36684a20dfe7087fec56f018e1192b0c5850521a0b70b6e78256657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd5f9c538a3470a8cca2362aa0e1cbda8b35d1f1b464d7f92f30dac2b4277ff6b736691b7fbebac7304e32c4075a0e8623601a9d8cbe7da4e4ff1b614b5d9e64
|
7
|
+
data.tar.gz: 0b763134f33803a4fc46738968150cf44adffaebb134e327aec225abe6ceda9eafcc3002eb5fe15a646b0903f684eb842ac1015dba2a525806e873e0354cb5e6
|
data/.github/workflows/ci.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -2,7 +2,7 @@ inherit_gem:
|
|
2
2
|
rubocop-config-umbrellio: lib/rubocop.yml
|
3
3
|
|
4
4
|
AllCops:
|
5
|
-
TargetRubyVersion:
|
5
|
+
TargetRubyVersion: 3.1
|
6
6
|
Include:
|
7
7
|
- bin/*
|
8
8
|
- lib/**/*.rb
|
@@ -46,3 +46,9 @@ Style/OpenStructUse:
|
|
46
46
|
|
47
47
|
RSpec/PendingWithoutReason:
|
48
48
|
Enabled: false # Many false positives
|
49
|
+
|
50
|
+
RSpec/SkipBlockInsideExample:
|
51
|
+
Enabled: false # Many false positives
|
52
|
+
|
53
|
+
RSpec/IndexedLet:
|
54
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,57 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [6.6.1] - 2025-01-30
|
5
|
+
### Fixed
|
6
|
+
- Delete table_name and schema_name as required for TableSync::Publishing::Raw
|
7
|
+
- Delete table and schema as required for TableSync::Instrument#notify
|
8
|
+
|
9
|
+
## [6.6.0] - 2024-12-06
|
10
|
+
### Added
|
11
|
+
- Add custom version attributes
|
12
|
+
- Set table_name and schema_name as required for TableSync::Publishing::Raw
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
- `rabbit_messaging` gem version is locked on `~> 1.1.0` in order to provide a way to keep "up-to-date"
|
16
|
+
the actual rabbit_messaging gem version on our projects with table_sync update;
|
17
|
+
|
18
|
+
### Removed
|
19
|
+
- Remove ruby 3.0 from ci workflow
|
20
|
+
|
21
|
+
## [6.5.0] - 2024-03-19
|
22
|
+
### Added
|
23
|
+
- Add ruby 3.3 to ci workflow
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
- Add expiration time for cache used in debouncing sync
|
27
|
+
- Update dependencies
|
28
|
+
- Fix rubocop issue
|
29
|
+
- Drop ruby 2.7 support
|
30
|
+
|
31
|
+
### Removed
|
32
|
+
- Remove ruby 2.7 from ci workflow
|
33
|
+
|
34
|
+
## [6.4.2] - 2023-11-14
|
35
|
+
### Added
|
36
|
+
- Required fields allow accepting empty collections.
|
37
|
+
|
38
|
+
## [6.4.1] - 2023-08-15
|
39
|
+
### Added
|
40
|
+
- Required fields validation for the Raw and Batch publishers.
|
41
|
+
|
42
|
+
## [6.4.0] - 2023-08-15
|
43
|
+
### Changed
|
44
|
+
- Fix sort in receiving (#79).
|
45
|
+
|
46
|
+
## [6.3.0] - 2023-07-24
|
47
|
+
### Changed
|
48
|
+
- Send all original attributes for `delete` events instead of just PK.
|
49
|
+
|
50
|
+
## [6.2.0] - 2023-06-29
|
51
|
+
### Changed
|
52
|
+
- `rabbit_messaging` gem version is locked on `~> 0.13` in order to provide a way to keep "up-to-date"
|
53
|
+
the actual rabbit_messaging gem version on our projects with table_sync update;
|
54
|
+
|
4
55
|
## [6.1.0] - 2022-11-24
|
5
56
|
### Changed
|
6
57
|
|
data/Gemfile
CHANGED
@@ -3,3 +3,19 @@
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
5
|
gemspec
|
6
|
+
|
7
|
+
gem "rspec"
|
8
|
+
gem "rubocop-config-umbrellio"
|
9
|
+
gem "simplecov"
|
10
|
+
gem "simplecov-lcov"
|
11
|
+
|
12
|
+
gem "activejob"
|
13
|
+
gem "activerecord"
|
14
|
+
gem "pg"
|
15
|
+
gem "sequel"
|
16
|
+
gem "timecop"
|
17
|
+
|
18
|
+
gem "bundler"
|
19
|
+
gem "bundler-audit"
|
20
|
+
gem "pry"
|
21
|
+
gem "rake"
|
data/Gemfile.lock
CHANGED
@@ -1,232 +1,282 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
table_sync (6.1
|
4
|
+
table_sync (6.6.1)
|
5
5
|
memery
|
6
|
-
rabbit_messaging
|
6
|
+
rabbit_messaging (>= 1.1.0)
|
7
7
|
rails
|
8
8
|
self_data
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actioncable (7.
|
14
|
-
actionpack (= 7.
|
15
|
-
activesupport (= 7.
|
13
|
+
actioncable (7.1.5.1)
|
14
|
+
actionpack (= 7.1.5.1)
|
15
|
+
activesupport (= 7.1.5.1)
|
16
16
|
nio4r (~> 2.0)
|
17
17
|
websocket-driver (>= 0.6.1)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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)
|
24
25
|
mail (>= 2.7.1)
|
25
26
|
net-imap
|
26
27
|
net-pop
|
27
28
|
net-smtp
|
28
|
-
actionmailer (7.
|
29
|
-
actionpack (= 7.
|
30
|
-
actionview (= 7.
|
31
|
-
activejob (= 7.
|
32
|
-
activesupport (= 7.
|
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)
|
33
34
|
mail (~> 2.5, >= 2.5.4)
|
34
35
|
net-imap
|
35
36
|
net-pop
|
36
37
|
net-smtp
|
37
|
-
rails-dom-testing (~> 2.
|
38
|
-
actionpack (7.
|
39
|
-
actionview (= 7.
|
40
|
-
activesupport (= 7.
|
41
|
-
|
38
|
+
rails-dom-testing (~> 2.2)
|
39
|
+
actionpack (7.1.5.1)
|
40
|
+
actionview (= 7.1.5.1)
|
41
|
+
activesupport (= 7.1.5.1)
|
42
|
+
nokogiri (>= 1.8.5)
|
43
|
+
racc
|
44
|
+
rack (>= 2.2.4)
|
45
|
+
rack-session (>= 1.0.1)
|
42
46
|
rack-test (>= 0.6.3)
|
43
|
-
rails-dom-testing (~> 2.
|
44
|
-
rails-html-sanitizer (~> 1.
|
45
|
-
actiontext (7.
|
46
|
-
actionpack (= 7.
|
47
|
-
activerecord (= 7.
|
48
|
-
activestorage (= 7.
|
49
|
-
activesupport (= 7.
|
47
|
+
rails-dom-testing (~> 2.2)
|
48
|
+
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)
|
50
54
|
globalid (>= 0.6.0)
|
51
55
|
nokogiri (>= 1.8.5)
|
52
|
-
actionview (7.
|
53
|
-
activesupport (= 7.
|
56
|
+
actionview (7.1.5.1)
|
57
|
+
activesupport (= 7.1.5.1)
|
54
58
|
builder (~> 3.1)
|
55
|
-
erubi (~> 1.
|
56
|
-
rails-dom-testing (~> 2.
|
57
|
-
rails-html-sanitizer (~> 1.
|
58
|
-
activejob (7.
|
59
|
-
activesupport (= 7.
|
59
|
+
erubi (~> 1.11)
|
60
|
+
rails-dom-testing (~> 2.2)
|
61
|
+
rails-html-sanitizer (~> 1.6)
|
62
|
+
activejob (7.1.5.1)
|
63
|
+
activesupport (= 7.1.5.1)
|
60
64
|
globalid (>= 0.3.6)
|
61
|
-
activemodel (7.
|
62
|
-
activesupport (= 7.
|
63
|
-
activerecord (7.
|
64
|
-
activemodel (= 7.
|
65
|
-
activesupport (= 7.
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
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)
|
70
|
+
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)
|
71
76
|
marcel (~> 1.0)
|
72
|
-
|
73
|
-
|
77
|
+
activesupport (7.1.5.1)
|
78
|
+
base64
|
79
|
+
benchmark (>= 0.3)
|
80
|
+
bigdecimal
|
74
81
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
82
|
+
connection_pool (>= 2.2.5)
|
83
|
+
drb
|
75
84
|
i18n (>= 1.6, < 2)
|
85
|
+
logger (>= 1.4.2)
|
76
86
|
minitest (>= 5.1)
|
87
|
+
mutex_m
|
88
|
+
securerandom (>= 0.3)
|
77
89
|
tzinfo (~> 2.0)
|
78
90
|
amq-protocol (2.3.2)
|
79
91
|
ast (2.4.2)
|
80
|
-
|
92
|
+
base64 (0.2.0)
|
93
|
+
benchmark (0.4.0)
|
94
|
+
bigdecimal (3.1.8)
|
95
|
+
builder (3.3.0)
|
81
96
|
bundler-audit (0.9.1)
|
82
97
|
bundler (>= 1.2.0, < 3)
|
83
98
|
thor (~> 1.0)
|
84
|
-
bunny (2.
|
99
|
+
bunny (2.23.0)
|
85
100
|
amq-protocol (~> 2.3, >= 2.3.1)
|
86
101
|
sorted_set (~> 1, >= 1.0.2)
|
87
102
|
coderay (1.1.3)
|
88
|
-
concurrent-ruby (1.
|
103
|
+
concurrent-ruby (1.3.4)
|
104
|
+
connection_pool (2.4.1)
|
89
105
|
crass (1.0.6)
|
90
|
-
date (3.
|
106
|
+
date (3.4.1)
|
91
107
|
diff-lcs (1.5.0)
|
92
108
|
docile (1.4.0)
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
109
|
+
drb (2.2.1)
|
110
|
+
erubi (1.13.0)
|
111
|
+
globalid (1.2.1)
|
112
|
+
activesupport (>= 6.1)
|
113
|
+
i18n (1.14.6)
|
97
114
|
concurrent-ruby (~> 1.0)
|
115
|
+
io-console (0.8.0)
|
116
|
+
irb (1.14.2)
|
117
|
+
rdoc (>= 4.0.0)
|
118
|
+
reline (>= 0.4.2)
|
98
119
|
json (2.6.3)
|
99
|
-
|
120
|
+
kicks (3.1.1)
|
121
|
+
bunny (~> 2.19)
|
122
|
+
concurrent-ruby (~> 1.0)
|
123
|
+
rake (>= 12.3, < 14.0)
|
124
|
+
serverengine (~> 2.1)
|
125
|
+
thor
|
126
|
+
lamian (1.10.0)
|
100
127
|
rails (>= 4.2)
|
101
|
-
|
128
|
+
logger (1.6.3)
|
129
|
+
loofah (2.23.1)
|
102
130
|
crass (~> 1.0.2)
|
103
|
-
nokogiri (>= 1.
|
131
|
+
nokogiri (>= 1.12.0)
|
104
132
|
mail (2.8.1)
|
105
133
|
mini_mime (>= 0.1.1)
|
106
134
|
net-imap
|
107
135
|
net-pop
|
108
136
|
net-smtp
|
109
|
-
marcel (1.0.
|
110
|
-
memery (1.
|
137
|
+
marcel (1.0.4)
|
138
|
+
memery (1.5.0)
|
111
139
|
ruby2_keywords (~> 0.0.2)
|
112
|
-
method_source (1.
|
113
|
-
mini_mime (1.1.
|
114
|
-
mini_portile2 (2.8.
|
115
|
-
minitest (5.
|
116
|
-
|
140
|
+
method_source (1.1.0)
|
141
|
+
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)
|
117
146
|
date
|
118
147
|
net-protocol
|
119
148
|
net-pop (0.1.2)
|
120
149
|
net-protocol
|
121
|
-
net-protocol (0.2.
|
150
|
+
net-protocol (0.2.2)
|
122
151
|
timeout
|
123
|
-
net-smtp (0.
|
152
|
+
net-smtp (0.5.0)
|
124
153
|
net-protocol
|
125
|
-
nio4r (2.
|
126
|
-
nokogiri (1.
|
127
|
-
mini_portile2 (~> 2.8.
|
154
|
+
nio4r (2.7.4)
|
155
|
+
nokogiri (1.17.2)
|
156
|
+
mini_portile2 (~> 2.8.2)
|
128
157
|
racc (~> 1.4)
|
129
|
-
parallel (1.
|
130
|
-
parser (3.2.
|
158
|
+
parallel (1.23.0)
|
159
|
+
parser (3.2.2.3)
|
131
160
|
ast (~> 2.4.1)
|
132
|
-
|
161
|
+
racc
|
162
|
+
pg (1.5.3)
|
133
163
|
pry (0.14.2)
|
134
164
|
coderay (~> 1.1)
|
135
165
|
method_source (~> 1.0)
|
136
|
-
|
166
|
+
psych (5.2.1)
|
167
|
+
date
|
168
|
+
stringio
|
169
|
+
rabbit_messaging (1.1.0)
|
137
170
|
bunny (~> 2.0)
|
171
|
+
kicks (~> 3)
|
138
172
|
lamian
|
139
|
-
rails (>=
|
140
|
-
sneakers (~> 2.0)
|
173
|
+
rails (>= 6.1)
|
141
174
|
tainbox
|
142
|
-
racc (1.
|
143
|
-
rack (
|
144
|
-
rack-
|
175
|
+
racc (1.8.1)
|
176
|
+
rack (3.1.8)
|
177
|
+
rack-session (2.0.0)
|
178
|
+
rack (>= 3.0.0)
|
179
|
+
rack-test (2.1.0)
|
145
180
|
rack (>= 1.3)
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
181
|
+
rackup (2.2.1)
|
182
|
+
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)
|
158
195
|
bundler (>= 1.15.0)
|
159
|
-
railties (= 7.
|
160
|
-
rails-dom-testing (2.0
|
161
|
-
activesupport (>=
|
196
|
+
railties (= 7.1.5.1)
|
197
|
+
rails-dom-testing (2.2.0)
|
198
|
+
activesupport (>= 5.0.0)
|
199
|
+
minitest
|
162
200
|
nokogiri (>= 1.6)
|
163
|
-
rails-html-sanitizer (1.
|
164
|
-
loofah (~> 2.
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
201
|
+
rails-html-sanitizer (1.6.2)
|
202
|
+
loofah (~> 2.21)
|
203
|
+
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
|
208
|
+
rackup (>= 1.0.0)
|
169
209
|
rake (>= 12.2)
|
170
|
-
thor (~> 1.0)
|
171
|
-
zeitwerk (~> 2.
|
210
|
+
thor (~> 1.0, >= 1.2.2)
|
211
|
+
zeitwerk (~> 2.6)
|
172
212
|
rainbow (3.1.1)
|
173
|
-
rake (13.
|
213
|
+
rake (13.2.1)
|
174
214
|
rbtree (0.4.6)
|
175
|
-
|
176
|
-
|
215
|
+
rdoc (6.9.1)
|
216
|
+
psych (>= 4.0.0)
|
217
|
+
regexp_parser (2.8.1)
|
218
|
+
reline (0.6.0)
|
219
|
+
io-console (~> 0.5)
|
220
|
+
rexml (3.3.9)
|
177
221
|
rspec (3.12.0)
|
178
222
|
rspec-core (~> 3.12.0)
|
179
223
|
rspec-expectations (~> 3.12.0)
|
180
224
|
rspec-mocks (~> 3.12.0)
|
181
|
-
rspec-core (3.12.
|
225
|
+
rspec-core (3.12.2)
|
182
226
|
rspec-support (~> 3.12.0)
|
183
|
-
rspec-expectations (3.12.
|
227
|
+
rspec-expectations (3.12.3)
|
184
228
|
diff-lcs (>= 1.2.0, < 2.0)
|
185
229
|
rspec-support (~> 3.12.0)
|
186
|
-
rspec-mocks (3.12.
|
230
|
+
rspec-mocks (3.12.6)
|
187
231
|
diff-lcs (>= 1.2.0, < 2.0)
|
188
232
|
rspec-support (~> 3.12.0)
|
189
|
-
rspec-support (3.12.
|
190
|
-
rubocop (1.
|
233
|
+
rspec-support (3.12.1)
|
234
|
+
rubocop (1.50.2)
|
191
235
|
json (~> 2.3)
|
192
236
|
parallel (~> 1.10)
|
193
237
|
parser (>= 3.2.0.0)
|
194
238
|
rainbow (>= 2.2.2, < 4.0)
|
195
239
|
regexp_parser (>= 1.8, < 3.0)
|
196
240
|
rexml (>= 3.2.5, < 4.0)
|
197
|
-
rubocop-ast (>= 1.
|
241
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
198
242
|
ruby-progressbar (~> 1.7)
|
199
243
|
unicode-display_width (>= 2.4.0, < 3.0)
|
200
|
-
rubocop-ast (1.
|
244
|
+
rubocop-ast (1.29.0)
|
201
245
|
parser (>= 3.2.1.0)
|
202
|
-
rubocop-
|
203
|
-
rubocop (~> 1.
|
204
|
-
|
205
|
-
rubocop
|
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)
|
206
252
|
rubocop-rake (~> 0.6.0)
|
207
|
-
rubocop-rspec (~> 2.
|
253
|
+
rubocop-rspec (~> 2.20.0)
|
208
254
|
rubocop-sequel (~> 0.3.3)
|
209
|
-
rubocop-performance (1.
|
255
|
+
rubocop-performance (1.17.1)
|
210
256
|
rubocop (>= 1.7.0, < 2.0)
|
211
257
|
rubocop-ast (>= 0.4.0)
|
212
|
-
rubocop-rails (2.
|
258
|
+
rubocop-rails (2.19.1)
|
213
259
|
activesupport (>= 4.2.0)
|
214
260
|
rack (>= 1.1)
|
215
261
|
rubocop (>= 1.33.0, < 2.0)
|
216
262
|
rubocop-rake (0.6.0)
|
217
263
|
rubocop (~> 1.0)
|
218
|
-
rubocop-rspec (2.
|
264
|
+
rubocop-rspec (2.20.0)
|
219
265
|
rubocop (~> 1.33)
|
266
|
+
rubocop-capybara (~> 2.17)
|
220
267
|
rubocop-sequel (0.3.4)
|
221
268
|
rubocop (~> 1.0)
|
222
|
-
ruby-progressbar (1.
|
269
|
+
ruby-progressbar (1.13.0)
|
223
270
|
ruby2_keywords (0.0.5)
|
271
|
+
securerandom (0.4.1)
|
224
272
|
self_data (1.3.0)
|
225
|
-
sequel (5.
|
226
|
-
serverengine (2.0
|
273
|
+
sequel (5.71.0)
|
274
|
+
serverengine (2.4.0)
|
275
|
+
base64 (~> 0.1)
|
276
|
+
logger (~> 1.4)
|
227
277
|
sigdump (~> 0.2.2)
|
228
|
-
set (1.
|
229
|
-
sigdump (0.2.
|
278
|
+
set (1.1.1)
|
279
|
+
sigdump (0.2.5)
|
230
280
|
simplecov (0.22.0)
|
231
281
|
docile (~> 1.1)
|
232
282
|
simplecov-html (~> 0.11)
|
@@ -234,27 +284,22 @@ GEM
|
|
234
284
|
simplecov-html (0.12.3)
|
235
285
|
simplecov-lcov (0.8.0)
|
236
286
|
simplecov_json_formatter (0.1.4)
|
237
|
-
sneakers (2.11.0)
|
238
|
-
bunny (~> 2.12)
|
239
|
-
concurrent-ruby (~> 1.0)
|
240
|
-
rake
|
241
|
-
serverengine (~> 2.0.5)
|
242
|
-
thor
|
243
287
|
sorted_set (1.0.3)
|
244
288
|
rbtree
|
245
289
|
set (~> 1.0)
|
290
|
+
stringio (3.1.2)
|
246
291
|
tainbox (2.1.2)
|
247
292
|
activesupport
|
248
|
-
thor (1.2
|
249
|
-
timecop (0.9.
|
250
|
-
timeout (0.3
|
293
|
+
thor (1.3.2)
|
294
|
+
timecop (0.9.7)
|
295
|
+
timeout (0.4.3)
|
251
296
|
tzinfo (2.0.6)
|
252
297
|
concurrent-ruby (~> 1.0)
|
253
298
|
unicode-display_width (2.4.2)
|
254
|
-
websocket-driver (0.7.
|
299
|
+
websocket-driver (0.7.6)
|
255
300
|
websocket-extensions (>= 0.1.0)
|
256
301
|
websocket-extensions (0.1.5)
|
257
|
-
zeitwerk (2.6.
|
302
|
+
zeitwerk (2.6.18)
|
258
303
|
|
259
304
|
PLATFORMS
|
260
305
|
ruby
|
@@ -6,11 +6,11 @@ module TableSync::InstrumentAdapter
|
|
6
6
|
|
7
7
|
def notify(table:, schema:, event:, direction:, count: 1)
|
8
8
|
::ActiveSupport::Notifications.instrument "tablesync.#{direction}.#{event}",
|
9
|
-
count
|
9
|
+
count:,
|
10
10
|
table: table.to_s,
|
11
11
|
schema: schema.to_s,
|
12
|
-
event
|
13
|
-
direction:
|
12
|
+
event:,
|
13
|
+
direction:
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -2,15 +2,18 @@
|
|
2
2
|
|
3
3
|
class TableSync::Publishing::Batch
|
4
4
|
include Tainbox
|
5
|
+
include TableSync::Utils::RequiredValidator
|
5
6
|
|
6
7
|
attribute :object_class
|
7
8
|
attribute :original_attributes
|
8
|
-
|
9
|
+
attribute :custom_version
|
9
10
|
attribute :routing_key
|
10
11
|
attribute :headers
|
11
12
|
|
12
13
|
attribute :event, default: :update
|
13
14
|
|
15
|
+
require_attributes :object_class, :original_attributes
|
16
|
+
|
14
17
|
def publish_later
|
15
18
|
job.perform_later(job_attributes)
|
16
19
|
end
|
@@ -2,18 +2,19 @@
|
|
2
2
|
|
3
3
|
module TableSync::Publishing::Data
|
4
4
|
class Objects
|
5
|
-
attr_reader :objects, :event
|
5
|
+
attr_reader :objects, :event, :custom_version
|
6
6
|
|
7
|
-
def initialize(objects:, event:)
|
8
|
-
@objects
|
9
|
-
@event
|
7
|
+
def initialize(objects:, event:, custom_version:)
|
8
|
+
@objects = objects
|
9
|
+
@event = TableSync::Event.new(event)
|
10
|
+
@custom_version = custom_version
|
10
11
|
end
|
11
12
|
|
12
13
|
def construct
|
13
14
|
{
|
14
|
-
model
|
15
|
+
model:,
|
15
16
|
attributes: attributes_for_sync,
|
16
|
-
version: version,
|
17
|
+
version: custom_version || version,
|
17
18
|
event: event.resolve,
|
18
19
|
metadata: event.metadata,
|
19
20
|
}
|
@@ -2,19 +2,20 @@
|
|
2
2
|
|
3
3
|
module TableSync::Publishing::Data
|
4
4
|
class Raw
|
5
|
-
attr_reader :model_name, :attributes_for_sync, :event
|
5
|
+
attr_reader :model_name, :attributes_for_sync, :event, :custom_version
|
6
6
|
|
7
|
-
def initialize(model_name:, attributes_for_sync:, event:)
|
7
|
+
def initialize(model_name:, attributes_for_sync:, event:, custom_version:)
|
8
8
|
@model_name = model_name
|
9
9
|
@attributes_for_sync = attributes_for_sync
|
10
10
|
@event = TableSync::Event.new(event)
|
11
|
+
@custom_version = custom_version
|
11
12
|
end
|
12
13
|
|
13
14
|
def construct
|
14
15
|
{
|
15
16
|
model: model_name,
|
16
17
|
attributes: wrapped_attributes_for_sync,
|
17
|
-
version: version,
|
18
|
+
version: custom_version || version,
|
18
19
|
event: event.resolve,
|
19
20
|
metadata: event.metadata,
|
20
21
|
}
|