active_publisher 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 765c1305ed58595e4ca4c072d3f7f8d27fd0c8cc
4
- data.tar.gz: 618691b3fcd4e61cc44a9fc7e72ca24e54435717
2
+ SHA256:
3
+ metadata.gz: 982d3b5383cab0a20bdf603ba20204988ebef61f0ac7d5a491eb472f4eb205e3
4
+ data.tar.gz: 7e50b3a2fdb76ecfb92b2c76d8bd18d8b753fb08f1ac31400095e077ca364f76
5
5
  SHA512:
6
- metadata.gz: b4ceed8a6995e90bf24a1340a8eb18feebb20f7899d82ef8e2238eb020baf160a72f538e068d53cc7f8818924786437b559cefcf45dd1537c87f9a8e3fc2b4dc
7
- data.tar.gz: acc0fb1e08dc7608fd4980da294e065469239482c918deee28feaf771d679ff28d5613c5cbc6dd0da577a0a119a5d4e0edba0988272da093fa11b5f06a0bceba
6
+ metadata.gz: 256b09515fd4c47c1f57b2e725876cbc0c6a82d81ca1f575cc34682b29a0a74cf18d5725f431e105201ac5fe7e7a43ff54ba0b11d8c761d47a788d66bd422f9d
7
+ data.tar.gz: a4fc04ddf398998435e0b44284a3e6dc45b7909067ce5640159fabdc8edb5bb9b8a35f0ee57673bf4bd15bc1dd8838889b7ed29f1614c0573296e0c554818e99
data/.travis.yml CHANGED
@@ -3,6 +3,10 @@ rvm:
3
3
  - 2.3
4
4
  - 2.4
5
5
  - jruby-9.1.12.0
6
+ addons:
7
+ apt:
8
+ packages:
9
+ - rabbitmq-server
6
10
  services:
7
11
  - rabbitmq
8
12
  sudo: false
@@ -108,16 +108,15 @@ module ActivePublisher
108
108
  end
109
109
 
110
110
  def publish_all(channel, exchange_name, messages)
111
- ::ActiveSupport::Notifications.instrument "message_published.active_publisher", :message_count => messages.size do
112
- exchange = channel.topic(exchange_name)
113
- messages.each do |message|
114
- fail ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
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)
@@ -1,3 +1,3 @@
1
1
  module ActivePublisher
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -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.0
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: 2018-01-26 00:00:00.000000000 Z
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.13
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