gilmour 0.4.3 → 0.4.4
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 +4 -4
- data/lib/gilmour/backends/redis.rb +3 -6
- data/lib/gilmour/base.rb +1 -1
- data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a61b1be06598f3e75a8a9ba987f972258955edd
|
4
|
+
data.tar.gz: 8198bf46a1945c319c95002a7f0885eb66aa961c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
#
|
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
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.
|
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-
|
12
|
+
date: 2015-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|