evt-message_store 0.4.0.0 → 0.5.0.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
  SHA256:
3
- metadata.gz: 0f42501b945a4c0adfb09d685bdf94de97f9a7d15a9031b2a537358a583fd382
4
- data.tar.gz: 7a24e2b907b2120c3c60d841f6d6ad270d55137b23aa370f8851b61e6cf47d2c
3
+ metadata.gz: cfd1183110eee536c2d7aff8c2acbb039438cded104bed3e12d93723d2b855fb
4
+ data.tar.gz: 8b075b0c325a637fc457d9bf65a7f11648c1044cda4425eb1402e5c72a2c8b62
5
5
  SHA512:
6
- metadata.gz: 7ab2bde0b1153b3d818c910d7e3cbdbf61946f87027d1f1928def266333bc0e5a4f5a71cb24082cabc2f798e4a00de2ee3f65d8649476d200952f5373dd8ade7
7
- data.tar.gz: 364b0608b78e73a364fbaea56d24095d1e1e2ac6b1eac88e3f827303356d65f86571112601fb8a4b1cc20cc2c652afcbca2c1e7bb4ad56ebe4e95ad9f7f156fa
6
+ metadata.gz: 754a1fd9d4df96789446c07c7ce61d6d36bd6b778383203a6e73d5985276269f3e7e6ad0aa14d9131bcbcdec3bf4f9419585c341e596c09db49bb95568e5916e
7
+ data.tar.gz: f885dd05c07551d0cf7931f879c35bad6f8c7e8f2d5244855187512ceba9ddb8bfa5ba82feecc03f574ec15e5508e3de2667d9c5244b3ec1822880cf38f62f54
@@ -2,20 +2,25 @@ module MessageStore
2
2
  module Controls
3
3
  module StreamName
4
4
  def self.example(category: nil, id: nil, type: nil, types: nil, randomize_category: nil)
5
- category ||= Category.example(category: category, randomize_category: randomize_category)
6
- id ||= Identifier::UUID.random
5
+ if id == :none
6
+ id = nil
7
+ else
8
+ id ||= Identifier::UUID.random
9
+ end
10
+
11
+ category = Category.example(category: category, randomize_category: randomize_category)
7
12
 
8
13
  stream_name(category, id, type: type, types: types)
9
14
  end
10
15
 
11
- def self.stream_name(category_name, id=nil, type: nil, types: nil)
16
+ def self.stream_name(category, id=nil, type: nil, types: nil)
12
17
  types = Array(types)
13
18
  types.unshift(type) unless type.nil?
14
19
 
15
20
  type_list = nil
16
21
  type_list = types.join('+') unless types.empty?
17
22
 
18
- stream_name = category_name
23
+ stream_name = category
19
24
  stream_name = "#{stream_name}:#{type_list}" unless type_list.nil?
20
25
  stream_name = "#{stream_name}-#{id}" unless id.nil?
21
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-message_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.0
4
+ version: 0.5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project