aggregate_root 0.42.0 → 0.43.0
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 +1 -1
- data/lib/aggregate_root/default_apply_strategy.rb +6 -2
- 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: 6722a27002d1414528635db8339fe8a9d38f3c302a9a6aa20c0e7b744e8adc99
|
4
|
+
data.tar.gz: da630b00d7edc68443d36cdd708e73fa287e0f9db5ab482f37e02e2b00d0edb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9d88d9b7d598db1d1cbb8266f7d86874271e6670767290657658d4cdc1993091e9600ed056a03d87d51d98b09453d67d11ade190c5fb31f66bafa364cce8d6a
|
7
|
+
data.tar.gz: 1ca037cc094889c0d213f84a59530c49974c5823df285389460ec1a5bd1c04d9f0bc2e39176ebb3f3f909366af5f9172d0e376849280b287018abbd8a7b3466b
|
data/aggregate_root.gemspec
CHANGED
data/lib/aggregate_root.rb
CHANGED
@@ -65,7 +65,7 @@ module AggregateRoot
|
|
65
65
|
Module.new do
|
66
66
|
def self.included(host_class)
|
67
67
|
host_class.extend OnDSL
|
68
|
-
host_class.include AggregateRoot.with_strategy(->
|
68
|
+
host_class.include AggregateRoot.with_strategy(->{ DefaultApplyStrategy.new })
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -20,10 +20,14 @@ module AggregateRoot
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def handler_name(aggregate, event)
|
23
|
-
aggregate
|
23
|
+
on_dsl_handler_name(aggregate, event.type) || apply_handler_name(event.type)
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def on_dsl_handler_name(aggregate, event_type)
|
27
|
+
aggregate.class.on_methods[event_type] if aggregate.class.respond_to?(:on_methods)
|
28
|
+
end
|
29
|
+
|
30
|
+
def apply_handler_name(event_type)
|
27
31
|
"apply_#{Transform.to_snake_case(event_type(event_type))}"
|
28
32
|
end
|
29
33
|
|
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.
|
4
|
+
version: 0.43.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-26 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.
|
19
|
+
version: 0.43.0
|
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.
|
26
|
+
version: 0.43.0
|
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
|