evt-messaging-postgres 0.5.0.0 → 0.5.1.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
  SHA1:
3
- metadata.gz: 4340e1323b54a18b46d28c029d85af06bd07b68e
4
- data.tar.gz: 77e6ef449afb365cf7c0447fa73bcdf3c95bd190
3
+ metadata.gz: c365fc5ad60ea268d22d4399f53b98c70f1a3b91
4
+ data.tar.gz: 1d4f8de7a3832a9b4c0f303988c6319847d12ea4
5
5
  SHA512:
6
- metadata.gz: 4aa42d201afbf03b3099f2153c0828c2afd865cffb1c9e8bdf596596886bacbd41beb9bc4e269aae859faed96c1487ea622a1acce183b79d6c029e6ad71bbca0
7
- data.tar.gz: fcfb7a5faa1aae505bd450c6c0ea5cd1b018fba15b7d8b04380171e81b97909b41bba6ab1806e5f8d8b0eab09f5beebdf0a1059ffe868e414545ce28b52f5940
6
+ metadata.gz: 04d1b8869720cc4f81257cfc93469840042cfb375f8a087bda62d4949b6e5c52774ad4b4185fe263fc9db2e481d89fbf361e035562c7427448bbebf06a955a4c
7
+ data.tar.gz: 8c8a708ac84668fe8bcaabe9bcfe571fb7b99ab32f56b8df2d6d2071e9e02ae065ee7cf828b7ee90688cab91b63f4262cc675956be2ded100bb147d6661df0fe
@@ -2,4 +2,5 @@ require 'messaging'
2
2
  require 'event_source/postgres'
3
3
 
4
4
  require 'messaging/postgres/log'
5
+ require 'messaging/postgres/stream_name'
5
6
  require 'messaging/postgres/write'
@@ -2,6 +2,20 @@ module Messaging
2
2
  module Postgres
3
3
  module Controls
4
4
  StreamName = Messaging::Controls::StreamName
5
+
6
+ module StreamName
7
+ module Named
8
+ def self.example
9
+ Example.new
10
+ end
11
+
12
+ class Example
13
+ include Messaging::Postgres::StreamName
14
+
15
+ category :some_category
16
+ end
17
+ end
18
+ end
5
19
  end
6
20
  end
7
21
  end
@@ -0,0 +1,24 @@
1
+ module Messaging
2
+ module Postgres
3
+ module StreamName
4
+ def self.included(cls)
5
+ cls.class_exec do
6
+ include Messaging::StreamName
7
+ end
8
+ end
9
+
10
+ extend self
11
+ extend Messaging::StreamName
12
+
13
+ def category_stream_name(category=nil)
14
+ category ||= self.category
15
+ category
16
+ end
17
+
18
+ def command_category_stream_name(category=nil)
19
+ category ||= self.category
20
+ EventSource::StreamName.stream_name category, type: 'command'
21
+ end
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-messaging-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.0
4
+ version: 0.5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
@@ -64,6 +64,7 @@ files:
64
64
  - lib/messaging/postgres/controls/message.rb
65
65
  - lib/messaging/postgres/controls/stream_name.rb
66
66
  - lib/messaging/postgres/log.rb
67
+ - lib/messaging/postgres/stream_name.rb
67
68
  - lib/messaging/postgres/write.rb
68
69
  homepage: https://github.com/eventide-project/messaging-postgres
69
70
  licenses: