table_sync 4.2.1 → 6.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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +52 -0
  3. data/CHANGELOG.md +75 -9
  4. data/Gemfile.lock +159 -152
  5. data/README.md +4 -1
  6. data/docs/message_protocol.md +3 -3
  7. data/docs/publishing/configuration.md +143 -0
  8. data/docs/publishing/manual.md +155 -0
  9. data/docs/publishing/publishers.md +162 -0
  10. data/docs/publishing.md +35 -119
  11. data/docs/receiving.md +11 -6
  12. data/lib/table_sync/errors.rb +31 -22
  13. data/lib/table_sync/event.rb +35 -0
  14. data/lib/table_sync/orm_adapter/active_record.rb +25 -0
  15. data/lib/table_sync/orm_adapter/base.rb +92 -0
  16. data/lib/table_sync/orm_adapter/sequel.rb +29 -0
  17. data/lib/table_sync/publishing/batch.rb +53 -0
  18. data/lib/table_sync/publishing/data/objects.rb +50 -0
  19. data/lib/table_sync/publishing/data/raw.rb +27 -0
  20. data/lib/table_sync/publishing/helpers/attributes.rb +63 -0
  21. data/lib/table_sync/publishing/helpers/debounce.rb +134 -0
  22. data/lib/table_sync/publishing/helpers/objects.rb +39 -0
  23. data/lib/table_sync/publishing/message/base.rb +73 -0
  24. data/lib/table_sync/publishing/message/batch.rb +14 -0
  25. data/lib/table_sync/publishing/message/raw.rb +54 -0
  26. data/lib/table_sync/publishing/message/single.rb +13 -0
  27. data/lib/table_sync/publishing/params/base.rb +66 -0
  28. data/lib/table_sync/publishing/params/batch.rb +23 -0
  29. data/lib/table_sync/publishing/params/raw.rb +7 -0
  30. data/lib/table_sync/publishing/params/single.rb +31 -0
  31. data/lib/table_sync/publishing/raw.rb +21 -0
  32. data/lib/table_sync/publishing/single.rb +65 -0
  33. data/lib/table_sync/publishing.rb +20 -5
  34. data/lib/table_sync/receiving/config.rb +6 -4
  35. data/lib/table_sync/receiving/handler.rb +25 -9
  36. data/lib/table_sync/receiving/model/active_record.rb +1 -1
  37. data/lib/table_sync/receiving.rb +0 -2
  38. data/lib/table_sync/setup/active_record.rb +22 -0
  39. data/lib/table_sync/setup/base.rb +67 -0
  40. data/lib/table_sync/setup/sequel.rb +26 -0
  41. data/lib/table_sync/utils/interface_checker.rb +2 -2
  42. data/lib/table_sync/version.rb +1 -1
  43. data/lib/table_sync.rb +31 -8
  44. data/table_sync.gemspec +7 -7
  45. metadata +58 -37
  46. data/.travis.yml +0 -34
  47. data/lib/table_sync/publishing/base_publisher.rb +0 -114
  48. data/lib/table_sync/publishing/batch_publisher.rb +0 -109
  49. data/lib/table_sync/publishing/orm_adapter/active_record.rb +0 -32
  50. data/lib/table_sync/publishing/orm_adapter/sequel.rb +0 -57
  51. data/lib/table_sync/publishing/publisher.rb +0 -129
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73b565f881f6ae36dd659dd4d99d04bf0a739aa0456410c5b730eb7f0b107492
4
- data.tar.gz: 95dee1cf9f11e6a05c04f3edd4cb5845e3819ea5aab694b3939b5b6e7e4b114d
3
+ metadata.gz: 7854c781cde972c7dc2d12266f5c9f302e4a9a6b2ae4cfea8215c13bfb9dc326
4
+ data.tar.gz: dd87d2bc24ec62be162375352cd4f18fa1e0363f80cae49295dc2448d6c97aba
5
5
  SHA512:
