active_publisher 1.2.0 → 1.2.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 982d3b5383cab0a20bdf603ba20204988ebef61f0ac7d5a491eb472f4eb205e3
|
|
4
|
+
data.tar.gz: 7e50b3a2fdb76ecfb92b2c76d8bd18d8b753fb08f1ac31400095e077ca364f76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 256b09515fd4c47c1f57b2e725876cbc0c6a82d81ca1f575cc34682b29a0a74cf18d5725f431e105201ac5fe7e7a43ff54ba0b11d8c761d47a788d66bd422f9d
|
|
7
|
+
data.tar.gz: a4fc04ddf398998435e0b44284a3e6dc45b7909067ce5640159fabdc8edb5bb9b8a35f0ee57673bf4bd15bc1dd8838889b7ed29f1614c0573296e0c554818e99
|
data/.travis.yml
CHANGED
|
@@ -108,16 +108,15 @@ module ActivePublisher
|
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
def publish_all(channel, exchange_name, messages)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
messages.
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
exchange = channel.topic(exchange_name)
|
|
112
|
+
messages.each do |message|
|
|
113
|
+
fail ::ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
|
|
114
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher", :route => message.route, :message_count => 1 do
|
|
116
115
|
options = ::ActivePublisher.publishing_options(message.route, message.options || {})
|
|
117
116
|
exchange.publish(message.payload, options)
|
|
118
117
|
end
|
|
119
|
-
wait_for_confirms(channel)
|
|
120
118
|
end
|
|
119
|
+
wait_for_confirms(channel)
|
|
121
120
|
end
|
|
122
121
|
|
|
123
122
|
def wait_for_confirms(channel)
|
data/lib/active_publisher.rb
CHANGED
|
@@ -35,7 +35,7 @@ module ActivePublisher
|
|
|
35
35
|
# @param [Hash] options hash to set message parameters (e.g. headers)
|
|
36
36
|
def self.publish(route, payload, exchange_name, options = {})
|
|
37
37
|
with_exchange(exchange_name) do |exchange|
|
|
38
|
-
::ActiveSupport::Notifications.instrument "message_published.active_publisher" do
|
|
38
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher", :route => route do
|
|
39
39
|
exchange.publish(payload, publishing_options(route, options))
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -51,7 +51,7 @@ module ActivePublisher
|
|
|
51
51
|
fail ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
|
|
52
52
|
|
|
53
53
|
begin
|
|
54
|
-
::ActiveSupport::Notifications.instrument "message_published.active_publisher" do
|
|
54
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher", :route => message.route do
|
|
55
55
|
exchange.publish(message.payload, publishing_options(message.route, message.options || {}))
|
|
56
56
|
end
|
|
57
57
|
rescue
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_publisher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Stien
|
|
@@ -12,7 +12,7 @@ authors:
|
|
|
12
12
|
autorequire:
|
|
13
13
|
bindir: exe
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date:
|
|
15
|
+
date: 2020-04-17 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: bunny
|
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
224
224
|
version: '0'
|
|
225
225
|
requirements: []
|
|
226
226
|
rubyforge_project:
|
|
227
|
-
rubygems_version: 2.6
|
|
227
|
+
rubygems_version: 2.7.6
|
|
228
228
|
signing_key:
|
|
229
229
|
specification_version: 4
|
|
230
230
|
summary: Aims to make publishing work across MRI and jRuby painless and add some nice
|