evt-messaging 0.26.1.0 → 0.27.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/messaging/stream_name.rb +13 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cc8e8cdd79457f3118280bd96f5eb2cba8ff8b1da7b2c9bd83d19c7054b90b5
4
- data.tar.gz: 9eb33f6ec45dfcd5670ec74d5743da6a486ac0cc90ef2a58ba53574f71f13521
3
+ metadata.gz: 344d6d52e8d3223be617c1487e01b1bfa9f171f7c5f64104efa1d8110240bfe4
4
+ data.tar.gz: 5359d64402758c9d326c486314759ca77ee4c4abb1d4ef6b394cea3e656c75d8
5
5
  SHA512:
6
- metadata.gz: e6af645b54573516c77d6c4be0dabfcf972a382212a01ac97be9e7e716efd60d16ffa0e98c81eb41659fbf00a0f93c4b16deb04941302e482f038e579fefe5de
7
- data.tar.gz: daac4085df1ba79c9bfff2a9b5a846ef8174373671456733af7d77caf953503daad532facdbf03b00ced480207305a81f623c52babc18f0537db9ee74734b035
6
+ metadata.gz: '0597f11c0368db82e63e42722368edd1ea7080d6f405b07b901ef0e3eca046f37df53ceb0a4f69b8a3c74628b31914f0ccc755539ca132682126af71733b7247'
7
+ data.tar.gz: 9aab92d83d615eb24d6d356cb4d72c23e0cd49b608e4c5fae74ba2074b910b500bff0072af77064c653b4811049c1ab4c6527dd48ed78eff2eb24fb0c551de34
@@ -2,13 +2,21 @@ module Messaging
2
2
  module StreamName
3
3
  extend self
4
4
 
5
+ Error = Class.new(RuntimeError)
6
+
5
7
  def self.included(cls)
6
8
  cls.class_exec do
7
9
  include Messaging::Category
10
+
11
+ virtual :category
8
12
  end
9
13
  end
10
14
 
11
15
  def stream_name(id, category=nil, type: nil, types: nil)
16
+ if id == nil
17
+ raise Error, "ID must not be omitted from stream name"
18
+ end
19
+
12
20
  category ||= self.category
13
21
  MessageStore::StreamName.stream_name(category, id, type: type, types: types)
14
22
  end
@@ -19,6 +27,10 @@ module Messaging
19
27
  end
20
28
 
21
29
  def command_stream_name(id, category=nil, type: nil, types: nil)
30
+ if id == nil
31
+ raise Error, "ID must not be omitted from command stream name"
32
+ end
33
+
22
34
  category ||= self.category
23
35
  types ||= []
24
36
  types.unshift('command')
@@ -39,7 +51,7 @@ module Messaging
39
51
  end
40
52
 
41
53
  def self.get_id(stream_name)
42
- MessageStore::StreamName.get_id stream_name
54
+ MessageStore::StreamName.get_id(stream_name)
43
55
  end
44
56
  end
45
57
  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.26.1.0
4
+ version: 0.27.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: 2018-06-30 00:00:00.000000000 Z
11
+ date: 2018-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-message_store