message_bus 1.0.5 → 1.0.6
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.
Potentially problematic release.
This version of message_bus might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/lib/message_bus/reliable_pub_sub.rb +1 -1
- data/lib/message_bus/version.rb +1 -1
- data/spec/lib/reliable_pub_sub_spec.rb +9 -0
- 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: c0b70bc076d2e41296fabb4f0688efaf122fb75c
|
4
|
+
data.tar.gz: 9e9416fc3384e18b3462de075c82e7e1c6b761b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f859667b95a382bcfd9a759042f209c6d2d4eaa5803eead42a782e8742aca723e0cd58f234304dc507317c549586b18a857d883d60c824799baa4232bdd7d5a
|
7
|
+
data.tar.gz: 65c3caf35cb1e41d8ed6565984171df215b4c96d85df5ba12e7ebfdb5244ac930e110ac1f92f9778a51a2e692871271606c7add272b5aca29a4c464b79a5eb78
|
data/CHANGELOG
CHANGED
@@ -126,7 +126,7 @@ class MessageBus::ReliablePubSub
|
|
126
126
|
end
|
127
127
|
|
128
128
|
if global_id > @max_global_backlog_size
|
129
|
-
redis.zremrangebyscore global_backlog_key, 1,
|
129
|
+
redis.zremrangebyscore global_backlog_key, 1, global_id - @max_global_backlog_size
|
130
130
|
end
|
131
131
|
|
132
132
|
backlog_id
|
data/lib/message_bus/version.rb
CHANGED
@@ -34,6 +34,15 @@ describe MessageBus::ReliablePubSub do
|
|
34
34
|
]
|
35
35
|
end
|
36
36
|
|
37
|
+
it "should truncate global backlog correctly" do
|
38
|
+
@bus.max_global_backlog_size = 2
|
39
|
+
@bus.publish "/foo", "1"
|
40
|
+
@bus.publish "/bar", "2"
|
41
|
+
@bus.publish "/baz", "3"
|
42
|
+
|
43
|
+
@bus.global_backlog.length.should == 2
|
44
|
+
end
|
45
|
+
|
37
46
|
it "should be able to grab a message by id" do
|
38
47
|
id1 = @bus.publish "/foo", "bar"
|
39
48
|
id2 = @bus.publish "/foo", "baz"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|