evt-messaging 0.22.0.0 → 0.22.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/messaging/handle.rb +13 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc94ebd4cea7e5ac4123d808bb4f637dbeca32ea
|
4
|
+
data.tar.gz: 3de242f7b7f8218c3e150cd5dd7899ed2d090d24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd2fbe642834694af08dee1b78989d520a5da52be925e3c331904a787db031def25fa3fc1610b00333f1ced3b3757bf625ed85f0ef61077f52b08682a90dda14
|
7
|
+
data.tar.gz: 8e76d0d70d22ddad828d0693558b9fe339a6ec34a69350ba0f409d7fabca8bd579d1b75485d56a1d32e688d7fdc3999ec03cdc578bf9a4ccdb9cf953e79faa3a
|
data/lib/messaging/handle.rb
CHANGED
@@ -18,10 +18,6 @@ module Messaging
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def strict
|
22
|
-
@strict ||= false
|
23
|
-
end
|
24
|
-
|
25
21
|
module Build
|
26
22
|
def build(strict: nil)
|
27
23
|
instance = new
|
@@ -111,15 +107,21 @@ module Messaging
|
|
111
107
|
end
|
112
108
|
end
|
113
109
|
|
114
|
-
def
|
110
|
+
def strict
|
111
|
+
@strict ||= false
|
112
|
+
end
|
113
|
+
|
114
|
+
def call(message_or_message_data, strict: nil)
|
115
115
|
if message_or_message_data.is_a? Message
|
116
|
-
handle_message(message_or_message_data)
|
116
|
+
handle_message(message_or_message_data, strict: strict)
|
117
117
|
else
|
118
|
-
handle_message_data(message_or_message_data)
|
118
|
+
handle_message_data(message_or_message_data, strict: strict)
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
-
def handle_message(message)
|
122
|
+
def handle_message(message, strict: nil)
|
123
|
+
strict ||= self.strict
|
124
|
+
|
123
125
|
handler_logger.trace(tags: [:handle, :message]) { "Handling message (Message class: #{message.class.name})" }
|
124
126
|
handler_logger.trace(tags: [:data, :message, :handle]) { message.pretty_inspect }
|
125
127
|
|
@@ -144,7 +146,9 @@ module Messaging
|
|
144
146
|
message
|
145
147
|
end
|
146
148
|
|
147
|
-
def handle_message_data(message_data)
|
149
|
+
def handle_message_data(message_data, strict: nil)
|
150
|
+
strict ||= self.strict
|
151
|
+
|
148
152
|
handler_logger.trace(tags: [:handle, :message_data]) { "Handling message data (Type: #{message_data.type})" }
|
149
153
|
handler_logger.trace(tags: [:data, :message_data, :handle]) { message_data.pretty_inspect }
|
150
154
|
|
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.22.
|
4
|
+
version: 0.22.1.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-
|
11
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-message_store
|