alephant-sequencer 0.3.0 → 1.0.0

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: 78834eb5da71bd4ecf953db6376f2f29155d48a8
4
- data.tar.gz: 02200274a6b1b437cb45b1bef7b9d7fd6b54feb2
3
+ metadata.gz: 7466abcf04d261c43c5530f34afd0175c147a632
4
+ data.tar.gz: b4d75acc04a87e90a3ea5b4e38710ae71b54a18b
5
5
  SHA512:
6
- metadata.gz: 8a2c2b4d457d07117af1f35acd520fe7113c76db8d25c15928534eb62165c5752f605faac944d4cfd1066e92fe17d66cdfb77281d17022789fd9009908bdc6a5
7
- data.tar.gz: a84e55d1c4991cc8c8042be5d7ae9f25e68165b57b000f7a6005da828ee05392ca23f30f4424a53dff7a70163efc4bcaf96897741da55f74878d95240cf4db9d
6
+ metadata.gz: bdac309998678c0f708e1916637b695a668a2640e7d02da705b12b99e8c8a25fd6817bc5e359d7da6ba0b63455f25ef6217db73ffd16d2ac085cb78921810f26
7
+ data.tar.gz: dc6ea117ba80d4eefb51278b632bc331248f68f482e679321bea31ef2983a6981899c7b4dbfcbe65572ac68ce1313f1001e879dfcf2a1da44703fb1df66c2ba7
@@ -25,7 +25,7 @@ module Alephant
25
25
  @exists || @sequence_table.sequence_exists(ident)
26
26
  end
27
27
 
28
- def sequence(msg, &block)
28
+ def validate(msg, &block)
29
29
  last_seen_id = get_last_seen
30
30
  sequential = ((last_seen_id || 0) < Sequencer.sequence_id_from(msg, jsonpath))
31
31
 
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Sequencer
3
- VERSION = "0.3.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -40,7 +40,7 @@ describe Alephant::Sequencer do
40
40
 
41
41
  end
42
42
 
43
- describe "#sequence(msg, &block)" do
43
+ describe "#validate(msg, &block)" do
44
44
  let(:message) do
45
45
  m = double()
46
46
  m.stub(:body)
@@ -71,7 +71,7 @@ describe Alephant::Sequencer do
71
71
 
72
72
  it "should call the passed block with msg" do
73
73
  subject = Alephant::Sequencer::Sequencer.new(sequence_table, ident, jsonpath)
74
- subject.sequence(message, &a_proc)
74
+ subject.validate(message, &a_proc)
75
75
  end
76
76
 
77
77
  context "last_seen_id is nil" do
@@ -93,7 +93,7 @@ describe Alephant::Sequencer do
93
93
  .with(message, nil)
94
94
 
95
95
  subject = Alephant::Sequencer::Sequencer.new(sequence_table, ident, jsonpath)
96
- subject.sequence(message, &a_proc)
96
+ subject.validate(message, &a_proc)
97
97
  end
98
98
  end
99
99
 
@@ -115,7 +115,7 @@ describe Alephant::Sequencer do
115
115
  .should_not_receive(:set_last_seen)
116
116
 
117
117
  subject = Alephant::Sequencer::Sequencer.new(sequence_table, ident, jsonpath)
118
- subject.sequence(message, &a_proc)
118
+ subject.validate(message, &a_proc)
119
119
  end
120
120
  end
121
121
 
@@ -138,7 +138,7 @@ describe Alephant::Sequencer do
138
138
  .should_not_receive(:set_last_seen)
139
139
 
140
140
  subject = Alephant::Sequencer::Sequencer.new(sequence_table, ident, jsonpath)
141
- subject.sequence(message, &a_proc)
141
+ subject.validate(message, &a_proc)
142
142
  end
143
143
 
144
144
  context "keep_all is false" do
@@ -150,7 +150,7 @@ describe Alephant::Sequencer do
150
150
  jsonpath,
151
151
  keep_all
152
152
  )
153
- subject.sequence(message, &an_uncalled_proc)
153
+ subject.validate(message, &an_uncalled_proc)
154
154
  end
155
155
  end
156
156
  end
@@ -174,7 +174,7 @@ describe Alephant::Sequencer do
174
174
  .with(message, stubbed_last_seen)
175
175
 
176
176
  subject = Alephant::Sequencer::Sequencer.new(sequence_table, ident, jsonpath)
177
- subject.sequence(message, &a_proc)
177
+ subject.validate(message, &a_proc)
178
178
  end
179
179
  end
180
180
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-sequencer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Kenny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-04 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler