protocol-redis 0.5.1 → 0.6.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: a32bb81e55ba8e8b7c7ed5e18bf138661824f43c5a77c4b2b749f3486c4842a8
4
- data.tar.gz: 415214403453d4a2758d08e8db9cc491c2f7cdcf9fff6fdfd057bcd64c2abbe8
3
+ metadata.gz: 5077af3c76efde44dc2fd13157f4789a31521e5e90748073742f0a213e8e73c5
4
+ data.tar.gz: 27b6d14178d456f5e9b74258accb37db5a303cb43eb84a5664a6e6871cb1687f
5
5
  SHA512:
6
- metadata.gz: 741e5ca5e967a652c95c8cc81579339daf42be0e1c2cfc7c14fb57f5fbdd5bca84c2a282ec8ce78b82a830e0178e92d27abcd3e5ce34e2152a816effa3b15162
7
- data.tar.gz: bbcd868f11a0c3df64c65eaae1043b6fde2ca218da9664ddee30fe97d48221015416047f8b91da494431585c12d9f7aa62d0b8b9518ffe6f8120a928e65fea01
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
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Protocol
24
24
  module Redis
25
- VERSION = "0.5.1"
25
+ VERSION = "0.6.0"
26
26
  end
27
27
  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.5.1
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-06-03 00:00:00.000000000 Z
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: []