protocol-redis 0.5.1 → 0.6.0
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/lib/protocol/redis/methods.rb +4 -0
- data/lib/protocol/redis/methods/pubsub.rb +38 -0
- data/lib/protocol/redis/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5077af3c76efde44dc2fd13157f4789a31521e5e90748073742f0a213e8e73c5
|
4
|
+
data.tar.gz: 27b6d14178d456f5e9b74258accb37db5a303cb43eb84a5664a6e6871cb1687f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c13f3a069070493188bd8fcea4a9ed3a7adfa5c8f5abc8df46972603c83ba26c8d32c4e263bd0d65b1197798462f6afb6013f6cd7f23ad0ec0f9d806df625828
|
7
|
+
data.tar.gz: 9a792ffb56f502d706fcdc218c9e0bb8850bb105bd112b26dc5995f0581fc0ee9e0923537ba61c11856ff4c7789eb7b5f9f1eab44f1fbb11f4693486c6b6c488
|
@@ -32,6 +32,8 @@ require_relative 'methods/lists'
|
|
32
32
|
require_relative 'methods/strings'
|
33
33
|
require_relative 'methods/sorted_sets'
|
34
34
|
|
35
|
+
require_relative 'methods/pubsub'
|
36
|
+
|
35
37
|
module Protocol
|
36
38
|
module Redis
|
37
39
|
module Methods
|
@@ -47,6 +49,8 @@ module Protocol
|
|
47
49
|
klass.include Methods::Lists
|
48
50
|
klass.include Methods::SortedSets
|
49
51
|
klass.include Methods::Strings
|
52
|
+
|
53
|
+
klass.include Methods::Pubsub
|
50
54
|
end
|
51
55
|
end
|
52
56
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
|
+
# Copyright, 2018, by Huba Nagy.
|
5
|
+
#
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
# THE SOFTWARE.
|
23
|
+
|
24
|
+
module Protocol
|
25
|
+
module Redis
|
26
|
+
module Methods
|
27
|
+
module Pubsub
|
28
|
+
# Post a message to a channel.
|
29
|
+
# @see https://redis.io/commands/publish
|
30
|
+
# @param channel [String]
|
31
|
+
# @param message [String]
|
32
|
+
def publish(channel, message)
|
33
|
+
call('PUBLISH', channel, message)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Huba Nagy
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: async-http
|
@@ -137,8 +137,8 @@ dependencies:
|
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
|
-
description:
|
141
|
-
email:
|
140
|
+
description:
|
141
|
+
email:
|
142
142
|
executables: []
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- lib/protocol/redis/methods/geospatial.rb
|
154
154
|
- lib/protocol/redis/methods/hashes.rb
|
155
155
|
- lib/protocol/redis/methods/lists.rb
|
156
|
+
- lib/protocol/redis/methods/pubsub.rb
|
156
157
|
- lib/protocol/redis/methods/scripting.rb
|
157
158
|
- lib/protocol/redis/methods/server.rb
|
158
159
|
- lib/protocol/redis/methods/sets.rb
|
@@ -165,7 +166,7 @@ licenses:
|
|
165
166
|
- MIT
|
166
167
|
metadata:
|
167
168
|
funding_uri: https://github.com/sponsors/ioquatix
|
168
|
-
post_install_message:
|
169
|
+
post_install_message:
|
169
170
|
rdoc_options: []
|
170
171
|
require_paths:
|
171
172
|
- lib
|
@@ -181,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
182
|
version: '0'
|
182
183
|
requirements: []
|
183
184
|
rubygems_version: 3.1.2
|
184
|
-
signing_key:
|
185
|
+
signing_key:
|
185
186
|
specification_version: 4
|
186
187
|
summary: A transport agnostic RESP protocol client/server.
|
187
188
|
test_files: []
|