messaging 3.5.6 → 3.5.7
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/messaging/adapters/postgres/stream.rb +8 -1
- data/lib/messaging/version.rb +1 -1
- 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: 44057f3b83334d34fb1cefa4b0261d84ef93bf764c487ae7084c425dac105643
|
4
|
+
data.tar.gz: 38a69af6df0a7d1b86f492d21d3b4ffe3e0d2e4ff360fe53cc106f499da6879f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1119c1db6d97fe860cfd82dcb9547546b5313caf174557756453a0aa354823a335a306784e35c022d2f0a693057707789c56fa34369e58c81f0555ad457ce4b
|
7
|
+
data.tar.gz: 90640e22a90b03de047daf4a228c81defa88f56321eca71f725ad898c9dae182edab6e7523408bde73d9f1fb26a3ce1efe08db9b298d96500f4f1967c963d461
|
data/Gemfile.lock
CHANGED
@@ -5,6 +5,12 @@ module Messaging
|
|
5
5
|
# @return [String] the name of the stream
|
6
6
|
attr_reader :name
|
7
7
|
|
8
|
+
# @return [String] the stream category
|
9
|
+
attr_reader :category
|
10
|
+
|
11
|
+
# @return [String] the stream id
|
12
|
+
attr_reader :id
|
13
|
+
|
8
14
|
# Should not be used directly.
|
9
15
|
# Use {Messaging.stream} or {Store#stream}
|
10
16
|
# @api private
|
@@ -12,12 +18,13 @@ module Messaging
|
|
12
18
|
# @see Store.stream
|
13
19
|
def initialize(name)
|
14
20
|
@name = name
|
21
|
+
@category, @id = name.split('$')
|
15
22
|
end
|
16
23
|
|
17
24
|
# Access to all messages in the stream sorted by stream_position
|
18
25
|
# @return [ActiveRecord::Relation]
|
19
26
|
def messages
|
20
|
-
SerializedMessage.where(
|
27
|
+
SerializedMessage.where(stream_category: category, stream_id: id).order(:stream_position)
|
21
28
|
end
|
22
29
|
|
23
30
|
# The current position of the last message in the stream
|
data/lib/messaging/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bukowskis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|