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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/messaging/handle.rb +13 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b0d5f98904ea46c1f7221613dd4db62a9fa0e2c
4
- data.tar.gz: 466901662a67c95c44773a4e1891201f83fc95c4
3
+ metadata.gz: dc94ebd4cea7e5ac4123d808bb4f637dbeca32ea
4
+ data.tar.gz: 3de242f7b7f8218c3e150cd5dd7899ed2d090d24
5
5
  SHA512:
6
- metadata.gz: 6df6af409be9f749d4cbdd4e121bdaf7905699ded2429280bf32d933af62921addc10d4e07d17aa8b0e4745887529e4fbc022ad0eae9d61621e8e11651bf8090
7
- data.tar.gz: 36a43c8dda0e5a3ae177b822bd205e4dd215f592c850fa3c34960c72a95e0dab3c183746278d91324d4600b8c32f363b5cc2c2c5c569f003451d95c8f163b5e9
6
+ metadata.gz: fd2fbe642834694af08dee1b78989d520a5da52be925e3c331904a787db031def25fa3fc1610b00333f1ced3b3757bf625ed85f0ef61077f52b08682a90dda14
7
+ data.tar.gz: 8e76d0d70d22ddad828d0693558b9fe339a6ec34a69350ba0f409d7fabca8bd579d1b75485d56a1d32e688d7fdc3999ec03cdc578bf9a4ccdb9cf953e79faa3a
@@ -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 call(message_or_message_data)
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.0.0
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-10-19 00:00:00.000000000 Z
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