event_store_client 1.0.8 → 1.0.13
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: 57143fadf4edbe242994d58b20ee1906472888433d59a61b22119f748d4fd94f
|
4
|
+
data.tar.gz: 43761489120aa019bb542f090a32926594c37229e46d7d5add8ac8db64819604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84672b1909682062f70885ada88894ec259e554fad518be53b17460ac118a748f02f30f3ea9c5c4dab36969cd2309f009b3f367b480dcb800852af5f58c4aeec
|
7
|
+
data.tar.gz: c6f2bc12b9aa55a84d4788c50c76f470ec1504ccef4a1721a5862f4978ffd0c0820df05a3fbe878d6abb1c5085153a7c01b5fb4eddbfafde3d0c823485904c16
|
data/lib/event_store_client.rb
CHANGED
@@ -4,13 +4,14 @@ module EventStoreClient
|
|
4
4
|
end
|
5
5
|
|
6
6
|
require 'event_store_client/types'
|
7
|
-
|
8
|
-
require 'event_store_client/deserialized_event'
|
7
|
+
|
9
8
|
require 'event_store_client/serializer/json'
|
10
9
|
|
11
10
|
require 'event_store_client/mapper'
|
12
11
|
|
13
12
|
require 'event_store_client/configuration'
|
13
|
+
require 'event_store_client/event'
|
14
|
+
require 'event_store_client/deserialized_event'
|
14
15
|
|
15
16
|
require 'event_store_client/subscription'
|
16
17
|
require 'event_store_client/subscriptions'
|
@@ -4,8 +4,6 @@ require 'dry/schema'
|
|
4
4
|
|
5
5
|
module EventStoreClient
|
6
6
|
class DeserializedEvent
|
7
|
-
InvalidDataError = Class.new(StandardError)
|
8
|
-
|
9
7
|
attr_reader :id
|
10
8
|
attr_reader :type
|
11
9
|
attr_reader :title
|
@@ -19,13 +17,12 @@ module EventStoreClient
|
|
19
17
|
|
20
18
|
def initialize(**args)
|
21
19
|
validation = schema.call(args[:data] || {})
|
22
|
-
raise InvalidDataError.new(message: validation.errors.to_h) if validation.errors.any?
|
23
|
-
|
24
20
|
@data = args.fetch(:data) { {} }
|
25
21
|
@metadata = args.fetch(:metadata) { {} }.merge(
|
26
22
|
'type' => self.class.name,
|
27
23
|
'content-type' => content_type
|
28
24
|
)
|
25
|
+
@metadata.merge!('validation-errors' => validation.errors.to_h) if validation.errors.any?
|
29
26
|
@type = args[:type] || self.class.name
|
30
27
|
@title = args[:title]
|
31
28
|
@id = args[:id]
|
@@ -13,7 +13,8 @@ module EventStoreClient
|
|
13
13
|
else
|
14
14
|
subscriber.class.name
|
15
15
|
end
|
16
|
-
@name =
|
16
|
+
@name = subscriber_class.to_s
|
17
|
+
@name = "#{service}-" + @name if service != ''
|
17
18
|
@subscriber = subscriber
|
18
19
|
@stream = name
|
19
20
|
@observed_streams = event_types.reduce([]) { |r, type| r << "$et-#{type}" }
|
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.13
|
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-
|
11
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
244
|
- !ruby/object:Gem::Version
|
245
245
|
version: '0'
|
246
246
|
requirements: []
|
247
|
-
rubygems_version: 3.
|
247
|
+
rubygems_version: 3.0.6
|
248
248
|
signing_key:
|
249
249
|
specification_version: 4
|
250
250
|
summary: Ruby integration for https://eventstore.org
|