6
- metadata.gz: a5af5e1a66865f69ff220151e64649813c99af9a32323d7c3d246ae08a6e5962314bb911041b648898b02c6fc684f6312ce187647d5e0c0db8cbf9bef52cc435
7
- data.tar.gz: 45b02a9f461b7cd406084bfe6fe2cd643bb43045f560cd06f2d4521e44067b1795a6ce231fbe6095a81d4ecfbf7bb678c8d05a61e4c369affd71a0abc6dd0d1c
6
+ metadata.gz: 53d28d64907a36913b49a274246b096880be2be13767d639c9ed3e3e7951ba9595c1e548db4b09223ad41c0f36ef536b6ab13fd961ef2b11e2be1b769b12ce05
7
+ data.tar.gz: cc562e11bfdb74e3049857c96d428222d2c039ebf3808651f741ce20bdc969f57aca8a883ee568e33d06206303b5b4f54b8d6e4ca91e285c0ff63388653dfb3f
@@ -0,0 +1,52 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+
9
+ # We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
10
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/table_sync'
11
+
12
+ services:
13
+ postgres:
14
+ image: postgres
15
+ env:
16
+ POSTGRES_USER: root
17
+ POSTGRES_HOST_AUTH_METHOD: trust
18
+ options: >-
19
+ --health-cmd pg_isready
20
+ --health-interval 10s
21
+ --health-timeout 5s
22
+ --health-retries 5
23
+ ports:
24
+ - 5432:5432
25
+
26
+ env:
27
+ PGHOST: localhost
28
+ PGUSER: root
29
+
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ ruby: ["2.5", "2.6", "2.7", "3.0"]
34
+
35
+ name: ${{ matrix.ruby }}
36
+
37
+ steps:
38
+ - uses: actions/checkout@v2
39
+
40
+ - uses: ruby/setup-ruby@v1
41
+ with:
42
+ ruby-version: ${{ matrix.ruby }}
43
+ bundler-cache: true
44
+
45
+ - run: psql -c 'CREATE DATABASE table_sync_test'
46
+ - run: bundle exec rake bundle:audit
47
+ - run: bundle exec rubocop
48
+ - run: bundle exec rspec
49
+
50
+ - uses: coverallsapp/github-action@v1.1.2
51
+ with:
52
+ github-token: ${{ secrets.GITHUB_TOKEN }}
data/CHANGELOG.md CHANGED
@@ -1,12 +1,78 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [6.0.0] - 2021-10-15
5
+ ### Added
6
+
7
+ - A lot of specs for all the refactoring.
8
+ - Docs
9
+ - 100% coverage
10
+
11
+ ### Changed
12
+ - Heavy refactoring of Publisher and BatchPublisher.
13
+ All code is separated in different modules and classes.
14
+
15
+ 1. Job callables are now called:
16
+ - single_publishing_job_class_callable
17
+ - batch_publishing_job_class_callable
18
+
19
+ 2. Now there are three main classes for messaging:
20
+ - TableSync::Publishing::Single - sends one row with initialization
21
+ - TableSync::Publishing::Batch - sends batch of rows with initialization
22
+ - TableSync::Publishing::Raw - sends raw data without checks
23
+
24
+ Separate classes for publishing, object data, Rabbit params, debounce, serialization.
25
+
26
+ 3. Jobs are not constrained by being ActiveJob anymore. Just need to have #perform_at method
27
+
28
+ 4. Changed some method names towards consistency:
29
+ - attrs_for_routing_key -> attributes_for_routing_key
30
+ - attrs_for_metadata -> attributes_for_headers
31
+
32
+ 5. Moved TableSync setup into separate classes.
33
+
34
+ 6. Changed ORMAdapters.
35
+
36
+ 7. Destroyed objects are initialized.
37
+ Now custom attributes for destruction will be called on instances.
38
+ - Obj.table_sync_destroy_attributes() -> Obj#attributes_for_destroy
39
+
40
+ 8. Event constants are now kept in one place.
41
+
42
+ ### Removed
43
+
44
+ - Plugin Errors
45
+
46
+ ## [5.1.0] - 2021-09-09
47
+
48
+ ### Changed
49
+ - Provide current fired event to wrap receiver. You'll be able to get it with `wrap_receiving(event:, **rest) {}` as usual for `data, target_keys, version_key`
50
+ - Update rails dependencies with patch version
51
+
52
+ ## [5.0.1] - 2021-04-06
53
+ ### Fixed
54
+ - documentation
55
+
56
+ ### Changed
57
+ - update gems
58
+
59
+ ## [5.0.0] - 2021-03-04
60
+ ### Fixed
61
+ - Fix `delete` events being broken when either `#attrs_for_routing_key` or `#attrs_for_metadata` was defined on a model.
62
+
63
+ ### Changed
64
+ - Instead of original attributes (default raw model attributes), use published attributes (as defined by `#attributes_for_sync` or `.table_sync_destroy_attributes`) for `TableSync.routing_key_callable` and `TableSync.routing_metadata_callable`.
65
+ - Send all original attributes for `delete` events instead of just PK.
66
+
67
+ ## [4.2.2] - 2020-11-20
68
+ ### Fixed
69
+ - potential data corruption with batches
70
+
4
71
  ## [4.2.1] - 2020-11-20
5
72
  ### Fixed
6
- - bug with sorting data in handler, it was bad idea to use `.hash` replaced to `.to_s`
73
+ - bug with sorting data in handler, it was bad idea to use `.hash` replaced to `.to_s`
7
74
 
8
75
  ## [4.2.0] - 2020-11-19
9
-
10
76
  - No changes. Just stabilization release.
11
77
 
12
78
  ## [4.1.2] - 2020-11-19
@@ -38,9 +104,9 @@ All notable changes to this project will be documented in this file.
38
104
  ### Changed
39
105
  - .rubocop.yml
40
106
  - documentation
41
- - modules hierarchy (split receiving and publishing)
42
- `TableSync::Publisher` -> `TableSync::Publishing::Publisher`
43
- `TableSync::BatchPublisher` -> `TableSync::Publishing::BatchPublisher`
107
+ - modules hierarchy (split receiving and publishing)
108
+ `TableSync::Publisher` -> `TableSync::Publishing::Publisher`
109
+ `TableSync::BatchPublisher` -> `TableSync::Publishing::BatchPublisher`
44
110
  `TableSync::ReceivingHandler` -> `TableSync::Receiving::Handler`
45
111
  - made data batches processing as native
46
112
  - implemented callbacks as options
@@ -48,10 +114,10 @@ All notable changes to this project will be documented in this file.
48
114
  - type checking in options
49
115
  - `before_commit on: event, &block` -> `before_update(&block)` or `before_destroy(&block)`
50
116
  - `after_commit on: event, &block` -> `after_commit_on_update(&block)` or `after_commit_on_destroy(&block)`
51
- - changed parameters in some options:
52
- add `raw_data`
53
- `current_row` -> `row`
54
- ...
117
+ - changed parameters in some options:
118
+ add `raw_data`
119
+ `current_row` -> `row`
120
+ ...
55
121
  see documents for details
56
122
 
57
123
  ### Removed
data/Gemfile.lock CHANGED
@@ -1,219 +1,232 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- table_sync (4.2.1)
4
+ table_sync (6.0)
5
5
  memery
6
- rabbit_messaging (~> 0.3)
6
+ rabbit_messaging
7
7
  rails
8
8
  self_data
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.0.3.4)
14
- actionpack (= 6.0.3.4)
13
+ actioncable (6.1.4.1)
14
+ actionpack (= 6.1.4.1)
15
+ activesupport (= 6.1.4.1)
15
16
  nio4r (~> 2.0)
16
17
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.3.4)
18
- actionpack (= 6.0.3.4)
19
- activejob (= 6.0.3.4)
20
- activerecord (= 6.0.3.4)
21
- activestorage (= 6.0.3.4)
22
- activesupport (= 6.0.3.4)
18
+ actionmailbox (6.1.4.1)
19
+ actionpack (= 6.1.4.1)
20
+ activejob (= 6.1.4.1)
21
+ activerecord (= 6.1.4.1)
22
+ activestorage (= 6.1.4.1)
23
+ activesupport (= 6.1.4.1)
23
24
  mail (>= 2.7.1)
24
- actionmailer (6.0.3.4)
25
- actionpack (= 6.0.3.4)
26
- actionview (= 6.0.3.4)
27
- activejob (= 6.0.3.4)
25
+ actionmailer (6.1.4.1)
26
+ actionpack (= 6.1.4.1)
27
+ actionview (= 6.1.4.1)
28
+ activejob (= 6.1.4.1)
29
+ activesupport (= 6.1.4.1)
28
30
  mail (~> 2.5, >= 2.5.4)
29
31
  rails-dom-testing (~> 2.0)
