evt-messaging 0.23.0.0 → 0.24.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e481188f31963f0a01fa2679617682d861a0ac1a
4
- data.tar.gz: 2e2d93b78b30e811a0d4f99597311eef6ead93b3
3
+ metadata.gz: 6fcb49607e5f34c0418e3c3e5ad8ced24a07c155
4
+ data.tar.gz: 36ef09df38e14a9bdcc9e62fbf3df26a43342c21
5
5
  SHA512:
6
- metadata.gz: d993d1746c10ec0bc24d40d0b1c598b140e5358ee4e56b895a42fb3d2437d9175e6797da74e4822eae3b3c06014a21c6386e0bff2167a754852eccd7ec01ecdc
7
- data.tar.gz: 822484bdce6fbfa0722e387150717f5be68df47b7a137e6af16aeeb36b0dd502c6bae46525b91da86f055fc64c15f9d1727b787e7aabde8c1307365aaf01d44a
6
+ metadata.gz: 23e85481dc6ae7d540a6af7551410c106afc85a45bd64df1052554bffa9b9c2800ec1ff8925da67e0f9427f5cd9a633e1267b780ea0821545942294d90c59e2c
7
+ data.tar.gz: e8cefcbb60633459699e321abb5a55a17300647726e1b031f5d0fd96b773e42f04547a28102aa3789da40785bbd84fda9ff40dda9f971919085de231409cf401
@@ -8,8 +8,7 @@ require 'messaging/message'
8
8
  require 'messaging/message/metadata'
9
9
  require 'messaging/message/copy'
10
10
  require 'messaging/message/follow'
11
- require 'messaging/message/event/sequence_accessor'
12
- require 'messaging/message/command/sequence_accessor'
11
+ require 'messaging/message/sequence_accessor'
13
12
 
14
13
  require 'messaging/message/transformer'
15
14
  require 'messaging/message/import'
@@ -2,11 +2,7 @@ module Messaging
2
2
  module Message
3
3
  module SequenceAccessor
4
4
  def sequence
5
- metadata.causation_message_global_position
6
- end
7
-
8
- def sequence=(val)
9
- metadata.causation_message_global_position = val
5
+ metadata.global_position
10
6
  end
11
7
  end
12
8
  end
@@ -8,24 +8,30 @@ module Messaging
8
8
  end
9
9
  end
10
10
 
11
- def stream_name(id, category=nil, type: nil)
11
+ def stream_name(id, category=nil, type: nil, types: nil)
12
12
  category ||= self.category
13
- MessageStore::StreamName.stream_name(category, id, type: type)
13
+ MessageStore::StreamName.stream_name(category, id, type: type, types: types)
14
14
  end
15
15
 
16
- def category_stream_name(category=nil)
16
+ def category_stream_name(category=nil, type: nil, types: nil)
17
17
  category ||= self.category
18
- category
18
+ MessageStore::StreamName.stream_name(category, type: type, types: types)
19
19
  end
20
20
 
21
- def command_stream_name(id, category=nil)
21
+ def command_stream_name(id, category=nil, type: nil, types: nil)
22
22
  category ||= self.category
23
- MessageStore::StreamName.stream_name(category, id, type: 'command')
23
+ types ||= []
24
+ types.unshift('command')
25
+ types << type unless type == nil
26
+ MessageStore::StreamName.stream_name(category, id, types: types)
24
27
  end
25
28
 
26
- def command_category_stream_name(category=nil)
29
+ def command_category_stream_name(category=nil, type: nil, types: nil)
27
30
  category ||= self.category
28
- MessageStore::StreamName.stream_name(category, type: 'command')
31
+ types ||= []
32
+ types.unshift('command')
33
+ types << type unless type == nil
34
+ MessageStore::StreamName.stream_name(category, types: types)
29
35
  end
30
36
 
31
37
  def self.get_category(stream_name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0.0
4
+ version: 0.24.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
@@ -62,12 +62,9 @@ files:
62
62
  - lib/messaging/handle/defaults.rb
63
63
  - lib/messaging/log.rb
64
64
  - lib/messaging/message.rb
65
- - lib/messaging/message/command/sequence_accessor.rb
66
65
  - lib/messaging/message/copy.rb
67
- - lib/messaging/message/event/sequence_accessor.rb
68
66
  - lib/messaging/message/export.rb
69
67
  - lib/messaging/message/follow.rb
70
- - lib/messaging/message/global_position_accessor.rb
71
68
  - lib/messaging/message/import.rb
72
69
  - lib/messaging/message/metadata.rb
73
70
  - lib/messaging/message/sequence_accessor.rb
@@ -1,11 +0,0 @@
1
- module Messaging
2
- module Message
3
- module Command
4
- module SequenceAccessor
5
- def sequence
6
- metadata.global_position
7
- end
8
- end
9
- end
10
- end
11
- end
@@ -1,15 +0,0 @@
1
- module Messaging
2
- module Message
3
- module Event
4
- module SequenceAccessor
5
- def sequence
6
- metadata.causation_message_global_position
7
- end
8
-
9
- def sequence=(val)
10
- metadata.causation_message_global_position = val
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,14 +0,0 @@
1
- module Messaging
2
- module Message
3
-
4
- module GlobalAccessor
5
- def sequence
6
- metadata.causation_message_global_position
7
- end
8
-
9
- def sequence=(val)
10
- metadata.causation_message_global_position = val
11
- end
12
- end
13
- end
14
- end