event_bus_rb 2.0.2 → 2.0.3

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
2
  SHA1:
3
- metadata.gz: d128729c3bf2323a205460e0269f07c100460136
4
- data.tar.gz: f50b5b49486e02308b4be2ba1e7f80c08e807801
3
+ metadata.gz: 2b55480647d88875eb302115492fa981e8362058
4
+ data.tar.gz: bfcbc4445a99db9d8c15ea19fe563a74c2f3917b
5
5
  SHA512:
6
- metadata.gz: 8a6eaf96860b1778463ff94665e9064c3d5870064d5ec78e19ca10780eb714f7ca69e6c5e59eec7157edaf897109db2c1ba04145981b9ac48fd4f27bfb58b712
7
- data.tar.gz: 66ddf5d3b9dafffdfc3b070bc6059ce6417dc8224eb23ad1b9e275eb6b8be547f4606318f3e553761a1bcb55f3253ec65aed2d30cf0368f7720424538af30453
6
+ metadata.gz: cb2d6cf1597cf917a487966a672ae9fe176b65bb38b22697d8b7eecc164d52319572f7cbfd59efe8df095f94365be08fe71eb358cf072ff3946bcd4327346c85
7
+ data.tar.gz: 8f2faf2d532f5915cd016ade83dc301652e3f8be13f0bd39f84e14615efc5917d12ede9cebb11e522024d51301015b0650eea964d85e3ccd20e5744a8409d2d9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- event_bus_rb (2.0.2)
4
+ event_bus_rb (2.0.3)
5
5
  bunny (~> 2.7)
6
6
 
7
7
  GEM
@@ -1,13 +1,13 @@
1
1
  module EventBus
2
2
  module Broker
3
3
  class Rabbit::Queue
4
- def initialize(connection)
5
- @channel = connection
4
+ def initialize(channel)
5
+ @channel = channel
6
6
  @channel.prefetch(1)
7
7
  end
8
8
 
9
- def self.subscribe(connection, routing_key, &block)
10
- new(connection).subscribe(routing_key, &block)
9
+ def self.subscribe(channel, routing_key, &block)
10
+ new(channel).subscribe(routing_key, &block)
11
11
  end
12
12
 
13
13
  def subscribe(routing_key, &block)
@@ -1,20 +1,20 @@
1
1
  module EventBus
2
2
  module Broker
3
3
  class Rabbit::Topic
4
- def initialize(connection)
5
- @channel = connection
4
+ def initialize(channel)
5
+ @channel = channel
6
6
  end
7
7
 
8
- def self.topic(connection)
9
- new(connection).topic
8
+ def self.topic(channel)
9
+ new(channel).topic
10
10
  end
11
11
 
12
12
  def topic
13
13
  @topic ||= channel.topic(EventBus::Config::TOPIC, topic_options)
14
14
  end
15
15
 
16
- def self.produce(connection, event)
17
- new(connection).produce(event)
16
+ def self.produce(channel, event)
17
+ new(channel).produce(event)
18
18
  end
19
19
 
20
20
  def produce(event)
@@ -23,6 +23,8 @@ module EventBus
23
23
 
24
24
  def channel
25
25
  @@channel ||= connection.create_channel
26
+ @@channel = connection.create_channel if @@channel.closed?
27
+ @@channel
26
28
  end
27
29
 
28
30
  def session
@@ -1,3 +1,3 @@
1
1
  module EventBus
2
- VERSION = '2.0.2'
2
+ VERSION = '2.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_bus_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emprego Ligado
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-06 00:00:00.000000000 Z
11
+ date: 2017-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler