nexia_event_store 0.5.4 → 0.5.5
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.
- checksums.yaml +4 -4
- data/lib/event_store/snapshot.rb +4 -0
- data/lib/event_store/version.rb +1 -1
- data/spec/event_store/snapshot_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75c841fd2b24716c2dbd7b9b13f5bf7a36b49245
|
4
|
+
data.tar.gz: 566d2e421c91050e0772e2ccbc5d27c03c096901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfff57a2513a6ac67143e6aab4debc8e52349e81694f3956aa41383300b3d08284be7b5539284f3fcb1a09039d4020d4338fe45860e25cd4bcde329b2144b1f6
|
7
|
+
data.tar.gz: f6d785fdd24304b0b33cef67726cc7a50581c895300b41da3e3d57c4ee906914e23058b7a8542a29a0cca8842d173a5f157dbf1ce9217936bbfece606c18c7ff
|
data/lib/event_store/snapshot.rb
CHANGED
@@ -27,6 +27,10 @@ module EventStore
|
|
27
27
|
version(snapshot_key(fully_qualified_name: fully_qualified_name, sub_key: sub_key))
|
28
28
|
end
|
29
29
|
|
30
|
+
def count
|
31
|
+
auto_rebuild_snapshot(read_raw_snapshot).count
|
32
|
+
end
|
33
|
+
|
30
34
|
def each
|
31
35
|
events_hash = auto_rebuild_snapshot(read_raw_snapshot)
|
32
36
|
events_hash.inject([]) do |snapshot, (key, value)|
|
data/lib/event_store/version.rb
CHANGED
@@ -30,6 +30,12 @@ module EventStore
|
|
30
30
|
client.append events_for(AGGREGATE_ID_TWO)
|
31
31
|
end
|
32
32
|
|
33
|
+
describe "#count" do
|
34
|
+
it "delegates to the snapshot hash" do
|
35
|
+
expect(client.snapshot.count).to eq(8)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
33
39
|
it "rebuilds a snapshot after it is deleted" do
|
34
40
|
snapshot = client.snapshot
|
35
41
|
client.delete_snapshot!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexia_event_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Saieg, John Colvin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -273,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
275
|
rubyforge_project:
|
276
|
-
rubygems_version: 2.4.
|
276
|
+
rubygems_version: 2.4.3
|
277
277
|
signing_key:
|
278
278
|
specification_version: 4
|
279
279
|
summary: Ruby implementation of an EventSource (A+ES) for the Nexia Ecosystem
|