evt-messaging 1.4.0.0 → 2.5.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/messaging/stream_name.rb +32 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4e0aa73d808a4999c6cdac274d1e598f428e839d6e43dfc162e6e29d0460dc3
4
- data.tar.gz: 8ae2506bf2c46e4c9fa266fbee2207eea81b6812f5cd6b4ec99b9b4e0fe514e5
3
+ metadata.gz: dfa84e5e49bc05354a719fbef76a8f88c314ab7ad21865ec808f152b13306299
4
+ data.tar.gz: 6c8235883fbbb8da61a89444ea6526110dca1d5efbdb3c1cca34cd638b96bf0d
5
5
  SHA512:
6
- metadata.gz: 62321d4c0015f5216d980bfc23e0508a899e136e0f98e6cd75a16051cf0f740d3ad0447b40b70d901e565dc91aa344c6d7f5a006d1b3ddbe68e42f63f0e5a73a
7
- data.tar.gz: 621abd69a36e4e05fd9f68f97f3bb824ddf115beb05df917d477b337833768a88db7915628533fab5aa12451915e336c91cd0ce89d308ec32823865db30bd0bb
6
+ metadata.gz: dc15ac017bb788605373ee661243aef54790e10333c81cab3bf98a7df8a6c222d13dfa5a55cc4df42e87031b47ed6a5e5f8e3c457721b55a2ced8cffa364d950
7
+ data.tar.gz: 36469f93f6a716018d27a8527135414c6ac8042b66d9a2012636beeff12fb72c6f58caccda6bb8c59aad26234756557ba1f70aafa0ddbb72cd486424d7da25a4
@@ -13,13 +13,21 @@ module Messaging
13
13
  end
14
14
  end
15
15
 
16
- def stream_name(id, category=nil, type: nil, types: nil)
17
- if id == nil
16
+ def stream_name(stream_id=nil, stream_category=nil, category: nil, cardinal_id: nil, id: nil, ids: nil, type: nil, types: nil)
17
+ if stream_id.nil? && cardinal_id.nil? && id.nil? && ids.nil?
18
18
  raise Error, "ID must not be omitted from stream name"
19
19
  end
20
20
 
21
- category ||= self.category
22
- MessageStore::StreamName.stream_name(category, id, type: type, types: types)
21
+ stream_category ||= category
22
+ if stream_category.nil?
23
+ if not self.respond_to?(:category)
24
+ raise Error, "Category must not be omitted from stream name"
25
+ else
26
+ stream_category = self.category
27
+ end
28
+ end
29
+
30
+ MessageStore::StreamName.stream_name(stream_category, stream_id, cardinal_id: cardinal_id, id: id, ids: ids, type: type, types: types)
23
31
  end
24
32
 
25
33
  def category_stream_name(category=nil, type: nil, types: nil)
@@ -51,6 +59,14 @@ module Messaging
51
59
  MessageStore::StreamName.get_category(stream_name)
52
60
  end
53
61
 
62
+ def self.category?(stream_name)
63
+ MessageStore::StreamName.category?(stream_name)
64
+ end
65
+
66
+ def self.get_entity_name(stream_name)
67
+ MessageStore::StreamName.get_entity_name(stream_name)
68
+ end
69
+
54
70
  def self.get_id(stream_name)
55
71
  MessageStore::StreamName.get_id(stream_name)
56
72
  end
@@ -58,5 +74,17 @@ module Messaging
58
74
  def self.get_ids(stream_name)
59
75
  MessageStore::StreamName.get_ids(stream_name)
60
76
  end
77
+
78
+ def self.get_cardinal_id(stream_name)
79
+ MessageStore::StreamName.get_cardinal_id(stream_name)
80
+ end
81
+
82
+ def self.get_type(stream_name)
83
+ MessageStore::StreamName.get_type(stream_name)
84
+ end
85
+
86
+ def self.get_types(stream_name)
87
+ MessageStore::StreamName.get_types(stream_name)
88
+ end
61
89
  end
62
90
  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: 1.4.0.0
4
+ version: 2.5.0.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: 2019-11-03 00:00:00.000000000 Z
11
+ date: 2019-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-message_store