event_store_client 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 073a691ef952647fd7be92fad2526a279dccfe05867c524ccab6a86aee815dd2
|
4
|
+
data.tar.gz: 75c51d92577ceb57488e07761466dd58bf1b8cb52e23ee11a82d40bdfb387039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9ba15429219f65fc9a7473642ff2e7a0c048cf14a0246f00ecac62ad5daf38ab9c0a800993911d14cd142706ec1d3f5e233e092279391c7c7d9d43683468a05
|
7
|
+
data.tar.gz: 27f4088d4e92c6a0cef51a93970559a4253d44789e5d9c3a744afebc59de027f3f1853e0c527de5438ede1031bd5cf9ad36aff2e6f8f82856202c23a45b47025
|
@@ -50,13 +50,21 @@ module EventStoreClient
|
|
50
50
|
def deserialize_event(entry)
|
51
51
|
id = entry.id.string
|
52
52
|
id = SecureRandom.uuid if id.nil? || id.empty?
|
53
|
+
|
54
|
+
data = (entry.data.nil? || entry.data.empty?) ? '{}' : entry.data
|
55
|
+
|
56
|
+
metadata =
|
57
|
+
JSON.parse(entry.custom_metadata || '{}').merge(
|
58
|
+
entry.metadata.to_h || {}
|
59
|
+
).to_json
|
60
|
+
|
53
61
|
config.mapper.deserialize(
|
54
62
|
EventStoreClient::Event.new(
|
55
63
|
id: id,
|
56
64
|
title: "#{entry.stream_revision}@#{entry.stream_identifier.streamName}",
|
57
65
|
type: entry.metadata['type'],
|
58
|
-
data:
|
59
|
-
metadata:
|
66
|
+
data: data,
|
67
|
+
metadata: metadata
|
60
68
|
)
|
61
69
|
)
|
62
70
|
end
|