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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 344d6d52e8d3223be617c1487e01b1bfa9f171f7c5f64104efa1d8110240bfe4
4
- data.tar.gz: 5359d64402758c9d326c486314759ca77ee4c4abb1d4ef6b394cea3e656c75d8
3
+ metadata.gz: 39e176b0a5de6be455c616bba20e266bb03a78d4ac8775a0f0de0f1a2e07dec4
4
+ data.tar.gz: 64f9398f34b59334eea342314ef76085d179238bbf6fde835de21a4b6158ea0d
5
5
  SHA512:
6
- metadata.gz: '0597f11c0368db82e63e42722368edd1ea7080d6f405b07b901ef0e3eca046f37df53ceb0a4f69b8a3c74628b31914f0ccc755539ca132682126af71733b7247'
7
- data.tar.gz: 9aab92d83d615eb24d6d356cb4d72c23e0cd49b608e4c5fae74ba2074b910b500bff0072af77064c653b4811049c1ab4c6527dd48ed78eff2eb24fb0c551de34
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
- Controls::Message.example.tap { |m| m.id = id },
33
- Controls::Message.example.tap { |m| m.id = id }
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
@@ -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(source, receiver=nil, copy: nil, include: nil, exclude: nil, strict: nil)
7
- follow(source, receiver, copy: copy, include: include, exclude: exclude, strict: strict)
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(source, receiver=nil, copy: nil, include: nil, exclude: nil, strict: nil)
11
- if receiver.nil?
12
- receiver = self
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 receiver.class == Class
16
- receiver = receiver.build
15
+ if subsequent_message.class == Class
16
+ subsequent_message = subsequent_message.build
17
17
  end
18
18
 
19
- Copy.(source, receiver, copy: copy, include: include, exclude: exclude, strict: strict, metadata: false)
19
+ Copy.(preceding_message, subsequent_message, copy: copy, include: include, exclude: exclude, strict: strict, metadata: false)
20
20
 
21
- receiver.metadata.follow(source.metadata)
21
+ subsequent_message.metadata.follow(preceding_message.metadata)
22
22
 
23
- receiver
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.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-04 00:00:00.000000000 Z
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