sandthorn 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/sandthorn.rb +8 -0
- data/lib/sandthorn/aggregate_root_base.rb +4 -3
- data/lib/sandthorn/version.rb +1 -1
- data/sandthorn.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 264411828ceee4ea1915efe3f722133d514b4bf2
|
4
|
+
data.tar.gz: ec65529f45578093403dd4fc53042ea98b527594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d6ddfdf0147881f3d2346f7eee7d25a2d8c63e497d93bae583a94b49f78d34790ce16aa611aece9fdfcb179f70026cd095708c974b40828678ff7c3b87354cd
|
7
|
+
data.tar.gz: 40747fe40ae47821bef14ff855876861a2d2c76d7a69749d363282cc9f3c2eb291d07b188d1793f8c04fde83f2175a5473b3d56884e2b45166f73ea37a1b7ad9
|
data/Gemfile
CHANGED
data/lib/sandthorn.rb
CHANGED
@@ -52,6 +52,14 @@ module Sandthorn
|
|
52
52
|
event_store_for(aggregate_type).get_aggregate_ids(aggregate_type: aggregate_type)
|
53
53
|
end
|
54
54
|
|
55
|
+
def all aggregate_type
|
56
|
+
event_store_for(aggregate_type).all(aggregate_type)
|
57
|
+
end
|
58
|
+
|
59
|
+
def find aggregate_id, aggregate_type
|
60
|
+
event_store_for(aggregate_type).find(aggregate_id)
|
61
|
+
end
|
62
|
+
|
55
63
|
def get_events event_store: :default, aggregate_types: [], take: 0, after_sequence_number: 0
|
56
64
|
event_store = find_event_store(event_store)
|
57
65
|
events = event_store.get_events aggregate_types: aggregate_types, take: take, after_sequence_number: after_sequence_number
|
@@ -72,8 +72,9 @@ module Sandthorn
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def all
|
75
|
-
|
76
|
-
|
75
|
+
Sandthorn.all(self).map { |events|
|
76
|
+
aggregate_build events
|
77
|
+
}
|
77
78
|
end
|
78
79
|
|
79
80
|
def find id
|
@@ -82,7 +83,7 @@ module Sandthorn
|
|
82
83
|
end
|
83
84
|
|
84
85
|
def aggregate_find aggregate_id
|
85
|
-
events = Sandthorn.
|
86
|
+
events = Sandthorn.find(aggregate_id, self)
|
86
87
|
unless events && !events.empty?
|
87
88
|
raise Sandthorn::Errors::AggregateNotFound
|
88
89
|
end
|
data/lib/sandthorn/version.rb
CHANGED
data/sandthorn.gemspec
CHANGED
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency "autotest-standalone"
|
31
31
|
spec.add_development_dependency "sqlite3"
|
32
32
|
spec.add_development_dependency "coveralls"
|
33
|
-
spec.add_development_dependency "sandthorn_driver_sequel", ">= 3.
|
33
|
+
spec.add_development_dependency "sandthorn_driver_sequel", ">= 3.1"
|
34
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sandthorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lars Krantz
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -158,14 +158,14 @@ dependencies:
|
|
158
158
|
requirements:
|
159
159
|
- - ">="
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: '3.
|
161
|
+
version: '3.1'
|
162
162
|
type: :development
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
166
|
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: '3.
|
168
|
+
version: '3.1'
|
169
169
|
description: Event sourcing gem
|
170
170
|
email:
|
171
171
|
- lars.krantz@alaz.se
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.4.
|
241
|
+
rubygems_version: 2.4.3
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Event sourcing gem
|