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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7aa504726b847a3d9b1721a32bd87ae01d8e4cdc
4
- data.tar.gz: 9c0567bf68c1404e4d5b7b48721011fed464504c
3
+ metadata.gz: c0b70bc076d2e41296fabb4f0688efaf122fb75c
4
+ data.tar.gz: 9e9416fc3384e18b3462de075c82e7e1c6b761b9
5
5
  SHA512:
6
- metadata.gz: ecb0d74d4dc76fdab724e8263644e33d7958fad8649bb9e386258456b19e3320ab8fe60e8d0a23c657b1c9988560c32005e8bc070285400b7f41266e6fb51025
7
- data.tar.gz: 209f41516198cb4cd4d9deffd2a386281754e3decf565f4585159ca7ef55289935242e9db3e063aaa6d68f897da407e3d991243771b8f52c7fe5f52e60c396eb
6
+ metadata.gz: 5f859667b95a382bcfd9a759042f209c6d2d4eaa5803eead42a782e8742aca723e0cd58f234304dc507317c549586b18a857d883d60c824799baa4232bdd7d5a
7
+ data.tar.gz: 65c3caf35cb1e41d8ed6565984171df215b4c96d85df5ba12e7ebfdb5244ac930e110ac1f92f9778a51a2e692871271606c7add272b5aca29a4c464b79a5eb78
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 03-02-2015
2
+ - Version 1.0.6
3
+ - Fix: global backlog not truncating correctly
1
4
 
2
5
  23-09-2014
3
6
  - Version 1.0.5
@@ -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, backlog_id - @max_backlog_size
129
+ redis.zremrangebyscore global_backlog_key, 1, global_id - @max_global_backlog_size
130
130
  end
131
131
 
132
132
  backlog_id
@@ -1,3 +1,3 @@
1
1
  module MessageBus
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -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.5
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: 2014-10-24 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack