evt-messaging 2.5.1.1 → 2.5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bc5ad08d7cd5f55d19c1b407f80cd3448a6d877a22afd0f81b0261c25f2396c
4
- data.tar.gz: ba24610fc9a6e02666f4d5094ffb4bb13ab9c084f7fccc34f237fb9dc520cb4d
3
+ metadata.gz: 0b88d9fc2f126343b5373d93c22046df73c920bdfba1921e1c606ee2929d8240
4
+ data.tar.gz: 46ca26755b68db2c9c4eb9427e530bfc6579857ef93a298912e4774ada3521af
5
5
  SHA512:
6
- metadata.gz: 6a60193d1bd2f2bc8acb856b80dc76bf3bfb46ddb1a4d6810565b8725a1af6791e5197aaf94b1c89bc747af60b835c441e9a232d89acd97fe387d6cdc1e09352
7
- data.tar.gz: ada89ba5b187b8762be1c5b2da07040d40e8cb3f96d61d019020c0d8e2dc2755387de5040fb46f5ad45544a149fb3fdba99a7aabde039582b63f76ac11001c07
6
+ metadata.gz: c753037cf3097102bbc9a7fe3a52eaa95a7cc63213caeaa8e23d7580f3a8ea616e6161e073f726289c8ee0be84a4b592719584b62b840c3fb01e956f5be63d30
7
+ data.tar.gz: 15f5370691d0868a5730de4683fbc1a1993673d0ff2a6ea49bf79f98dc104a2cb67ce5cf3df2177566b8dfde8718931d86800c68815667e6cd7b368c3e65449f
@@ -13,6 +13,10 @@ module Messaging
13
13
  1
14
14
  end
15
15
 
16
+ def self.global_position
17
+ 222
18
+ end
19
+
16
20
  def self.causation_message_stream_name
17
21
  "someCausation"
18
22
  end
@@ -22,7 +26,7 @@ module Messaging
22
26
  end
23
27
 
24
28
  def self.causation_message_global_position
25
- 222
29
+ 111
26
30
  end
27
31
 
28
32
  def self.correlation_stream_name
@@ -45,10 +49,6 @@ module Messaging
45
49
  "#{causation_message_stream_name}/#{causation_message_position}"
46
50
  end
47
51
 
48
- def self.global_position
49
- 111
50
- end
51
-
52
52
  def self.time
53
53
  Time::Raw.example
54
54
  end
@@ -59,11 +59,36 @@ module Messaging
59
59
  self.reply_stream_name = preceding_metadata.reply_stream_name
60
60
  end
61
61
 
62
- def follows?(metadata)
63
- causation_message_stream_name == metadata.stream_name &&
64
- causation_message_position == metadata.position &&
65
- causation_message_global_position == metadata.global_position &&
66
- reply_stream_name == metadata.reply_stream_name
62
+ def follows?(preceding_metadata)
63
+ if causation_message_stream_name.nil? && preceding_metadata.stream_name.nil?
64
+ return false
65
+ end
66
+
67
+ if causation_message_position.nil? && preceding_metadata.position.nil?
68
+ return false
69
+ end
70
+
71
+ if causation_message_global_position.nil? && preceding_metadata.global_position.nil?
72
+ return false
73
+ end
74
+
75
+ if causation_message_stream_name != preceding_metadata.stream_name
76
+ return false
77
+ end
78
+
79
+ if causation_message_position != preceding_metadata.position
80
+ return false
81
+ end
82
+
83
+ if causation_message_global_position != preceding_metadata.global_position
84
+ return false
85
+ end
86
+
87
+ if reply_stream_name != preceding_metadata.reply_stream_name
88
+ return false
89
+ end
90
+
91
+ true
67
92
  end
68
93
 
69
94
  def clear_reply_stream_name
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: 2.5.1.1
4
+ version: 2.5.1.2
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: 2020-07-20 00:00:00.000000000 Z
11
+ date: 2020-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-message_store