bbk-amqp 1.1.2.378853 → 1.1.2.429702
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/Gemfile.lock +5 -7
- data/lib/bbk/amqp/publisher.rb +6 -3
- 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: 579f30884ad263971f7ecd7680013ea178babf9d7e686ad390d3a8702e8a850e
|
|
4
|
+
data.tar.gz: ac2e7699b758dfd50de29a43cb07217b6e155f34d1406edeb1c213adaf3c39f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11b0e40c0dd8fcd0bc6a8b69f3c67629bcd71348f12ed7b5c59b73b50142393f7f75b5c7803c1b983295d6da6b5990b9727a679554d74b7d0823ed0e0f352614
|
|
7
|
+
data.tar.gz: f26d87f9d2e3e23c8339186c3c8b2d2b3d9b96d903a311e8b32140a8a8de5654c82620d1fa32bdd62eeff698fd8a5fe310793e4d1afbfb93c4e5f8e4d9b9006b
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bbk-amqp (1.1.2.
|
|
4
|
+
bbk-amqp (1.1.2.429702)
|
|
5
5
|
activesupport (>= 6.0)
|
|
6
6
|
bbk-app (>= 1.1.1.273338)
|
|
7
7
|
bbk-utils (> 1.0.1)
|
|
@@ -39,11 +39,11 @@ GEM
|
|
|
39
39
|
bbk-utils (> 1.0.1)
|
|
40
40
|
oj
|
|
41
41
|
timeouter
|
|
42
|
-
bbk-utils (1.1.6.
|
|
42
|
+
bbk-utils (1.1.6.409139)
|
|
43
43
|
activesupport (>= 7.0)
|
|
44
44
|
russian
|
|
45
45
|
benchmark (0.5.0)
|
|
46
|
-
bigdecimal (4.1.
|
|
46
|
+
bigdecimal (4.1.3)
|
|
47
47
|
bunny (2.23.0)
|
|
48
48
|
amq-protocol (~> 2.3, >= 2.3.1)
|
|
49
49
|
sorted_set (~> 1, >= 1.0.2)
|
|
@@ -52,7 +52,7 @@ GEM
|
|
|
52
52
|
byebug (11.1.3)
|
|
53
53
|
coercible (1.0.0)
|
|
54
54
|
descendants_tracker (~> 0.0.1)
|
|
55
|
-
concurrent-ruby (1.3.
|
|
55
|
+
concurrent-ruby (1.3.8)
|
|
56
56
|
connection_pool (2.5.5)
|
|
57
57
|
descendants_tracker (0.0.4)
|
|
58
58
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
@@ -79,10 +79,8 @@ GEM
|
|
|
79
79
|
logger (1.7.0)
|
|
80
80
|
minitest (5.26.1)
|
|
81
81
|
mutex_m (0.3.0)
|
|
82
|
-
oj (3.17.
|
|
82
|
+
oj (3.17.8)
|
|
83
83
|
bigdecimal (>= 3.0)
|
|
84
|
-
ostruct (>= 0.2)
|
|
85
|
-
ostruct (0.6.3)
|
|
86
84
|
parallel (1.26.3)
|
|
87
85
|
parser (3.0.3.2)
|
|
88
86
|
ast (~> 2.4.1)
|
data/lib/bbk/amqp/publisher.rb
CHANGED
|
@@ -27,7 +27,7 @@ module BBK
|
|
|
27
27
|
|
|
28
28
|
attr_reader :exchange, :basic_return, :properties, :body
|
|
29
29
|
|
|
30
|
-
def initialize(exchange:, basic_return:, properties
|
|
30
|
+
def initialize(exchange:, basic_return:, properties:, body:, **_kwargs)
|
|
31
31
|
@exchange = exchange
|
|
32
32
|
@basic_return = basic_return
|
|
33
33
|
@properties = properties
|
|
@@ -85,7 +85,8 @@ module BBK
|
|
|
85
85
|
route_info = domain.call(route)
|
|
86
86
|
logger.debug "Route #{route.inspect} transformed to #{route_info.inspect}"
|
|
87
87
|
message = result.message
|
|
88
|
-
publish_message(route_info.routing_key,
|
|
88
|
+
publish_message(route_info.routing_key,
|
|
89
|
+
PublishedMessage.new({ **message.headers, **route_info.headers }, message.payload), exchange: route_info.exchange)
|
|
89
90
|
end
|
|
90
91
|
|
|
91
92
|
# Publish message
|
|
@@ -193,7 +194,9 @@ module BBK
|
|
|
193
194
|
data = if payload.is_a?(String)
|
|
194
195
|
payload
|
|
195
196
|
else
|
|
196
|
-
|
|
197
|
+
# generate нельзя, т.к. в нем вшит уровен вложенности 100
|
|
198
|
+
# mode: compat - нужен чтобы убирать доп. поля специфичные для не Hash объектов.
|
|
199
|
+
Oj.dump(payload, mode: :compat)
|
|
197
200
|
end
|
|
198
201
|
channel.basic_publish(data, exchange, routing_key, options)
|
|
199
202
|
future
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bbk-amqp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.2.
|
|
4
|
+
version: 1.1.2.429702
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samoylenko Yuri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|