30
- actionpack (6.0.3.4)
31
- actionview (= 6.0.3.4)
32
- activesupport (= 6.0.3.4)
33
- rack (~> 2.0, >= 2.0.8)
32
+ actionpack (6.1.4.1)
33
+ actionview (= 6.1.4.1)
34
+ activesupport (= 6.1.4.1)
35
+ rack (~> 2.0, >= 2.0.9)
34
36
  rack-test (>= 0.6.3)
35
37
  rails-dom-testing (~> 2.0)
36
38
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.3.4)
38
- actionpack (= 6.0.3.4)
39
- activerecord (= 6.0.3.4)
40
- activestorage (= 6.0.3.4)
41
- activesupport (= 6.0.3.4)
39
+ actiontext (6.1.4.1)
40
+ actionpack (= 6.1.4.1)
41
+ activerecord (= 6.1.4.1)
42
+ activestorage (= 6.1.4.1)
43
+ activesupport (= 6.1.4.1)
42
44
  nokogiri (>= 1.8.5)
43
- actionview (6.0.3.4)
44
- activesupport (= 6.0.3.4)
45
+ actionview (6.1.4.1)
46
+ activesupport (= 6.1.4.1)
45
47
  builder (~> 3.1)
46
48
  erubi (~> 1.4)
47
49
  rails-dom-testing (~> 2.0)
48
50
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.3.4)
50
- activesupport (= 6.0.3.4)
51
+ activejob (6.1.4.1)
52
+ activesupport (= 6.1.4.1)
51
53
  globalid (>= 0.3.6)
52
- activemodel (6.0.3.4)
53
- activesupport (= 6.0.3.4)
54
- activerecord (6.0.3.4)
55
- activemodel (= 6.0.3.4)
56
- activesupport (= 6.0.3.4)
57
- activestorage (6.0.3.4)
58
- actionpack (= 6.0.3.4)
59
- activejob (= 6.0.3.4)
60
- activerecord (= 6.0.3.4)
61
- marcel (~> 0.3.1)
62
- activesupport (6.0.3.4)
54
+ activemodel (6.1.4.1)
55
+ activesupport (= 6.1.4.1)
56
+ activerecord (6.1.4.1)
57
+ activemodel (= 6.1.4.1)
58
+ activesupport (= 6.1.4.1)
59
+ activestorage (6.1.4.1)
60
+ actionpack (= 6.1.4.1)
61
+ activejob (= 6.1.4.1)
62
+ activerecord (= 6.1.4.1)
63
+ activesupport (= 6.1.4.1)
64
+ marcel (~> 1.0.0)
65
+ mini_mime (>= 1.1.0)
66
+ activesupport (6.1.4.1)
63
67
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
- i18n (>= 0.7, < 2)
65
- minitest (~> 5.1)
66
- tzinfo (~> 1.1)
67
- zeitwerk (~> 2.2, >= 2.2.2)
68
+ i18n (>= 1.6, < 2)
69
+ minitest (>= 5.1)
70
+ tzinfo (~> 2.0)
71
+ zeitwerk (~> 2.3)
68
72
  amq-protocol (2.3.2)
69
- ast (2.4.1)
73
+ ast (2.4.2)
70
74
  builder (3.2.4)
71
- bundler-audit (0.7.0.1)
75
+ bundler-audit (0.8.0)
72
76
  bundler (>= 1.2.0, < 3)
73
- thor (>= 0.18, < 2)
74
- bunny (2.17.0)
77
+ thor (~> 1.0)
78
+ bunny (2.19.0)
75
79
  amq-protocol (~> 2.3, >= 2.3.1)
80
+ sorted_set (~> 1, >= 1.0.2)
76
81
  coderay (1.1.3)
77
- concurrent-ruby (1.1.7)
78
- coveralls (0.8.23)
79
- json (>= 1.8, < 3)
80
- simplecov (~> 0.16.1)
81
- term-ansicolor (~> 1.3)
82
- thor (>= 0.19.4, < 2.0)
83
- tins (~> 1.6)
82
+ concurrent-ruby (1.1.9)
84
83
  crass (1.0.6)
85
84
  diff-lcs (1.4.4)
86
- docile (1.3.2)
85
+ docile (1.3.5)
87
86
  erubi (1.10.0)
88
87
  exception_notification (4.4.3)
89
88
  actionmailer (>= 4.0, < 7)
90
89
  activesupport (>= 4.0, < 7)
