event_store_client 1.0.4 → 1.0.5
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: db502b71c397ab4b8342c126ebe161fa9fd6d3af0a22ba2ff4e17981a14542e2
|
4
|
+
data.tar.gz: 666aac3c5b343ed350856ba8a2722de2586268fe88ed502c990e8c3fa986ffad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84c87f1c1980a22426c3db3c2809df9c375b249d0e59151f223a4e9789e16287407d6573f67bccbd56aef0ac1b4fa31649928f2b30247831ad6260c5204bbdb1
|
7
|
+
data.tar.gz: 7e79bd96657215653d6abd573fb2c11f500a97caff0f17270421511ee0a58b66f30dfa69dcfb8d389de008a887458663a554ce8f4216ae514666a3041f87d4a0
|
@@ -48,9 +48,11 @@ module EventStoreClient
|
|
48
48
|
private
|
49
49
|
|
50
50
|
def deserialize_event(entry)
|
51
|
+
id = entry.id.string
|
52
|
+
id = SecureRandom.uuid if id.nil? || id.empty?
|
51
53
|
config.mapper.deserialize(
|
52
54
|
EventStoreClient::Event.new(
|
53
|
-
id:
|
55
|
+
id: id,
|
54
56
|
title: "#{entry.stream_revision}@#{entry.stream_identifier.streamName}",
|
55
57
|
type: entry.metadata['type'],
|
56
58
|
data: entry.data || '{}',
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'securerandom'
|
3
4
|
require 'grpc'
|
4
5
|
require 'event_store_client/adapters/grpc/generated/streams_pb.rb'
|
5
6
|
require 'event_store_client/adapters/grpc/generated/streams_services_pb.rb'
|
@@ -30,6 +31,9 @@ module EventStoreClient
|
|
30
31
|
h.delete('encryption')
|
31
32
|
end
|
32
33
|
|
34
|
+
event_id = event.id
|
35
|
+
event_id = SecureRandom.uuid if event.id.nil? || event.id.empty?
|
36
|
+
|
33
37
|
payload = [
|
34
38
|
request.new(
|
35
39
|
options: {
|
@@ -42,7 +46,7 @@ module EventStoreClient
|
|
42
46
|
request.new(
|
43
47
|
proposed_message: {
|
44
48
|
id: {
|
45
|
-
string:
|
49
|
+
string: event_id
|
46
50
|
},
|
47
51
|
data: event.title,
|
48
52
|
custom_metadata: custom_metadata,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: event_store_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Wilgosz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|