evt-entity_projection 0.1.0.3 → 0.2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/entity_projection/entity_projection.rb +12 -12
- 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: 23f0bfd91feb804a12ce76a8b8ffa1e73c0e151b
|
4
|
+
data.tar.gz: b850f77586e53b37be15bb17a7319e51063804f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45c1e581a3dd61398dd2e1b376ad5a46937ac4f3d51a8eb0612b7a4b74e451ea5184c30df6f76eb00b5b403e4d278d95cfc1224c584e823cc37c878820c10fb1
|
7
|
+
data.tar.gz: 38f9b9e8b044a010bee4026bd2492a8164560baa574920e7a5879ceef53dad85870acd44cfa6cd266d729acb7dca86ca494f62e7ccf0e846bca5f3ee3604b0c4
|
@@ -114,15 +114,15 @@ module EntityProjection
|
|
114
114
|
|
115
115
|
def call(message_or_event_data)
|
116
116
|
if message_or_event_data.is_a? Messaging::Message
|
117
|
-
|
117
|
+
apply_message(message_or_event_data)
|
118
118
|
else
|
119
|
-
|
119
|
+
apply_event_data(message_or_event_data)
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
-
def
|
124
|
-
logger.trace(tags: [:
|
125
|
-
logger.trace(tags: [:data, :message, :
|
123
|
+
def apply_message(message)
|
124
|
+
logger.trace(tags: [:apply, :message]) { "Applying message (Message class: #{message.class.name})" }
|
125
|
+
logger.trace(tags: [:data, :message, :apply]) { message.pretty_inspect }
|
126
126
|
|
127
127
|
handler = self.class.handler(message)
|
128
128
|
|
@@ -130,15 +130,15 @@ module EntityProjection
|
|
130
130
|
public_send(handler, message)
|
131
131
|
end
|
132
132
|
|
133
|
-
logger.info(tags: [:
|
134
|
-
logger.trace(tags: [:data, :message, :
|
133
|
+
logger.info(tags: [:apply, :message]) { "Applied message (Message class: #{message.class.name})" }
|
134
|
+
logger.trace(tags: [:data, :message, :apply]) { message.pretty_inspect }
|
135
135
|
|
136
136
|
message
|
137
137
|
end
|
138
138
|
|
139
|
-
def
|
140
|
-
logger.trace(tags: [:
|
141
|
-
logger.trace(tags: [:data, :event_data, :
|
139
|
+
def apply_event_data(event_data)
|
140
|
+
logger.trace(tags: [:apply, :event_data]) { "Applying event data (Type: #{event_data.type})" }
|
141
|
+
logger.trace(tags: [:data, :event_data, :apply]) { event_data.pretty_inspect }
|
142
142
|
|
143
143
|
res = nil
|
144
144
|
|
@@ -155,8 +155,8 @@ module EntityProjection
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
|
-
logger.info(tags: [:
|
159
|
-
logger.info(tags: [:data, :event_data, :
|
158
|
+
logger.info(tags: [:apply, :event_data]) { "Applied event data (Type: #{event_data.type})" }
|
159
|
+
logger.info(tags: [:data, :event_data, :apply]) { event_data.pretty_inspect }
|
160
160
|
|
161
161
|
res
|
162
162
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-entity_projection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-messaging
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 2.
|
75
|
+
rubygems_version: 2.6.11
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Projects event data into an entity
|