evt-messaging 1.3.0.1 → 1.3.0.2

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: d18c9bde07214e548a517c53bd0e87f3c4d9dd768122689b8aa21de4259bb43e
4
- data.tar.gz: 923c3521029cfe1175a11260e14961c1c51fe18694b3831966a7d9f71901f76b
3
+ metadata.gz: 80c24abab4abf92b3691f6f22808b5ac99228fe48fbb9e0fa0d08073b20b6399
4
+ data.tar.gz: 85286cb661367189f68da8a3c3d571046ebe66d1b947a0c80be045470c3ba9eb
5
5
  SHA512:
6
- metadata.gz: bcb976cab9d419a33d20636e977182db4a8ede22785ad497edb4919e3a4d55ade87ddd4256d023db228a22c9bae3b75015ecfd892d25471b6636d54e903f4d17
7
- data.tar.gz: 6dd869574d15ef3c2edf740aa180246b541b9f9cb27acd1de415fc8fc3536d593d2d41e6d122a74db6c430a03b352c97894fc429c876794eebab20e3ccb81aa2
6
+ metadata.gz: c21c1d58834e10fd0c87f6d9d6e4f2ba0c41ec0a3b7de39cfd06b9720a42a64bf15e873e55bfedfcebcf3bd7f47bd36d11f6519d4c19c305da5f08c5ee216983
7
+ data.tar.gz: 9591cbc9c30c9d1e9428e8e45fbe56cd03bc1142cfd179721eaa5f143e67d8a8b27bc566f15acca1d6d41acb636cdb60256556fe8c923d9d6e92140e11e93229
@@ -8,11 +8,11 @@ module Messaging
8
8
  end
9
9
  end
10
10
 
11
+ Error = Class.new(RuntimeError)
12
+
11
13
  class Write
12
14
  include Messaging::Write
13
15
 
14
- Error = Class.new(RuntimeError)
15
-
16
16
  attr_accessor :sink
17
17
 
18
18
  def raise_expected_version_error
@@ -66,11 +66,16 @@ module Messaging
66
66
  return false
67
67
  end
68
68
 
69
+ # Is written and no inspection block is provided,
70
+ # therefore no subsequent inspection beyond the
71
+ # message being found in the telemetry
72
+ # Is written
69
73
  if blk.nil?
70
74
  return true
71
75
  end
72
76
 
73
- return sink.recorded_written? do |record|
77
+ # Otherwise, proceed to subsequent inspecting using the block
78
+ sink.recorded_written? do |record|
74
79
  blk.call(record.data.stream_name, record.data.expected_version, record.data.reply_stream_name)
75
80
  end
76
81
  end
@@ -85,7 +90,6 @@ module Messaging
85
90
  end
86
91
  end
87
92
 
88
- ## TODO need to make same changes as made to written?
89
93
  def replied?(message=nil, &blk)
90
94
  if message.nil?
91
95
  if blk.nil?
@@ -105,10 +109,15 @@ module Messaging
105
109
  return false
106
110
  end
107
111
 
112
+ # Is written and no inspection block is provided,
113
+ # therefore no subsequent inspection beyond the
114
+ # message being found in the telemetry
115
+ # Is written
108
116
  if blk.nil?
109
117
  return true
110
118
  end
111
119
 
120
+ # Otherwise, proceed to subsequent inspecting using the block
112
121
  sink.recorded_replied? do |record|
113
122
  blk.call(record.data.stream_name)
114
123
  end
@@ -128,7 +137,7 @@ module Messaging
128
137
  messages = message_writes(&blk)
129
138
 
130
139
  if messages.length > 1
131
- raise Error, "More than one matching message was written"
140
+ raise Substitute::Error, "More than one matching message was written"
132
141
  end
133
142
 
134
143
  messages.first
@@ -149,7 +158,7 @@ module Messaging
149
158
  messages = message_replies(&blk)
150
159
 
151
160
  if messages.length > 1
152
- raise Error, "More than one matching message reply was written"
161
+ raise Substitute::Error, "More than one matching message reply was written"
153
162
  end
154
163
 
155
164
  messages.first
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: 1.3.0.1
4
+ version: 1.3.0.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: 2019-05-23 00:00:00.000000000 Z
11
+ date: 2019-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-message_store