evt-messaging 0.13.0.0 → 0.14.0.0

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
  SHA1:
3
- metadata.gz: 85781df0c6b7d11866a42818b0df6b9dbd53521e
4
- data.tar.gz: 7ea9f550139a573aad2781c199d26cef2643819a
3
+ metadata.gz: 6e244d53eb5fcdea40e6446ec08948e18cc9c2d7
4
+ data.tar.gz: 05f1b977833797561c7beb3ac86105ec490f4c21
5
5
  SHA512:
6
- metadata.gz: 84ba1d3f360b3686f9505c53c0d9b9176c3fae316accc30a80cb1f7c6b1a1b17181c31e12e8f4c9bceb336808dbae198d2de9aae723c4898de854cb1bc894339
7
- data.tar.gz: edc8414ad4a8b6415914a9ea2476ac5755fd2075483f4b6a8a13dc761b2d557c741d93ae6e10df520c37d6caca0fbd4ad664b1944b6df4eca8fcd7e8cb9a301e
6
+ metadata.gz: a9bc47b9ff845c80f14896772f7f1cddf96135847031bcc103cf9d7f68e49c4b082456f2fd1fb08382c2c241797b344b8ba785496a56f0c0714655e8598757e6
7
+ data.tar.gz: eb9605ae1db4aadb406165ed8a11328d27c8c3f08b8a11899246b3b1036704fb1ebe9b94aa49266aeccb1bb5c66e979fb765cd780de1c9db18675a1241f93f44
@@ -12,7 +12,7 @@ module Messaging
12
12
  extend Transformer
13
13
 
14
14
  attribute :id, String
15
- attribute :metadata, Metadata, default: Metadata.new
15
+ attribute :metadata, Metadata, default: -> { Metadata.new }
16
16
 
17
17
  def self.transient_attributes
18
18
  [
@@ -1,8 +1,6 @@
1
1
  module Messaging
2
2
  module Message
3
3
  module Follow
4
- class Error < RuntimeError; end
5
-
6
4
  extend self
7
5
 
8
6
  def self.call(source, receiver=nil, copy: nil, include: nil, exclude: nil, strict: nil)
@@ -18,15 +16,7 @@ module Messaging
18
16
  receiver = receiver.build
19
17
  end
20
18
 
21
- unchanged_source_event_stream_name = receiver.metadata.source_event_stream_name
22
- unchanged_source_event_position = receiver.metadata.source_event_position
23
- unchanged_schema_version = receiver.metadata.schema_version
24
-
25
- Copy.(source, receiver, copy: copy, include: include, exclude: exclude, strict: strict, metadata: true)
26
-
27
- receiver.metadata.source_event_stream_name = unchanged_source_event_stream_name
28
- receiver.metadata.source_event_position = unchanged_source_event_position
29
- receiver.metadata.schema_version = unchanged_schema_version
19
+ Copy.(source, receiver, copy: copy, include: include, exclude: exclude, strict: strict, metadata: false)
30
20
 
31
21
  receiver.metadata.follow(source.metadata)
32
22
 
@@ -38,9 +38,9 @@ module Messaging
38
38
  self.causation_event_stream_name = other_metadata.source_event_stream_name
39
39
  self.causation_event_position = other_metadata.source_event_position
40
40
 
41
- unless follows?(other_metadata)
42
- raise Error, "Metadata doesn't have precedence (Metadata: #{self.inspect}, Other Metadata #{other_metadata.inspect})"
43
- end
41
+ self.correlation_stream_name = other_metadata.correlation_stream_name
42
+
43
+ self.reply_stream_name = other_metadata.reply_stream_name
44
44
  end
45
45
 
46
46
  def follows?(other_metadata)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0.0
4
+ version: 0.14.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: 2017-04-21 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-event_source