91
- globalid (0.4.2)
92
- activesupport (>= 4.2.0)
93
- i18n (1.8.5)
90
+ globalid (0.5.2)
91
+ activesupport (>= 5.0)
92
+ i18n (1.8.10)
94
93
  concurrent-ruby (~> 1.0)
95
- json (2.3.1)
96
94
  lamian (1.2.0)
97
95
  rails (>= 4.2)
98
- loofah (2.7.0)
96
+ loofah (2.12.0)
99
97
  crass (~> 1.0.2)
100
98
  nokogiri (>= 1.5.9)
101
99
  mail (2.7.1)
102
100
  mini_mime (>= 0.1.1)
103
- marcel (0.3.3)
104
- mimemagic (~> 0.3.2)
105
- memery (1.3.0)
101
+ marcel (1.0.2)
102
+ memery (1.4.1)
106
103
  ruby2_keywords (~> 0.0.2)
107
104
  method_source (1.0.0)
108
- mimemagic (0.3.5)
109
- mini_mime (1.0.2)
110
- mini_portile2 (2.4.0)
111
- minitest (5.14.2)
112
- nio4r (2.5.4)
113
- nokogiri (1.10.10)
114
- mini_portile2 (~> 2.4.0)
115
- parallel (1.19.2)
116
- parser (2.7.1.5)
105
+ mini_mime (1.1.1)
106
+ mini_portile2 (2.6.1)
107
+ minitest (5.14.4)
108
+ nio4r (2.5.8)
109
+ nokogiri (1.12.5)
110
+ mini_portile2 (~> 2.6.1)
111
+ racc (~> 1.4)
112
+ parallel (1.20.1)
113
+ parser (3.0.0.0)
117
114
  ast (~> 2.4.1)
118
- pg (0.21.0)
119
- pry (0.13.1)
115
+ pg (1.2.3)
116
+ pry (0.14.0)
120
117
  coderay (~> 1.1)
121
118
  method_source (~> 1.0)
122
- rabbit_messaging (0.9.0)
119
+ rabbit_messaging (0.12.0)
123
120
  bunny (~> 2.0)
124
121
  exception_notification
125
122
  lamian
126
123
  rails (>= 5.2)
127
124
  sneakers (~> 2.0)
128
125
  tainbox
126
+ racc (1.5.2)
129
127
  rack (2.2.3)
130
128
  rack-test (1.1.0)
131
129
  rack (>= 1.0, < 3)
132
- rails (6.0.3.4)
133
- actioncable (= 6.0.3.4)
134
- actionmailbox (= 6.0.3.4)
135
- actionmailer (= 6.0.3.4)
136
- actionpack (= 6.0.3.4)
137
- actiontext (= 6.0.3.4)
138
- actionview (= 6.0.3.4)
139
- activejob (= 6.0.3.4)
140
- activemodel (= 6.0.3.4)
141
- activerecord (= 6.0.3.4)
142
- activestorage (= 6.0.3.4)
143
- activesupport (= 6.0.3.4)
144
- bundler (>= 1.3.0)
145
- railties (= 6.0.3.4)
130
+ rails (6.1.4.1)
131
+ actioncable (= 6.1.4.1)
132
+ actionmailbox (= 6.1.4.1)
133
+ actionmailer (= 6.1.4.1)
134
+ actionpack (= 6.1.4.1)
135
+ actiontext (= 6.1.4.1)
136
+ actionview (= 6.1.4.1)
137
+ activejob (= 6.1.4.1)
138
+ activemodel (= 6.1.4.1)
139
+ activerecord (= 6.1.4.1)
140
+ activestorage (= 6.1.4.1)
141
+ activesupport (= 6.1.4.1)
142
+ bundler (>= 1.15.0)
143
+ railties (= 6.1.4.1)
146
144
  sprockets-rails (>= 2.0.0)
147
145
  rails-dom-testing (2.0.3)
148
146
  activesupport (>= 4.2.0)
149
147
  nokogiri (>= 1.6)
150
- rails-html-sanitizer (1.3.0)
148
+ rails-html-sanitizer (1.4.2)
151
149
  loofah (~> 2.3)
152
- railties (6.0.3.4)
153
- actionpack (= 6.0.3.4)
154
- activesupport (= 6.0.3.4)
150
+ railties (6.1.4.1)
151
+ actionpack (= 6.1.4.1)
152
+ activesupport (= 6.1.4.1)
155
153
  method_source
156
- rake (>= 0.8.7)
157
- thor (>= 0.20.3, < 2.0)
154
+ rake (>= 0.13)
155
+ thor (~> 1.0)
158
156
  rainbow (3.0.0)
159
- rake (13.0.1)
160
- regexp_parser (1.8.1)
161
- rexml (3.2.4)
162
- rspec (3.9.0)
163
- rspec-core (~> 3.9.0)
164
- rspec-expectations (~> 3.9.0)
165
- rspec-mocks (~> 3.9.0)
166
- rspec-core (3.9.2)
167
- rspec-support (~> 3.9.3)
168
- rspec-expectations (3.9.2)
157
+ rake (13.0.6)
158
+ rbtree (0.4.4)
159
+ regexp_parser (2.1.1)
160
+ rexml (3.2.5)
161
+ rspec (3.10.0)
162
+ rspec-core (~> 3.10.0)
163
+ rspec-expectations (~> 3.10.0)
164
+ rspec-mocks (~> 3.10.0)
165
+ rspec-core (3.10.1)
166
+ rspec-support (~> 3.10.0)
167
+ rspec-expectations (3.10.1)
169
168
  diff-lcs (>= 1.2.0, < 2.0)
170
- rspec-support (~> 3.9.0)
171
- rspec-mocks (3.9.1)
169
+ rspec-support (~> 3.10.0)
170
+ rspec-mocks (3.10.2)
172
171
  diff-lcs (>= 1.2.0, < 2.0)
173
- rspec-support (~> 3.9.0)
174
- rspec-support (3.9.3)
175
- rubocop (0.90.0)
172
+ rspec-support (~> 3.10.0)
173
+ rspec-support (3.10.2)
174
+ rubocop (1.11.0)
176
175
  parallel (~> 1.10)
177
- parser (>= 2.7.1.1)
176
+ parser (>= 3.0.0.0)
178
177
  rainbow (>= 2.2.2, < 4.0)
179
- regexp_parser (>= 1.7)
178
+ regexp_parser (>= 1.8, < 3.0)
180
179
  rexml
181
- rubocop-ast (>= 0.3.0, < 1.0)
180
+ rubocop-ast (>= 1.2.0, < 2.0)
182
181
  ruby-progressbar (~> 1.7)
183
- unicode-display_width (>= 1.4.0, < 2.0)
184
- rubocop-ast (0.7.1)
182
+ unicode-display_width (>= 1.4.0, < 3.0)
183
+ rubocop-ast (1.4.1)
185
184
  parser (>= 2.7.1.5)
186
- rubocop-config-umbrellio (0.90.0.93)
187
- rubocop (= 0.90.0)
188
- rubocop-performance (= 1.7.1)
189
- rubocop-rails (= 2.7.0)
190
- rubocop-rspec (= 1.42.0)
191
- rubocop-performance (1.7.1)
192
- rubocop (>= 0.82.0)
193
- rubocop-rails (2.7.0)
185
+ rubocop-config-umbrellio (1.11.0.40)
186
+ rubocop (= 1.11.0)
187
+ rubocop-performance (= 1.10.0)
188
+ rubocop-rails (= 2.9.1)
189
+ rubocop-rake (= 0.5.1)
190
+ rubocop-rspec (= 2.2.0)
191
+ rubocop-sequel (= 0.2.0)
192
+ rubocop-performance (1.10.0)
193
+ rubocop (>= 0.90.0, < 2.0)
194
+ rubocop-ast (>= 0.4.0)
195
+ rubocop-rails (2.9.1)
194
196
  activesupport (>= 4.2.0)
195
197
  rack (>= 1.1)
196
- rubocop (>= 0.87.0)
197
- rubocop-rspec (1.42.0)
198
- rubocop (>= 0.87.0)
199
- ruby-progressbar (1.10.1)
200
- ruby2_keywords (0.0.2)
198
+ rubocop (>= 0.90.0, < 2.0)
199
+ rubocop-rake (0.5.1)
200
+ rubocop
201
+ rubocop-rspec (2.2.0)
202
+ rubocop (~> 1.0)
203
+ rubocop-ast (>= 1.1.0)
204
+ rubocop-sequel (0.2.0)
205
+ rubocop (~> 1.0)
206
+ ruby-progressbar (1.11.0)
207
+ ruby2_keywords (0.0.5)
201
208
  self_data (1.2.1)
