evt-message_store 1.0.0.2 → 1.0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/message_store/stream_name.rb +23 -8
- 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: 29fa88f21af344f708f838bd36c7f8c3ab2964e25a7553034147992020e6b55f
|
4
|
+
data.tar.gz: 5cae9e9e425eda3dcd9ad06260bdca06b493c25cd81fb1b989ec7db4a3153c34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9244d42510b000fbc56af9334639bbc804403a56b919cf7c34bdd000622ee2e58129f03f2c7a7d40f47ddfb017f4583e5abafbc072f0491a04e9674217ae30d
|
7
|
+
data.tar.gz: 60f37eebeaf18ea08c0fb2bf1e25c2d47b8b4d064d0e4dec196c746c78881e3252b042e04a9a63e2bd146018a282180cbac1dee0a07ece0707ccaa04a4df698c
|
@@ -20,25 +20,40 @@ module MessageStore
|
|
20
20
|
stream_name
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.stream_delimiter
|
24
|
+
'-'
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.category_delimiter
|
28
|
+
':'
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.type_delimiter
|
32
|
+
'+'
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.split(stream_name)
|
36
|
+
stream_name.split(stream_delimiter, 2)
|
37
|
+
end
|
38
|
+
|
23
39
|
def self.get_id(stream_name)
|
24
|
-
|
25
|
-
id.empty? ? nil : id
|
40
|
+
split(stream_name)[1]
|
26
41
|
end
|
27
42
|
|
28
43
|
def self.get_category(stream_name)
|
29
|
-
|
44
|
+
split(stream_name)[0]
|
30
45
|
end
|
31
46
|
|
32
47
|
def self.category?(stream_name)
|
33
|
-
!stream_name.include?(
|
48
|
+
!stream_name.include?(stream_delimiter)
|
34
49
|
end
|
35
50
|
|
36
51
|
def self.get_type_list(stream_name)
|
37
|
-
return nil
|
52
|
+
return nil unless stream_name.include?(category_delimiter)
|
38
53
|
|
39
54
|
category = get_category(stream_name)
|
40
55
|
|
41
|
-
category.split(
|
56
|
+
category.split(category_delimiter)[1]
|
42
57
|
end
|
43
58
|
|
44
59
|
def self.get_types(stream_name)
|
@@ -46,11 +61,11 @@ module MessageStore
|
|
46
61
|
|
47
62
|
return [] if type_list.nil?
|
48
63
|
|
49
|
-
type_list.split(
|
64
|
+
type_list.split(type_delimiter)
|
50
65
|
end
|
51
66
|
|
52
67
|
def self.get_entity_name(stream_name)
|
53
|
-
get_category(stream_name).split(
|
68
|
+
get_category(stream_name).split(category_delimiter)[0]
|
54
69
|
end
|
55
70
|
end
|
56
71
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-message_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.1.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: 2018-
|
11
|
+
date: 2018-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-casing
|