eventus 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/Gemfile +3 -1
- data/lib/eventus/persistence/sequel.rb +4 -2
- data/lib/eventus/version.rb +1 -1
- data/spec/persistence/sequel_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 753722580d9feb8371a2ad47ad44415702b0263e
|
4
|
+
data.tar.gz: e2e6f6c8ce0a22e50e96d51d9e10bea53c0b509a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d47bb1c5680d886a0a6a9e00507da9673934b2c0c3f17c92fdfd7ec521cb57eb87c6a63e8039235e634a6fefaffadc19cee8f5b221d6c43db586f9613bf3a19b
|
7
|
+
data.tar.gz: e3ae5076dd55f8d9dc0122ca244b9b3734ab232bb51525aa856ec0750c4d6531fc3228c4c821e55184ac99f7292b14f5948a4de4e950cd6613efaaf935902d77
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -30,8 +30,10 @@ module Eventus
|
|
30
30
|
events.all
|
31
31
|
end
|
32
32
|
|
33
|
-
def load_undispatched
|
34
|
-
@dataset.where(:dispatched => false)
|
33
|
+
def load_undispatched(sid = nil)
|
34
|
+
events = @dataset.where(:dispatched => false)
|
35
|
+
events = events.where(:sid => sid).order_by(:sequence) if sid
|
36
|
+
events.all
|
35
37
|
end
|
36
38
|
|
37
39
|
def mark_dispatched(sid, sequence)
|
data/lib/eventus/version.rb
CHANGED
@@ -66,6 +66,11 @@ describe Eventus::Persistence::Sequel do
|
|
66
66
|
result.select{|r| r['sid'] == id}.length.should == 10
|
67
67
|
end
|
68
68
|
|
69
|
+
it "should load undispatched events by sid" do
|
70
|
+
result = persistence.load_undispatched(id)
|
71
|
+
result.length.should == 10
|
72
|
+
end
|
73
|
+
|
69
74
|
it "should mark an event as dispatched" do
|
70
75
|
result = persistence.load_undispatched[0]
|
71
76
|
persistence.mark_dispatched(result['sid'], result['sequence'])
|