gilmour 0.4.3 → 0.4.4

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: 95eeea219493df9807854e6166cf211c28dc300d
4
- data.tar.gz: 72809d9709e8c54962000f1d733ab752fb11d641
3
+ metadata.gz: 7a61b1be06598f3e75a8a9ba987f972258955edd
4
+ data.tar.gz: 8198bf46a1945c319c95002a7f0885eb66aa961c
5
5
  SHA512:
6
- metadata.gz: 0ed0cef345aadc5ca715c841eb348245dfe688906b5ef944bc0ff2ec3fce1a73706873b2a43975218a1c367d69a33062174c839d3e6cbe51cca8e5e7e0bab494
7
- data.tar.gz: 71e365656a8544b2324494552f85c446682241e48c0ae0d69b57725a0013bbb0a80398ab64d6fb8e125342052bdce0d70b90f61efa839a128817909d5186abb7
6
+ metadata.gz: 06e5a201e77837513442296ae6f2d116893f6cfbe4aa84bafeaaab468b56ca89e3f7a5fe91dc730932ad72ad2e8014c5d27e5cc96a8f6ca156dd56aff39d07cd
7
+ data.tar.gz: 01e1a704c10fd57fc3c29304d24e8f09699ccd28b1dfe2a2d1d870878977f0feb0eadc03bd64dfb7d43bcc736beb85214da9d9a4ce5f5e9aefde74ee12149a1d
@@ -174,7 +174,9 @@ module Gilmour
174
174
  end
175
175
 
176
176
  def add_listener(topic, opts = {}, &blk) #:nodoc:
177
- if opts[:excl] && exclusive_group(opts).empty?
177
+ # TODO: leave for backward compatibility
178
+ opts[:exclusive] = opts[:excl] if opts[:exclusive].nil?
179
+ if opts[:exclusive] && exclusive_group(opts).empty?
178
180
  raise ArgumentError.new("Invalid exclusive group")
179
181
  end
180
182
  opts[:handler] ||= blk
@@ -262,11 +264,6 @@ module Gilmour
262
264
  add_listener(topic) do
263
265
  respond backend.get_subscribers
264
266
  end
265
-
266
- # TODO: Need to do these manually. Alternate is to return the handler
267
- # hash from add_listener.
268
- @subscriptions[topic][0][:exclusive] = true
269
-
270
267
  end
271
268
 
272
269
  def unregister_health_check #:nodoc:
data/lib/gilmour/base.rb CHANGED
@@ -59,7 +59,7 @@ module Gilmour
59
59
  # Adds a listener for the given topic
60
60
  # +topic+:: The topic to listen to
61
61
  # +opts+:: Hash of optional arguments. Supported options are:
62
- # excl:: If true, this listener is added to a group of listeners
62
+ # exclusive:: If true, this listener is added to a group of listeners
63
63
  # with the same name as the name of the class in which this
64
64
  # method is called. A message sent to the _topic_ will be
65
65
  # processed by at most one listener from a group
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gilmour
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gilmour
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditya Godbole
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-11 00:00:00.000000000 Z
12
+ date: 2015-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec