evt-messaging 0.7.1.2 → 0.7.2.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b5f215ee70f13d31e0cd89748506ee5fa296fff
|
4
|
+
data.tar.gz: 9a65f4ef8c195dd86da18418f49a3d2db6b740a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8a8c440f026ae4edb5229e307c98b91f07f0760c049ae390b71ae6aa0ca0d1d2271f1f94a7a624a3421bb13d93308f2cedd3c4341e0719b3081cb2be84ae518
|
7
|
+
data.tar.gz: 91e082480082bad761f9ec16dab83478e06f6e4ff287669e64a36cd8a60a536b80e9615ce031ab6b61b77103aced4996869efd3ff271a204b3619037c8c7eb02
|
data/lib/messaging/controls.rb
CHANGED
@@ -6,6 +6,7 @@ module Messaging
|
|
6
6
|
metadata ||= Controls::Metadata.example
|
7
7
|
|
8
8
|
message = SomeMessage.new
|
9
|
+
message.id = id
|
9
10
|
message.some_attribute = some_attribute
|
10
11
|
message.other_attribute = other_attribute
|
11
12
|
|
@@ -44,6 +45,10 @@ module Messaging
|
|
44
45
|
SomeMessage
|
45
46
|
end
|
46
47
|
|
48
|
+
def self.id
|
49
|
+
ID::Random.example
|
50
|
+
end
|
51
|
+
|
47
52
|
def self.type
|
48
53
|
'SomeMessage'
|
49
54
|
end
|
data/lib/messaging/message.rb
CHANGED
@@ -5,6 +5,7 @@ module Messaging
|
|
5
5
|
include Schema::DataStructure
|
6
6
|
end
|
7
7
|
|
8
|
+
## TODO put this in the included block, and remove the cls.
|
8
9
|
cls.extend Info
|
9
10
|
cls.extend Build
|
10
11
|
cls.extend Copy
|
@@ -12,6 +13,8 @@ module Messaging
|
|
12
13
|
cls.extend Transformer
|
13
14
|
end
|
14
15
|
|
16
|
+
attr_accessor :id
|
17
|
+
|
15
18
|
attr_writer :metadata
|
16
19
|
def metadata
|
17
20
|
@metadata ||= Metadata.new
|
@@ -10,13 +10,16 @@ module Messaging
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.instance(event_data_data, cls)
|
13
|
-
cls.build(event_data_data[:data], event_data_data[:metadata])
|
13
|
+
instance = cls.build(event_data_data[:data], event_data_data[:metadata])
|
14
|
+
instance.id = event_data_data[:id]
|
15
|
+
instance
|
14
16
|
end
|
15
17
|
|
16
18
|
module EventData
|
17
19
|
def self.write(message)
|
18
20
|
event_data = EventSource::EventData::Write.build
|
19
21
|
|
22
|
+
event_data.id = message.id
|
20
23
|
event_data.type = message.message_type
|
21
24
|
|
22
25
|
event_data.data = message.to_h
|
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.7.
|
4
|
+
version: 0.7.2.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:
|
11
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-event_source
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- lib/messaging/controls/batch.rb
|
51
51
|
- lib/messaging/controls/event_data.rb
|
52
52
|
- lib/messaging/controls/handler.rb
|
53
|
+
- lib/messaging/controls/id.rb
|
53
54
|
- lib/messaging/controls/message.rb
|
54
55
|
- lib/messaging/controls/metadata.rb
|
55
56
|
- lib/messaging/controls/stream.rb
|