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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2eb238a2448707b87bbc256a1f87c6cae9280b4
4
- data.tar.gz: 7171e7950dc50c447fe683ad18d7bcce93656e4b
3
+ metadata.gz: 753722580d9feb8371a2ad47ad44415702b0263e
4
+ data.tar.gz: e2e6f6c8ce0a22e50e96d51d9e10bea53c0b509a
5
5
  SHA512:
6
- metadata.gz: 0bd26a10715da2f060a18f931f2bda098a378aa7f294bbabed44f94ff8835b89998b5dee83adec765c695f613b8e4d52afffffa31820bb0f964866615df9b46a
7
- data.tar.gz: 33a6d64c6ac01dd91a59d172d3c63f6149e3232d8208920b6ffb65170f609e30c732221681113cb42d088d2e91a2dc2b6c5845da625a4303fc7ed71835a9818e
6
+ metadata.gz: d47bb1c5680d886a0a6a9e00507da9673934b2c0c3f17c92fdfd7ec521cb57eb87c6a63e8039235e634a6fefaffadc19cee8f5b221d6c43db586f9613bf3a19b
7
+ data.tar.gz: e3ae5076dd55f8d9dc0122ca244b9b3734ab232bb51525aa856ec0750c4d6531fc3228c4c821e55184ac99f7292b14f5948a4de4e950cd6613efaaf935902d77
@@ -9,3 +9,5 @@ rvm:
9
9
  services:
10
10
  - mongodb
11
11
  - redis-server
12
+ notifications:
13
+ email: false
data/Gemfile CHANGED
@@ -2,4 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'kyotocabinet-ruby', :platforms => [:ruby]
5
+ unless ENV['TRAVIS']
6
+ gem 'kyotocabinet-ruby', :platforms => [:ruby]
7
+ end
@@ -30,8 +30,10 @@ module Eventus
30
30
  events.all
31
31
  end
32
32
 
33
- def load_undispatched
34
- @dataset.where(:dispatched => false).all
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)
@@ -1,3 +1,3 @@
1
1
  module Eventus
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
@@ -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'])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Staten