queue-bus 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/queue_bus/subscription_list.rb +2 -0
- data/lib/queue_bus/version.rb +1 -1
- data/spec/subscription_list_spec.rb +12 -3
- 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: e1b4c0ca9bf660b79b88769d6ba7e4d2d89e28f5
|
4
|
+
data.tar.gz: 2840967bb05b953171b300d28538d6b362332e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90dded1ee751e8d7773fbc183a8c8a0c430ec7dac927090fae6c775c05605c007b11e9a0595b0670f83becd6f5100b012d63ec77b34180d3ce9c802c995ca48e
|
7
|
+
data.tar.gz: 9ddb1c632db8dcd4ca2d298fe50b219485cc408c264eef073d17b0f61fe447c4de04aad9cece3c01f3952f8cd5e931626a0f5aedbd3a8e7380111775095ac938
|
data/lib/queue_bus/version.rb
CHANGED
@@ -3,10 +3,12 @@ require 'spec_helper'
|
|
3
3
|
module QueueBus
|
4
4
|
describe SubscriptionList do
|
5
5
|
describe ".from_redis" do
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
let(:mult) do
|
7
|
+
{"event_one" => {"class" => "MyClass", "queue_name" => "default", "key" => "event_one", "matcher" => {"bus_event_type" => "event_one"}},
|
8
|
+
"event_two" => {"class" => "MyClass", "queue_name" => "else", "key" => "event_two", "matcher" => {"bus_event_type" => "event_two"}}}
|
9
|
+
end
|
9
10
|
|
11
|
+
it "should return from attributes" do
|
10
12
|
list = SubscriptionList.from_redis(mult)
|
11
13
|
list.size.should == 2
|
12
14
|
one = list.key("event_one")
|
@@ -24,6 +26,13 @@ module QueueBus
|
|
24
26
|
two.class_name.should == "MyClass"
|
25
27
|
two.matcher.filters.should == {"bus_event_type" => "event_two"}
|
26
28
|
end
|
29
|
+
|
30
|
+
it "raises an error if a subscription key already exists" do
|
31
|
+
mult["event_two"]["key"] = "event_one"
|
32
|
+
|
33
|
+
lambda { SubscriptionList.from_redis(mult) }
|
34
|
+
.should raise_error(RuntimeError)
|
35
|
+
end
|
27
36
|
end
|
28
37
|
|
29
38
|
describe "#to_redis" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue-bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Leonard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|