evt-messaging 0.27.0.0 → 0.27.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/messaging/controls/batch.rb +12 -10
- data/lib/messaging/message.rb +2 -2
- data/lib/messaging/message/follow.rb +10 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39e176b0a5de6be455c616bba20e266bb03a78d4ac8775a0f0de0f1a2e07dec4
|
4
|
+
data.tar.gz: 64f9398f34b59334eea342314ef76085d179238bbf6fde835de21a4b6158ea0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17453355b43f8266f0f16cd75848bcd829a7d704733e9a6cadd9246d8796722d228edd3438c59481ad29c8d32a560bda9cfce602d5c5613092674d6adf7fa018
|
7
|
+
data.tar.gz: ec69b2c621f2c296da15a91428f705017964716f8bfdf205eaf4617463a03a60bf063d8c745d37921794e870284aaec629e702614e790b1bb3fbb628905c70eb
|
@@ -2,12 +2,6 @@ module Messaging
|
|
2
2
|
module Controls
|
3
3
|
module Batch
|
4
4
|
def self.example(id: nil)
|
5
|
-
if id == :none
|
6
|
-
id = nil
|
7
|
-
else
|
8
|
-
id ||= self.id
|
9
|
-
end
|
10
|
-
|
11
5
|
values = [
|
12
6
|
MessageStore::Controls::RandomValue.example,
|
13
7
|
MessageStore::Controls::RandomValue.example
|
@@ -28,10 +22,18 @@ module Messaging
|
|
28
22
|
|
29
23
|
module Messages
|
30
24
|
def self.example(id: nil)
|
31
|
-
[
|
32
|
-
|
33
|
-
|
34
|
-
|
25
|
+
batch = []
|
26
|
+
|
27
|
+
2.times do
|
28
|
+
message_id = nil
|
29
|
+
if id != :none
|
30
|
+
message_id = Batch.id
|
31
|
+
end
|
32
|
+
|
33
|
+
batch << Controls::Message.example.tap { |m| m.id = message_id }
|
34
|
+
end
|
35
|
+
|
36
|
+
batch
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|
data/lib/messaging/message.rb
CHANGED
@@ -40,7 +40,7 @@ module Messaging
|
|
40
40
|
extend self
|
41
41
|
|
42
42
|
def message_type(msg=self)
|
43
|
-
class_name(msg).split('::').last
|
43
|
+
Info.class_name(msg).split('::').last
|
44
44
|
end
|
45
45
|
|
46
46
|
def message_type?(type)
|
@@ -55,7 +55,7 @@ module Messaging
|
|
55
55
|
name.gsub(/([^\^])([A-Z])/,'\1_\2').downcase
|
56
56
|
end
|
57
57
|
|
58
|
-
def class_name(message)
|
58
|
+
def self.class_name(message)
|
59
59
|
class_name = nil
|
60
60
|
class_name = message if message.instance_of? String
|
61
61
|
class_name ||= message.name if message.instance_of? Class
|
@@ -3,24 +3,24 @@ module Messaging
|
|
3
3
|
module Follow
|
4
4
|
extend self
|
5
5
|
|
6
|
-
def self.call(
|
7
|
-
follow(
|
6
|
+
def self.call(preceding_message, subsequent_message=nil, copy: nil, include: nil, exclude: nil, strict: nil)
|
7
|
+
follow(preceding_message, subsequent_message, copy: copy, include: include, exclude: exclude, strict: strict)
|
8
8
|
end
|
9
9
|
|
10
|
-
def follow(
|
11
|
-
if
|
12
|
-
|
10
|
+
def follow(preceding_message, subsequent_message=nil, copy: nil, include: nil, exclude: nil, strict: nil)
|
11
|
+
if subsequent_message.nil?
|
12
|
+
subsequent_message = self
|
13
13
|
end
|
14
14
|
|
15
|
-
if
|
16
|
-
|
15
|
+
if subsequent_message.class == Class
|
16
|
+
subsequent_message = subsequent_message.build
|
17
17
|
end
|
18
18
|
|
19
|
-
Copy.(
|
19
|
+
Copy.(preceding_message, subsequent_message, copy: copy, include: include, exclude: exclude, strict: strict, metadata: false)
|
20
20
|
|
21
|
-
|
21
|
+
subsequent_message.metadata.follow(preceding_message.metadata)
|
22
22
|
|
23
|
-
|
23
|
+
subsequent_message
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
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.27.0.
|
4
|
+
version: 0.27.0.1
|
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: 2018-07-
|
11
|
+
date: 2018-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-message_store
|