brown 2.1.0 → 2.1.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
2
  SHA1:
3
- metadata.gz: 533a83a95c3312b2e6a4e25f221e986a8eaef37e
4
- data.tar.gz: cf1281ffec74c55361b9063b9b697b889820d727
3
+ metadata.gz: 5cc95726eacf9732ee7d020ffc841e087f5b057a
4
+ data.tar.gz: 708dc32a8fe3830acf136ed7d6830e5b8df80fae
5
5
  SHA512:
6
- metadata.gz: 452d13bf5a6b8421caca390bde9024233a7e28bf16b5bbe1efba7405f2d894e539790549d1a36c28484d2cd600c642c1cac6f4e9ad2f8868b9766fdb0fe65c19
7
- data.tar.gz: fcd7d4dde5c0589c2b19a58ce19bcb8d73ee77b0b18afe8b4706253b7feb9c0aaabb14cb702de8b029eba7eedc7951dee6c328ac58acbd62b5d07b3bd0ac11bc
6
+ metadata.gz: e91292e3193b4ed6f25971c76acb83afc69f6c015bc7c63f10e8c13770de1e18c9d9c00aad183149d9a7dc33189ada46cd71a60f5c66c420817f321fb81267d0
7
+ data.tar.gz: dbffc92d30352eb5c7c66b0e20c4806e796bc5eeb5292e2910ffccceb013f8303488bd73c9056613761e6d4924430daf58e43b632d35e944eeaf03b22fd30e2a
data/bin/brown CHANGED
@@ -21,7 +21,7 @@ end
21
21
 
22
22
  Brown::Agent.logger = Logger.new($stderr)
23
23
  Brown::Agent.logger.level = Logger.const_get(ENVied.BROWN_LOG_LEVEL.upcase.to_sym)
24
- Brown::Agent.logger.formatter = proc { |s,dt,n,msg| "#{$$} [#{s[0]}] #{msg}\n" }
24
+ Brown::Agent.logger.formatter = proc { |s,dt,n,msg| "#{$$}-#{Thread.current.object_id} [#{s[0]}] #{msg}\n" }
25
25
 
26
26
  agents = ThreadGroup.new
27
27
 
@@ -284,7 +284,7 @@ class Brown::Agent
284
284
  stimulate(worker_method) do |worker|
285
285
  __send__(queue_memo) do |queue|
286
286
  queue.subscribe(manual_ack: true, block: true) do |di, prop, payload|
287
- yield Brown::Agent::AMQPMessage.new(di, prop, payload)
287
+ worker.call Brown::Agent::AMQPMessage.new(di, prop, payload)
288
288
  end
289
289
  end
290
290
  end
@@ -101,7 +101,13 @@ module Brown::TestHelpers
101
101
  def amqp_listener_with_test(exchange_name, *args, &blk)
102
102
  @amqp_listeners ||= {}
103
103
 
104
- @amqp_listeners[exchange_name.to_s] = blk
104
+ if exchange_name.is_a? Array
105
+ exchange_name.each do |en|
106
+ @amqp_listeners[en.to_s] = blk
107
+ end
108
+ else
109
+ @amqp_listeners[exchange_name.to_s] = blk
110
+ end
105
111
 
106
112
  amqp_listener_without_test(exchange_name, *args, &blk)
107
113
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brown
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Palmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-01 00:00:00.000000000 Z
11
+ date: 2015-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny