aggregate_root 0.40.0 → 0.40.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/aggregate_root.gemspec +1 -1
- data/lib/aggregate_root.rb +5 -3
- data/lib/aggregate_root/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e63fa532bbaf6927f588d0cd50b2c89abc7b9f6ecedc287705f7d53340167101
|
4
|
+
data.tar.gz: 2e6f68ea32c8d440bae1737003bf80b212fa8941bd1fe89295b5d430530088d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14630172c9ac1989c25faad5fd9044e983f5d6ab367f2833250aae5fd4739105acf6efbabab33965cb9495d4d8fff6fd681a9d33ea046e781a3c8b5200c43acc
|
7
|
+
data.tar.gz: eaab3e9575870575622285a2602295512ec9390158b31cf8c1250a8b324ce3ed89f4af9b076f437a3065163c3f50313da19fbaa0fabe3bc84612cfcc233acec6
|
data/aggregate_root.gemspec
CHANGED
data/lib/aggregate_root.rb
CHANGED
@@ -8,10 +8,12 @@ require 'aggregate_root/instrumented_repository'
|
|
8
8
|
|
9
9
|
module AggregateRoot
|
10
10
|
module OnDSL
|
11
|
+
ANONYMOUS_CLASS = "#<Class:".freeze
|
12
|
+
|
11
13
|
def on(*event_klasses, &block)
|
12
14
|
event_klasses.each do |event_klass|
|
13
15
|
name = event_klass.to_s
|
14
|
-
raise(ArgumentError, "Anonymous class is missing name") if name.start_with?
|
16
|
+
raise(ArgumentError, "Anonymous class is missing name") if name.start_with? ANONYMOUS_CLASS
|
15
17
|
handler_name = "on_#{name}"
|
16
18
|
define_method(handler_name, &block)
|
17
19
|
@on_methods ||= {}
|
@@ -27,8 +29,8 @@ module AggregateRoot
|
|
27
29
|
end
|
28
30
|
|
29
31
|
module Constructor
|
30
|
-
def new
|
31
|
-
super
|
32
|
+
def new(*)
|
33
|
+
super.tap do |instance|
|
32
34
|
instance.instance_variable_set(:@version, -1)
|
33
35
|
instance.instance_variable_set(:@unpublished_events, [])
|
34
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aggregate_root
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.40.
|
4
|
+
version: 0.40.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_event_store
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.40.
|
19
|
+
version: 0.40.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.40.
|
26
|
+
version: 0.40.1
|
27
27
|
description: Event sourced (with Rails Event Store) aggregate root implementation
|
28
28
|
email:
|
29
29
|
- dev@arkency.com
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|
69
|
-
rubygems_version: 3.0.
|
69
|
+
rubygems_version: 3.0.3
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: Event sourced (with Rails Event Store) aggregate root implementation
|