rabbit_messaging 0.13.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +24 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +135 -105
- data/README.md +17 -14
- data/environments/development.rb +1 -0
- data/lib/rabbit/receiving/handler_resolver.rb +7 -2
- data/lib/rabbit/version.rb +1 -1
- data/lib/rabbit.rb +9 -10
- data/rabbit_messaging.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bbcb5aa0db1440d71b3e3c17a2c42cbbac0d88948f0273ce717d656997706cd
|
4
|
+
data.tar.gz: 63b24a42a54192f3a11f2dabfde9f47ad5f5dcb4c3d9755fca084ea7cf133757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b77d028ad7573b505118b16b4c78faf260ae5379989f011a9db231229b164f53e4790ebefca620a67f996211afda1d3a442631de662b3ca8639b47ff92676c7b
|
7
|
+
data.tar.gz: e059ff24097c2d1305ac44c6088d718a13464f639836ae33f094fcc3f95e2f052027c1e3332ba1899ae8a5f4c785975c00885ca1f120a60494da7cf1314a0a11
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,30 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [0.15.0] - 2024-06-05
|
5
|
+
### Added
|
6
|
+
- Support for custom reciving handler via `Rabbit.config.handler_resolver_callable` config;
|
7
|
+
|
8
|
+
## [0.14.0] - 2023-02-27
|
9
|
+
### Added
|
10
|
+
- Exception notifier is required
|
11
|
+
|
12
|
+
## [0.13.0] - 2021-12-23
|
13
|
+
### Added
|
14
|
+
- `Sleep 1` for handling receiving error to prevent queue overflow
|
15
|
+
- `["2.7", "3.0", "3.1", "3.2"]` are used for specs
|
16
|
+
|
17
|
+
## [0.12.1] - 2021-12-23
|
18
|
+
### Added
|
19
|
+
- `ExceptionNotifier` replaced with `Sentry`
|
20
|
+
|
21
|
+
## [0.12.0] - 2021-06-08
|
22
|
+
### Added
|
23
|
+
- `Gemfile.lock` added
|
24
|
+
|
25
|
+
### Fixed
|
26
|
+
- `unless Sneakers.logger` was never executed
|
27
|
+
|
4
28
|
## [0.11.0] - 2021-05-05
|
5
29
|
### Added
|
6
30
|
- `Rabbit.config.receiving_job_class_callable` now receives the full message context (with `message`, `delivery_info` and `arguments` (see the `Rabbit::Receiving::Receive`));
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rabbit_messaging (0.
|
4
|
+
rabbit_messaging (0.15.0)
|
5
5
|
bunny (~> 2.0)
|
6
6
|
lamian
|
7
7
|
rails (>= 5.2)
|
@@ -11,73 +11,84 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
actioncable (7.
|
15
|
-
actionpack (= 7.
|
16
|
-
activesupport (= 7.
|
14
|
+
actioncable (7.1.3.3)
|
15
|
+
actionpack (= 7.1.3.3)
|
16
|
+
activesupport (= 7.1.3.3)
|
17
17
|
nio4r (~> 2.0)
|
18
18
|
websocket-driver (>= 0.6.1)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
zeitwerk (~> 2.6)
|
20
|
+
actionmailbox (7.1.3.3)
|
21
|
+
actionpack (= 7.1.3.3)
|
22
|
+
activejob (= 7.1.3.3)
|
23
|
+
activerecord (= 7.1.3.3)
|
24
|
+
activestorage (= 7.1.3.3)
|
25
|
+
activesupport (= 7.1.3.3)
|
25
26
|
mail (>= 2.7.1)
|
26
27
|
net-imap
|
27
28
|
net-pop
|
28
29
|
net-smtp
|
29
|
-
actionmailer (7.
|
30
|
-
actionpack (= 7.
|
31
|
-
actionview (= 7.
|
32
|
-
activejob (= 7.
|
33
|
-
activesupport (= 7.
|
30
|
+
actionmailer (7.1.3.3)
|
31
|
+
actionpack (= 7.1.3.3)
|
32
|
+
actionview (= 7.1.3.3)
|
33
|
+
activejob (= 7.1.3.3)
|
34
|
+
activesupport (= 7.1.3.3)
|
34
35
|
mail (~> 2.5, >= 2.5.4)
|
35
36
|
net-imap
|
36
37
|
net-pop
|
37
38
|
net-smtp
|
38
|
-
rails-dom-testing (~> 2.
|
39
|
-
actionpack (7.
|
40
|
-
actionview (= 7.
|
41
|
-
activesupport (= 7.
|
42
|
-
|
39
|
+
rails-dom-testing (~> 2.2)
|
40
|
+
actionpack (7.1.3.3)
|
41
|
+
actionview (= 7.1.3.3)
|
42
|
+
activesupport (= 7.1.3.3)
|
43
|
+
nokogiri (>= 1.8.5)
|
44
|
+
racc
|
45
|
+
rack (>= 2.2.4)
|
46
|
+
rack-session (>= 1.0.1)
|
43
47
|
rack-test (>= 0.6.3)
|
44
|
-
rails-dom-testing (~> 2.
|
45
|
-
rails-html-sanitizer (~> 1.
|
46
|
-
actiontext (7.
|
47
|
-
actionpack (= 7.
|
48
|
-
activerecord (= 7.
|
49
|
-
activestorage (= 7.
|
50
|
-
activesupport (= 7.
|
48
|
+
rails-dom-testing (~> 2.2)
|
49
|
+
rails-html-sanitizer (~> 1.6)
|
50
|
+
actiontext (7.1.3.3)
|
51
|
+
actionpack (= 7.1.3.3)
|
52
|
+
activerecord (= 7.1.3.3)
|
53
|
+
activestorage (= 7.1.3.3)
|
54
|
+
activesupport (= 7.1.3.3)
|
51
55
|
globalid (>= 0.6.0)
|
52
56
|
nokogiri (>= 1.8.5)
|
53
|
-
actionview (7.
|
54
|
-
activesupport (= 7.
|
57
|
+
actionview (7.1.3.3)
|
58
|
+
activesupport (= 7.1.3.3)
|
55
59
|
builder (~> 3.1)
|
56
|
-
erubi (~> 1.
|
57
|
-
rails-dom-testing (~> 2.
|
58
|
-
rails-html-sanitizer (~> 1.
|
59
|
-
activejob (7.
|
60
|
-
activesupport (= 7.
|
60
|
+
erubi (~> 1.11)
|
61
|
+
rails-dom-testing (~> 2.2)
|
62
|
+
rails-html-sanitizer (~> 1.6)
|
63
|
+
activejob (7.1.3.3)
|
64
|
+
activesupport (= 7.1.3.3)
|
61
65
|
globalid (>= 0.3.6)
|
62
|
-
activemodel (7.
|
63
|
-
activesupport (= 7.
|
64
|
-
activerecord (7.
|
65
|
-
activemodel (= 7.
|
66
|
-
activesupport (= 7.
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
activemodel (7.1.3.3)
|
67
|
+
activesupport (= 7.1.3.3)
|
68
|
+
activerecord (7.1.3.3)
|
69
|
+
activemodel (= 7.1.3.3)
|
70
|
+
activesupport (= 7.1.3.3)
|
71
|
+
timeout (>= 0.4.0)
|
72
|
+
activestorage (7.1.3.3)
|
73
|
+
actionpack (= 7.1.3.3)
|
74
|
+
activejob (= 7.1.3.3)
|
75
|
+
activerecord (= 7.1.3.3)
|
76
|
+
activesupport (= 7.1.3.3)
|
72
77
|
marcel (~> 1.0)
|
73
|
-
|
74
|
-
|
78
|
+
activesupport (7.1.3.3)
|
79
|
+
base64
|
80
|
+
bigdecimal
|
75
81
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
82
|
+
connection_pool (>= 2.2.5)
|
83
|
+
drb
|
76
84
|
i18n (>= 1.6, < 2)
|
77
85
|
minitest (>= 5.1)
|
86
|
+
mutex_m
|
78
87
|
tzinfo (~> 2.0)
|
79
88
|
amq-protocol (2.3.2)
|
80
89
|
ast (2.4.2)
|
90
|
+
base64 (0.2.0)
|
91
|
+
bigdecimal (3.1.8)
|
81
92
|
builder (3.2.4)
|
82
93
|
bundler-audit (0.9.1)
|
83
94
|
bundler (>= 1.2.0, < 3)
|
@@ -86,44 +97,51 @@ GEM
|
|
86
97
|
amq-protocol (~> 2.3, >= 2.3.1)
|
87
98
|
sorted_set (~> 1, >= 1.0.2)
|
88
99
|
coderay (1.1.3)
|
89
|
-
concurrent-ruby (1.2.
|
100
|
+
concurrent-ruby (1.2.3)
|
101
|
+
connection_pool (2.4.1)
|
90
102
|
crass (1.0.6)
|
91
|
-
date (3.3.
|
92
|
-
diff-lcs (1.5.
|
103
|
+
date (3.3.4)
|
104
|
+
diff-lcs (1.5.1)
|
93
105
|
docile (1.4.0)
|
106
|
+
drb (2.2.1)
|
94
107
|
erubi (1.12.0)
|
95
|
-
globalid (1.1
|
96
|
-
activesupport (>=
|
97
|
-
i18n (1.
|
108
|
+
globalid (1.2.1)
|
109
|
+
activesupport (>= 6.1)
|
110
|
+
i18n (1.14.5)
|
98
111
|
concurrent-ruby (~> 1.0)
|
112
|
+
io-console (0.7.2)
|
113
|
+
irb (1.13.1)
|
114
|
+
rdoc (>= 4.0.0)
|
115
|
+
reline (>= 0.4.2)
|
99
116
|
json (2.6.3)
|
100
117
|
lamian (1.7.0)
|
101
118
|
rails (>= 4.2)
|
102
|
-
loofah (2.
|
119
|
+
loofah (2.22.0)
|
103
120
|
crass (~> 1.0.2)
|
104
|
-
nokogiri (>= 1.
|
121
|
+
nokogiri (>= 1.12.0)
|
105
122
|
mail (2.8.1)
|
106
123
|
mini_mime (>= 0.1.1)
|
107
124
|
net-imap
|
108
125
|
net-pop
|
109
126
|
net-smtp
|
110
|
-
marcel (1.0.
|
111
|
-
method_source (1.
|
112
|
-
mini_mime (1.1.
|
113
|
-
mini_portile2 (2.8.
|
114
|
-
minitest (5.
|
115
|
-
|
127
|
+
marcel (1.0.4)
|
128
|
+
method_source (1.1.0)
|
129
|
+
mini_mime (1.1.5)
|
130
|
+
mini_portile2 (2.8.6)
|
131
|
+
minitest (5.23.1)
|
132
|
+
mutex_m (0.2.0)
|
133
|
+
net-imap (0.4.11)
|
116
134
|
date
|
117
135
|
net-protocol
|
118
136
|
net-pop (0.1.2)
|
119
137
|
net-protocol
|
120
|
-
net-protocol (0.2.
|
138
|
+
net-protocol (0.2.2)
|
121
139
|
timeout
|
122
|
-
net-smtp (0.
|
140
|
+
net-smtp (0.5.0)
|
123
141
|
net-protocol
|
124
|
-
nio4r (2.
|
125
|
-
nokogiri (1.
|
126
|
-
mini_portile2 (~> 2.8.
|
142
|
+
nio4r (2.7.3)
|
143
|
+
nokogiri (1.16.5)
|
144
|
+
mini_portile2 (~> 2.8.2)
|
127
145
|
racc (~> 1.4)
|
128
146
|
parallel (1.22.1)
|
129
147
|
parser (3.2.1.0)
|
@@ -131,41 +149,56 @@ GEM
|
|
131
149
|
pry (0.14.2)
|
132
150
|
coderay (~> 1.1)
|
133
151
|
method_source (~> 1.0)
|
134
|
-
|
135
|
-
|
136
|
-
|
152
|
+
psych (5.1.2)
|
153
|
+
stringio
|
154
|
+
racc (1.8.0)
|
155
|
+
rack (3.0.11)
|
156
|
+
rack-session (2.0.0)
|
157
|
+
rack (>= 3.0.0)
|
158
|
+
rack-test (2.1.0)
|
137
159
|
rack (>= 1.3)
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
160
|
+
rackup (2.1.0)
|
161
|
+
rack (>= 3)
|
162
|
+
webrick (~> 1.8)
|
163
|
+
rails (7.1.3.3)
|
164
|
+
actioncable (= 7.1.3.3)
|
165
|
+
actionmailbox (= 7.1.3.3)
|
166
|
+
actionmailer (= 7.1.3.3)
|
167
|
+
actionpack (= 7.1.3.3)
|
168
|
+
actiontext (= 7.1.3.3)
|
169
|
+
actionview (= 7.1.3.3)
|
170
|
+
activejob (= 7.1.3.3)
|
171
|
+
activemodel (= 7.1.3.3)
|
172
|
+
activerecord (= 7.1.3.3)
|
173
|
+
activestorage (= 7.1.3.3)
|
174
|
+
activesupport (= 7.1.3.3)
|
150
175
|
bundler (>= 1.15.0)
|
151
|
-
railties (= 7.
|
152
|
-
rails-dom-testing (2.0
|
153
|
-
activesupport (>=
|
176
|
+
railties (= 7.1.3.3)
|
177
|
+
rails-dom-testing (2.2.0)
|
178
|
+
activesupport (>= 5.0.0)
|
179
|
+
minitest
|
154
180
|
nokogiri (>= 1.6)
|
155
|
-
rails-html-sanitizer (1.
|
156
|
-
loofah (~> 2.
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
181
|
+
rails-html-sanitizer (1.6.0)
|
182
|
+
loofah (~> 2.21)
|
183
|
+
nokogiri (~> 1.14)
|
184
|
+
railties (7.1.3.3)
|
185
|
+
actionpack (= 7.1.3.3)
|
186
|
+
activesupport (= 7.1.3.3)
|
187
|
+
irb
|
188
|
+
rackup (>= 1.0.0)
|
161
189
|
rake (>= 12.2)
|
162
|
-
thor (~> 1.0)
|
163
|
-
zeitwerk (~> 2.
|
190
|
+
thor (~> 1.0, >= 1.2.2)
|
191
|
+
zeitwerk (~> 2.6)
|
164
192
|
rainbow (3.1.1)
|
165
|
-
rake (13.
|
193
|
+
rake (13.2.1)
|
166
194
|
rbtree (0.4.6)
|
195
|
+
rdoc (6.7.0)
|
196
|
+
psych (>= 4.0.0)
|
167
197
|
regexp_parser (2.7.0)
|
168
|
-
|
198
|
+
reline (0.5.7)
|
199
|
+
io-console (~> 0.5)
|
200
|
+
rexml (3.2.8)
|
201
|
+
strscan (>= 3.0.9)
|
169
202
|
rspec (3.12.0)
|
170
203
|
rspec-core (~> 3.12.0)
|
171
204
|
rspec-expectations (~> 3.12.0)
|
@@ -178,10 +211,10 @@ GEM
|
|
178
211
|
rspec-its (1.3.0)
|
179
212
|
rspec-core (>= 3.0.0)
|
180
213
|
rspec-expectations (>= 3.0.0)
|
181
|
-
rspec-mocks (3.12.
|
214
|
+
rspec-mocks (3.12.7)
|
182
215
|
diff-lcs (>= 1.2.0, < 2.0)
|
183
216
|
rspec-support (~> 3.12.0)
|
184
|
-
rspec-support (3.12.
|
217
|
+
rspec-support (3.12.2)
|
185
218
|
rubocop (1.43.0)
|
186
219
|
json (~> 2.3)
|
187
220
|
parallel (~> 1.10)
|
@@ -215,11 +248,6 @@ GEM
|
|
215
248
|
rubocop-sequel (0.3.4)
|
216
249
|
rubocop (~> 1.0)
|
217
250
|
ruby-progressbar (1.11.0)
|
218
|
-
sentry-ruby (5.8.0)
|
219
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
220
|
-
sentry-ruby-core (5.8.0)
|
221
|
-
concurrent-ruby
|
222
|
-
sentry-ruby (= 5.8.0)
|
223
251
|
serverengine (2.0.7)
|
224
252
|
sigdump (~> 0.2.2)
|
225
253
|
set (1.0.3)
|
@@ -240,17 +268,20 @@ GEM
|
|
240
268
|
sorted_set (1.0.3)
|
241
269
|
rbtree
|
242
270
|
set (~> 1.0)
|
271
|
+
stringio (3.1.0)
|
272
|
+
strscan (3.1.0)
|
243
273
|
tainbox (2.1.2)
|
244
274
|
activesupport
|
245
|
-
thor (1.
|
246
|
-
timeout (0.
|
275
|
+
thor (1.3.1)
|
276
|
+
timeout (0.4.1)
|
247
277
|
tzinfo (2.0.6)
|
248
278
|
concurrent-ruby (~> 1.0)
|
249
279
|
unicode-display_width (2.4.2)
|
250
|
-
|
280
|
+
webrick (1.8.1)
|
281
|
+
websocket-driver (0.7.6)
|
251
282
|
websocket-extensions (>= 0.1.0)
|
252
283
|
websocket-extensions (0.1.5)
|
253
|
-
zeitwerk (2.6.
|
284
|
+
zeitwerk (2.6.15)
|
254
285
|
|
255
286
|
PLATFORMS
|
256
287
|
ruby
|
@@ -265,7 +296,6 @@ DEPENDENCIES
|
|
265
296
|
rspec
|
266
297
|
rspec-its
|
267
298
|
rubocop-config-umbrellio
|
268
|
-
sentry-ruby-core
|
269
299
|
simplecov
|
270
300
|
simplecov-lcov
|
271
301
|
|
data/README.md
CHANGED
@@ -46,6 +46,14 @@ require "rabbit_messaging"
|
|
46
46
|
(I.e. we have project 'support', in production it's project_id is :support,
|
47
47
|
but in staging it uses :support1 and :support2 ids for corresponding stages)
|
48
48
|
|
49
|
+
|
50
|
+
* `exception_notifier` (`Proc`)
|
51
|
+
You must provide your own notifier like this to notify about exceptions:
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
config.exception_notifier = proc { |e| MyCoolNotifier.notify!(e) }
|
55
|
+
```
|
56
|
+
|
49
57
|
* `hooks` (`Hash`)
|
50
58
|
|
51
59
|
:before_fork and :after_fork hooks, used same way as in unicorn / puma / que / etc
|
@@ -85,15 +93,6 @@ require "rabbit_messaging"
|
|
85
93
|
}
|
86
94
|
```
|
87
95
|
|
88
|
-
* `exception_notifier` (`Proc`)
|
89
|
-
|
90
|
-
By default, exceptions are reported using `Sentry` (see [sentry gem](https://github.com/getsentry/sentry-ruby)).
|
91
|
-
You can provide your own notifier like this:
|
92
|
-
|
93
|
-
```ruby
|
94
|
-
config.exception_notifier = proc { |e| MyCoolNotifier.notify!(e) }
|
95
|
-
```
|
96
|
-
|
97
96
|
* `before_receiving_hooks, after_receiving_hooks` (`Array of Procs`)
|
98
97
|
|
99
98
|
Before and after hooks with message processing in the middle. Where `before_receiving_hooks` and `after_receiving_hooks` are empty arrays by default.
|
@@ -149,11 +148,15 @@ Rabbit.publish(
|
|
149
148
|
`Rabbit::Daemon.run`. `before_fork` and `after_fork` procs in `Rabbit.config` are used
|
150
149
|
to teardown and setup external connections between daemon restarts, for example ORM connections
|
151
150
|
|
152
|
-
- After the server runs, received messages are handled by `Rabbit::EventHandler` subclasses
|
153
|
-
Subclasses are selected by following code:
|
154
|
-
|
155
|
-
|
156
|
-
|
151
|
+
- After the server runs, received messages are handled by `Rabbit::EventHandler` subclasses in two possible ways:
|
152
|
+
- a) Subclasses are selected by following code(by default):
|
153
|
+
```ruby
|
154
|
+
rabbit/handler/#{group_id}/#{event}".camelize.constantize
|
155
|
+
```
|
156
|
+
- b) you can change default behaviour to your own logic by setting the `handler_resolver_callable` config option with a `Proc` that should return the handler class:
|
157
|
+
```ruby
|
158
|
+
Rabbit.config.handler_resolver_callable = -> (group_id, event) { "recivers/#{group_id}/#{event}".camelize.constantize }
|
159
|
+
```
|
157
160
|
|
158
161
|
They use powerful `Tainbox` api to handle message data. Project_id also passed to them.
|
159
162
|
|
data/environments/development.rb
CHANGED
@@ -21,8 +21,13 @@ module Rabbit::Receiving::HandlerResolver
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def unmemoized_handler_for(group_id, event)
|
24
|
-
|
25
|
-
|
24
|
+
handler = if Rabbit.config.handler_resolver_callable.is_a?(Proc)
|
25
|
+
Rabbit.config.handler_resolver_callable.call(group_id, event)
|
26
|
+
else
|
27
|
+
name = "rabbit/handler/#{group_id}/#{event}".camelize
|
28
|
+
name.safe_constantize
|
29
|
+
end
|
30
|
+
|
26
31
|
if handler && handler < Rabbit::EventHandler
|
27
32
|
handler
|
28
33
|
else
|
data/lib/rabbit/version.rb
CHANGED
data/lib/rabbit.rb
CHANGED
@@ -22,7 +22,8 @@ module Rabbit
|
|
22
22
|
attribute :environment, Symbol, default: :production
|
23
23
|
attribute :queue_name_conversion
|
24
24
|
attribute :receiving_job_class_callable
|
25
|
-
attribute :
|
25
|
+
attribute :handler_resolver_callable
|
26
|
+
attribute :exception_notifier
|
26
27
|
attribute :before_receiving_hooks, default: []
|
27
28
|
attribute :after_receiving_hooks, default: []
|
28
29
|
attribute :skip_publishing_in, default: %i[test development]
|
@@ -40,8 +41,9 @@ module Rabbit
|
|
40
41
|
}
|
41
42
|
|
42
43
|
def validate!
|
43
|
-
raise InvalidConfig, "
|
44
|
-
raise InvalidConfig, "
|
44
|
+
raise InvalidConfig, "missing project_id" unless project_id
|
45
|
+
raise InvalidConfig, "missing group_id" unless group_id
|
46
|
+
raise InvalidConfig, "missing exception_notifier" unless exception_notifier
|
45
47
|
|
46
48
|
unless environment.in? %i[test development production]
|
47
49
|
raise "environment should be one of (test, development, production)"
|
@@ -57,12 +59,6 @@ module Rabbit
|
|
57
59
|
end
|
58
60
|
|
59
61
|
alias_method :read_queue, :app_name
|
60
|
-
|
61
|
-
private
|
62
|
-
|
63
|
-
def default_exception_notifier
|
64
|
-
-> (e) { Sentry.capture_exception(e) }
|
65
|
-
end
|
66
62
|
end
|
67
63
|
|
68
64
|
extend self
|
@@ -73,7 +69,10 @@ module Rabbit
|
|
73
69
|
@config
|
74
70
|
end
|
75
71
|
|
76
|
-
|
72
|
+
def configure
|
73
|
+
yield(config)
|
74
|
+
config.validate!
|
75
|
+
end
|
77
76
|
|
78
77
|
def publish(message_options)
|
79
78
|
message = Publishing::Message.new(message_options)
|
data/rabbit_messaging.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require "rabbit/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.required_ruby_version = ">=
|
8
|
+
spec.required_ruby_version = ">= 3.0"
|
9
9
|
|
10
10
|
spec.name = "rabbit_messaging"
|
11
11
|
spec.version = Rabbit::VERSION
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit_messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
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: 2024-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -132,14 +132,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements:
|
133
133
|
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: '
|
135
|
+
version: '3.0'
|
136
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - ">="
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
142
|
+
rubygems_version: 3.5.3
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Rabbit (Rabbit Messaging)
|