202
- sequel (5.37.0)
209
+ sequel (5.43.0)
203
210
  serverengine (2.0.7)
204
211
  sigdump (~> 0.2.2)
212
+ set (1.0.1)
205
213
  sigdump (0.2.4)
206
- simplecov (0.16.1)
214
+ simplecov (0.21.2)
207
215
  docile (~> 1.1)
208
- json (>= 1.8, < 3)
209
- simplecov-html (~> 0.10.0)
210
- simplecov-html (0.10.2)
216
+ simplecov-html (~> 0.11)
217
+ simplecov_json_formatter (~> 0.1)
218
+ simplecov-html (0.12.3)
219
+ simplecov-lcov (0.8.0)
220
+ simplecov_json_formatter (0.1.2)
211
221
  sneakers (2.11.0)
212
222
  bunny (~> 2.12)
213
223
  concurrent-ruby (~> 1.0)
214
224
  rake
215
225
  serverengine (~> 2.0.5)
216
226
  thor
227
+ sorted_set (1.0.3)
228
+ rbtree
229
+ set (~> 1.0)
217
230
  sprockets (4.0.2)
218
231
  concurrent-ruby (~> 1.0)
219
232
  rack (> 1, < 3)
@@ -221,42 +234,36 @@ GEM
221
234
  actionpack (>= 4.0)
222
235
  activesupport (>= 4.0)
223
236
  sprockets (>= 3.0.0)
224
- sync (0.5.0)
225
237
  tainbox (2.1.2)
226
238
  activesupport
227
- term-ansicolor (1.7.1)
228
- tins (~> 1.0)
229
- thor (1.0.1)
230
- thread_safe (0.3.6)
231
- timecop (0.9.1)
232
- tins (1.25.0)
233
- sync
234
- tzinfo (1.2.7)
235
- thread_safe (~> 0.1)
236
- unicode-display_width (1.7.0)
237
- websocket-driver (0.7.3)
239
+ thor (1.1.0)
240
+ timecop (0.9.4)
241
+ tzinfo (2.0.4)
242
+ concurrent-ruby (~> 1.0)
243
+ unicode-display_width (2.0.0)
244
+ websocket-driver (0.7.5)
238
245
  websocket-extensions (>= 0.1.0)
239
246
  websocket-extensions (0.1.5)
240
- zeitwerk (2.4.0)
247
+ zeitwerk (2.4.2)
241
248
 
242
249
  PLATFORMS
243
250
  ruby
244
251
 
245
252
  DEPENDENCIES
246
- activejob (>= 6.0)
247
- activerecord (>= 6.0)
253
+ activejob
254
+ activerecord
248
255
  bundler
249
256
  bundler-audit
250
- coveralls (~> 0.8)
251
- pg (~> 0.18)
257
+ pg
252
258
  pry
253
259
  rake
254
- rspec (~> 3.8)
260
+ rspec
255
261
  rubocop-config-umbrellio
256
262
  sequel
257
- simplecov (~> 0.16)
263
+ simplecov
264
+ simplecov-lcov
258
265
  table_sync!
259
266
  timecop
260
267
 
261
268
  BUNDLED WITH
262
- 2.1.4
269
+ 2.2.27
data/README.md CHANGED
@@ -21,7 +21,10 @@ require 'table_sync'
21
21
  ## Usage
22
22
 
23
23
  - [Message protocol](docs/message_protocol.md)
24
- - [Publising](docs/publishing.md)
24
+ - [Publishing](docs/publishing.md)
25
+ - [Publishers](docs/publishing/publishers.md)
26
+ - [Configuration](docs/publishing/configuration.md)
27
+ - [Manual Sync (examples)](docs/publishing/manual.md)
25
28
  - [Receiving](docs/receiving.md)
26
29
  - [Notifications](docs/notifications.md)
27
30
 
@@ -1,9 +1,9 @@
1
1
  # Messages protocol
2
2
 
3
- ```
3
+ ```json
4
4
  {
5
- project_id: "pid",
6
- data: {
5
+ "project_id": "pid",
6
+ "data": {
7
7
  "event": "update",
8
8
  "model": "User",
9
9
  "version": 1.23,