eventq_rabbitmq 1.2.1 → 1.2.2

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: d74cbc21370d4886245ee0447b69ddce3a7d4003
4
- data.tar.gz: 25a3644700b1a360c9517d7982568517055d0c03
3
+ metadata.gz: 09f3df15e86a9a5939b9b6308c8b84332924bd0f
4
+ data.tar.gz: a048440d5d90ac15663426817e4e9be5273c66ff
5
5
  SHA512:
6
- metadata.gz: 6c69c1fd755c26246a474699e53b11226ee39290fda31504131820af326ee4f9edd2debff61e243e0a1aa1d928dcec7c25bc43f931ad437e466a41069d0c4ba0
7
- data.tar.gz: 55289d2d304456bec08ad44ecc79583b004d0d34320fec9c4a3828e7353957139457c50e6c84bf1c5b5fa8c2d2d1d9c5f712f1c54b9636dd84f2457086f19a4d
6
+ metadata.gz: f3b83a74ac81d5ba906bcea57dccba2d256a8bd77ea07e1e16f567746aca56de69d5f00dcacdd3f4a5c0a4d6893e81824e0b5507296dc7dc6568127d13dafafd
7
+ data.tar.gz: af7753f71b72f42d5a4ba180b2adbe2f7eca222f0583b10b003a9b1fd37fcd02d44ea6f1b92117bfdbfc8922f2d8062dbc50616eef4ba65701041838bbdb336a
@@ -3,10 +3,15 @@ module EventQ
3
3
  class EventQClient
4
4
 
5
5
  def initialize(options={})
6
- @client = options[:client] || QueueClient.new
6
+
7
+ if options[:client] == nil
8
+ raise ':client (QueueClient) must be specified.'
9
+ end
10
+
11
+ @client = options[:client]
7
12
  @queue_manager = QueueManager.new
8
13
  @event_raised_exchange = EventRaisedExchange.new
9
- @subscription_manager = options[:subscription_manager] || SubscriptionManager.new
14
+ @subscription_manager = options[:subscription_manager]
10
15
  end
11
16
 
12
17
  def raise_event(event_type, event)
@@ -4,7 +4,11 @@ module EventQ
4
4
 
5
5
  def initialize(options = {})
6
6
 
7
- @endpoint = options[:endpoint] || 'localhost'
7
+ if options[:endpoint] == nil
8
+ raise ':endpoint must be specified.'
9
+ end
10
+
11
+ @endpoint = options[:endpoint]
8
12
 
9
13
  @port = Integer(options[:port] || 5672)
10
14
 
@@ -19,6 +19,10 @@ module EventQ
19
19
 
20
20
  raise 'Worker is already running.' if running?
21
21
 
22
+ if options[:client] == nil
23
+ raise ':client (QueueClient) must be specified.'
24
+ end
25
+
22
26
  @is_running = true
23
27
  @threads = []
24
28
 
@@ -26,7 +30,7 @@ module EventQ
26
30
  @thread_count.times do
27
31
  thr = Thread.new do
28
32
 
29
- client = options[:client] || QueueClient.new
33
+ client = options[:client]
30
34
  manager = QueueManager.new
31
35
 
32
36
  #begin the queue loop for this thread
@@ -3,7 +3,10 @@ module EventQ
3
3
  class SubscriptionManager
4
4
 
5
5
  def initialize(options = {})
6
- @client = options[:client] || QueueClient.new
6
+ if options[:client] == nil
7
+ raise ':client (QueueClient) must be specified.'
8
+ end
9
+ @client = options[:client]
7
10
  @queue_manager = QueueManager.new
8
11
  @event_raised_exchange = EventQ::EventRaisedExchange.new
9
12
  end
@@ -1,3 +1,3 @@
1
1
  module EventqRabbitmq
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventq_rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage