railway-ipc 0.1.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -3
  3. data/CHANGELOG.md +50 -0
  4. data/Gemfile +2 -2
  5. data/README.md +1 -1
  6. data/Rakefile +10 -4
  7. data/bin/console +3 -3
  8. data/bin/rspec +29 -0
  9. data/bin/rubocop +29 -0
  10. data/lib/railway_ipc.rb +6 -4
  11. data/lib/railway_ipc/Rakefile +2 -0
  12. data/lib/railway_ipc/consumer/consumer.rb +31 -83
  13. data/lib/railway_ipc/consumer/process_incoming_message.rb +103 -0
  14. data/lib/railway_ipc/errors.rb +9 -1
  15. data/lib/railway_ipc/handler.rb +5 -6
  16. data/lib/railway_ipc/handler_store.rb +5 -2
  17. data/lib/railway_ipc/incoming_message.rb +51 -0
  18. data/lib/railway_ipc/logger.rb +4 -3
  19. data/lib/railway_ipc/models/consumed_message.rb +41 -28
  20. data/lib/railway_ipc/models/published_message.rb +11 -9
  21. data/lib/railway_ipc/publisher.rb +58 -1
  22. data/lib/railway_ipc/rabbitmq/adapter.rb +23 -15
  23. data/lib/railway_ipc/rabbitmq/payload.rb +9 -4
  24. data/lib/railway_ipc/railtie.rb +2 -0
  25. data/lib/railway_ipc/responder.rb +6 -3
  26. data/lib/railway_ipc/response.rb +4 -1
  27. data/lib/railway_ipc/rpc/client/client.rb +27 -17
  28. data/lib/railway_ipc/rpc/client/client_response_handlers.rb +2 -0
  29. data/lib/railway_ipc/rpc/client/errors/timeout_error.rb +2 -0
  30. data/lib/railway_ipc/rpc/concerns/error_adapter_configurable.rb +2 -0
  31. data/lib/railway_ipc/rpc/concerns/message_observation_configurable.rb +2 -0
  32. data/lib/railway_ipc/rpc/concerns/publish_location_configurable.rb +2 -0
  33. data/lib/railway_ipc/rpc/rpc.rb +2 -0
  34. data/lib/railway_ipc/rpc/server/server.rb +8 -3
  35. data/lib/railway_ipc/rpc/server/server_response_handlers.rb +2 -0
  36. data/lib/railway_ipc/tasks/generate_migrations.rake +16 -16
  37. data/lib/railway_ipc/tasks/start_consumers.rake +3 -1
  38. data/lib/railway_ipc/tasks/start_servers.rake +3 -1
  39. data/lib/railway_ipc/unhandled_message_error.rb +2 -0
  40. data/lib/railway_ipc/unknown_message.pb.rb +18 -0
  41. data/lib/railway_ipc/version.rb +3 -1
  42. data/priv/migrations/add_railway_ipc_consumed_messages.rb +5 -3
  43. data/priv/migrations/add_railway_ipc_published_messages.rb +3 -1
  44. data/railway_ipc.gemspec +34 -30
  45. metadata +62 -64
  46. data/.rspec +0 -3
  47. data/.tool-versions +0 -1
  48. data/.travis.yml +0 -7
  49. data/Gemfile.lock +0 -186
  50. data/lib/railway_ipc/base_message.pb.rb +0 -21
  51. data/lib/railway_ipc/consumer/consumer_response_handlers.rb +0 -14
  52. data/lib/railway_ipc/handler_manifest.rb +0 -10
  53. data/lib/railway_ipc/null_handler.rb +0 -7
  54. data/lib/railway_ipc/null_message.rb +0 -7
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railway-ipc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-03 00:00:00.000000000 Z
11
+ date: 2020-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 10.0.0
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 10.0.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -39,75 +25,75 @@ dependencies:
39
25
  - !ruby/object:Gem::Version
40
26
  version: 2.0.1
41
27
  - !ruby/object:Gem::Dependency
42
- name: rspec
28
+ name: factory_bot
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '3.0'
33
+ version: '5.1'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '3.0'
40
+ version: '5.1'
55
41
  - !ruby/object:Gem::Dependency
56
- name: factory_bot
42
+ name: google-protobuf
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '5.1'
47
+ version: '3.9'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '5.1'
54
+ version: '3.9'
69
55
  - !ruby/object:Gem::Dependency
70
- name: pry-byebug
56
+ name: rake
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - '='
59
+ - - ">="
74
60
  - !ruby/object:Gem::Version
75
- version: 3.4.2
61
+ version: 10.0.0
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - '='
66
+ - - ">="
81
67
  - !ruby/object:Gem::Version
82
- version: 3.4.2
68
+ version: 10.0.0
83
69
  - !ruby/object:Gem::Dependency
84
- name: google-protobuf
70
+ name: rspec
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '3.9'
75
+ version: '3.0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '3.9'
82
+ version: '3.0'
97
83
  - !ruby/object:Gem::Dependency
98
- name: sneakers
84
+ name: rubocop
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: 2.3.5
104
- type: :runtime
89
+ version: '0.86'
90
+ type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: 2.3.5
96
+ version: '0.86'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: bunny
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -123,33 +109,47 @@ dependencies:
123
109
  - !ruby/object:Gem::Version
124
110
  version: 2.2.0
125
111
  - !ruby/object:Gem::Dependency
126
- name: rails
112
+ name: sneakers
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: 5.0.7
117
+ version: 2.3.5
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 2.3.5
125
+ - !ruby/object:Gem::Dependency
126
+ name: database_cleaner
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.7'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 5.0.7
138
+ version: '1.7'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rspec-rails
140
+ name: listen
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: 3.0.5
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: 3.0.5
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: pg
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -165,47 +165,47 @@ dependencies:
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.18'
167
167
  - !ruby/object:Gem::Dependency
168
- name: shoulda-matchers
168
+ name: rails
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '4.2'
173
+ version: 5.0.7
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '4.2'
180
+ version: 5.0.7
181
181
  - !ruby/object:Gem::Dependency
182
- name: database_cleaner
182
+ name: rspec-rails
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: '1.7'
187
+ version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: '1.7'
194
+ version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
- name: listen
196
+ name: shoulda-matchers
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 3.0.5
201
+ version: '4.2'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 3.0.5
208
+ version: '4.2'
209
209
  description: IPC components for Rails
210
210
  email: ''
211
211
  executables: []
@@ -213,31 +213,27 @@ extensions: []
213
213
  extra_rdoc_files: []
214
214
  files:
215
215
  - ".gitignore"
216
- - ".rspec"
217
- - ".tool-versions"
218
- - ".travis.yml"
216
+ - CHANGELOG.md
219
217
  - CODE_OF_CONDUCT.md
220
218
  - Gemfile
221
- - Gemfile.lock
222
219
  - LICENSE.txt
223
220
  - README.md
224
221
  - Rakefile
225
222
  - bin/console
223
+ - bin/rspec
224
+ - bin/rubocop
226
225
  - bin/setup
227
226
  - lib/railway_ipc.rb
228
227
  - lib/railway_ipc/Rakefile
229
- - lib/railway_ipc/base_message.pb.rb
230
228
  - lib/railway_ipc/consumer/consumer.rb
231
- - lib/railway_ipc/consumer/consumer_response_handlers.rb
229
+ - lib/railway_ipc/consumer/process_incoming_message.rb
232
230
  - lib/railway_ipc/errors.rb
233
231
  - lib/railway_ipc/handler.rb
234
- - lib/railway_ipc/handler_manifest.rb
235
232
  - lib/railway_ipc/handler_store.rb
233
+ - lib/railway_ipc/incoming_message.rb
236
234
  - lib/railway_ipc/logger.rb
237
235
  - lib/railway_ipc/models/consumed_message.rb
238
236
  - lib/railway_ipc/models/published_message.rb
239
- - lib/railway_ipc/null_handler.rb
240
- - lib/railway_ipc/null_message.rb
241
237
  - lib/railway_ipc/publisher.rb
242
238
  - lib/railway_ipc/rabbitmq/adapter.rb
243
239
  - lib/railway_ipc/rabbitmq/payload.rb
@@ -257,6 +253,7 @@ files:
257
253
  - lib/railway_ipc/tasks/start_consumers.rake
258
254
  - lib/railway_ipc/tasks/start_servers.rake
259
255
  - lib/railway_ipc/unhandled_message_error.rb
256
+ - lib/railway_ipc/unknown_message.pb.rb
260
257
  - lib/railway_ipc/version.rb
261
258
  - priv/migrations/add_railway_ipc_consumed_messages.rb
262
259
  - priv/migrations/add_railway_ipc_published_messages.rb
@@ -274,14 +271,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
271
  requirements:
275
272
  - - ">="
276
273
  - !ruby/object:Gem::Version
277
- version: '0'
274
+ version: '2.5'
278
275
  required_rubygems_version: !ruby/object:Gem::Requirement
279
276
  requirements:
280
277
  - - ">="
281
278
  - !ruby/object:Gem::Version
282
279
  version: '0'
283
280
  requirements: []
284
- rubygems_version: 3.0.3
281
+ rubyforge_project:
282
+ rubygems_version: 2.7.6
285
283
  signing_key:
286
284
  specification_version: 4
287
285
  summary: IPC components for Rails
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
@@ -1 +0,0 @@
1
- ruby 2.6.3
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.5.1
7
- before_install: gem install bundler -v 2.0.1
@@ -1,186 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- railway-ipc (0.1.4)
5
- bunny (~> 2.2.0)
6
- sneakers (~> 2.3.5)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- actioncable (5.0.7.2)
12
- actionpack (= 5.0.7.2)
13
- nio4r (>= 1.2, < 3.0)
14
- websocket-driver (~> 0.6.1)
15
- actionmailer (5.0.7.2)
16
- actionpack (= 5.0.7.2)
17
- actionview (= 5.0.7.2)
18
- activejob (= 5.0.7.2)
19
- mail (~> 2.5, >= 2.5.4)
20
- rails-dom-testing (~> 2.0)
21
- actionpack (5.0.7.2)
22
- actionview (= 5.0.7.2)
23
- activesupport (= 5.0.7.2)
24
- rack (~> 2.0)
25
- rack-test (~> 0.6.3)
26
- rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.0.7.2)
29
- activesupport (= 5.0.7.2)
30
- builder (~> 3.1)
31
- erubis (~> 2.7.0)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.0.7.2)
35
- activesupport (= 5.0.7.2)
36
- globalid (>= 0.3.6)
37
- activemodel (5.0.7.2)
38
- activesupport (= 5.0.7.2)
39
- activerecord (5.0.7.2)
40
- activemodel (= 5.0.7.2)
41
- activesupport (= 5.0.7.2)
42
- arel (~> 7.0)
43
- activesupport (5.0.7.2)
44
- concurrent-ruby (~> 1.0, >= 1.0.2)
45
- i18n (>= 0.7, < 2)
46
- minitest (~> 5.1)
47
- tzinfo (~> 1.1)
48
- amq-protocol (2.3.0)
49
- arel (7.1.4)
50
- builder (3.2.4)
51
- bunny (2.2.2)
52
- amq-protocol (>= 2.0.1)
53
- byebug (9.1.0)
54
- coderay (1.1.2)
55
- concurrent-ruby (1.1.5)
56
- crass (1.0.5)
57
- database_cleaner (1.7.0)
58
- diff-lcs (1.3)
59
- erubis (2.7.0)
60
- factory_bot (5.1.1)
61
- activesupport (>= 4.2.0)
62
- ffi (1.11.3)
63
- globalid (0.4.2)
64
- activesupport (>= 4.2.0)
65
- google-protobuf (3.9.2)
66
- i18n (1.7.0)
67
- concurrent-ruby (~> 1.0)
68
- listen (3.0.8)
69
- rb-fsevent (~> 0.9, >= 0.9.4)
70
- rb-inotify (~> 0.9, >= 0.9.7)
71
- loofah (2.4.0)
72
- crass (~> 1.0.2)
73
- nokogiri (>= 1.5.9)
74
- mail (2.7.1)
75
- mini_mime (>= 0.1.1)
76
- method_source (0.9.2)
77
- mini_mime (1.0.2)
78
- mini_portile2 (2.4.0)
79
- minitest (5.13.0)
80
- nio4r (2.5.2)
81
- nokogiri (1.10.7)
82
- mini_portile2 (~> 2.4.0)
83
- pg (0.21.0)
84
- pry (0.12.2)
85
- coderay (~> 1.1.0)
86
- method_source (~> 0.9.0)
87
- pry-byebug (3.4.2)
88
- byebug (~> 9.0)
89
- pry (~> 0.10)
90
- rack (2.0.7)
91
- rack-test (0.6.3)
92
- rack (>= 1.0)
93
- rails (5.0.7.2)
94
- actioncable (= 5.0.7.2)
95
- actionmailer (= 5.0.7.2)
96
- actionpack (= 5.0.7.2)
97
- actionview (= 5.0.7.2)
98
- activejob (= 5.0.7.2)
99
- activemodel (= 5.0.7.2)
100
- activerecord (= 5.0.7.2)
101
- activesupport (= 5.0.7.2)
102
- bundler (>= 1.3.0)
103
- railties (= 5.0.7.2)
104
- sprockets-rails (>= 2.0.0)
105
- rails-dom-testing (2.0.3)
106
- activesupport (>= 4.2.0)
107
- nokogiri (>= 1.6)
108
- rails-html-sanitizer (1.3.0)
109
- loofah (~> 2.3)
110
- railties (5.0.7.2)
111
- actionpack (= 5.0.7.2)
112
- activesupport (= 5.0.7.2)
113
- method_source
114
- rake (>= 0.8.7)
115
- thor (>= 0.18.1, < 2.0)
116
- rake (13.0.0)
117
- rb-fsevent (0.10.3)
118
- rb-inotify (0.10.0)
119
- ffi (~> 1.0)
120
- rspec (3.8.0)
121
- rspec-core (~> 3.8.0)
122
- rspec-expectations (~> 3.8.0)
123
- rspec-mocks (~> 3.8.0)
124
- rspec-core (3.8.2)
125
- rspec-support (~> 3.8.0)
126
- rspec-expectations (3.8.4)
127
- diff-lcs (>= 1.2.0, < 2.0)
128
- rspec-support (~> 3.8.0)
129
- rspec-mocks (3.8.1)
130
- diff-lcs (>= 1.2.0, < 2.0)
131
- rspec-support (~> 3.8.0)
132
- rspec-rails (3.8.3)
133
- actionpack (>= 3.0)
134
- activesupport (>= 3.0)
135
- railties (>= 3.0)
136
- rspec-core (~> 3.8.0)
137
- rspec-expectations (~> 3.8.0)
138
- rspec-mocks (~> 3.8.0)
139
- rspec-support (~> 3.8.0)
140
- rspec-support (3.8.2)
141
- serverengine (1.5.11)
142
- sigdump (~> 0.2.2)
143
- shoulda-matchers (4.2.0)
144
- activesupport (>= 4.2.0)
145
- sigdump (0.2.4)
146
- sneakers (2.3.5)
147
- bunny (~> 2.2.0)
148
- serverengine (~> 1.5.11)
149
- thor
150
- thread (~> 0.1.7)
151
- sprockets (4.0.0)
152
- concurrent-ruby (~> 1.0)
153
- rack (> 1, < 3)
154
- sprockets-rails (3.2.1)
155
- actionpack (>= 4.0)
156
- activesupport (>= 4.0)
157
- sprockets (>= 3.0.0)
158
- thor (0.20.3)
159
- thread (0.1.7)
160
- thread_safe (0.3.6)
161
- tzinfo (1.2.5)
162
- thread_safe (~> 0.1)
163
- websocket-driver (0.6.5)
164
- websocket-extensions (>= 0.1.0)
165
- websocket-extensions (0.1.4)
166
-
167
- PLATFORMS
168
- ruby
169
-
170
- DEPENDENCIES
171
- bundler (= 2.0.1)
172
- database_cleaner (~> 1.7)
173
- factory_bot (~> 5.1)
174
- google-protobuf (~> 3.9)
175
- listen (~> 3.0.5)
176
- pg (~> 0.18)
177
- pry-byebug (= 3.4.2)
178
- rails (~> 5.0.7)
179
- railway-ipc!
180
- rake (>= 10.0.0)
181
- rspec (~> 3.0)
182
- rspec-rails
183
- shoulda-matchers (~> 4.2)
184
-
185
- BUNDLED WITH
186
- 2.0.1