redis 5.2.0 → 5.3.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/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/lib/redis/commands/hashes.rb +4 -0
- data/lib/redis/commands/keys.rb +6 -0
- data/lib/redis/commands/pubsub.rb +6 -0
- data/lib/redis/commands/sets.rb +4 -0
- data/lib/redis/commands/sorted_sets.rb +4 -0
- data/lib/redis/distributed.rb +4 -0
- data/lib/redis/pipeline.rb +6 -4
- data/lib/redis/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 175cb33b8059b353221168931b076c107b96cb4136a2b169e7dd2674b9a82259
|
4
|
+
data.tar.gz: 4c1fd79ea3974799be65c3d269ada25539045e7c265ccfda8b8be21647a9b1f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8881d1fecbb0755865094498cf43994c77d82492cdb88916aeb66cf675629cd85cd9e47a35d62b3a790b0efef78df843d32d9f73ccbec6104658368d48509d09
|
7
|
+
data.tar.gz: 3334c1a5f7174ad18e36c5d6ddab3c00c433648d38b9db7210935750d18f144acdf535c5a6d4ac16360fd6c77a4efa5196d4b585332c77e4e5e51e1d41b71691
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -273,6 +273,7 @@ See lib/redis/errors.rb for information about what exceptions are possible.
|
|
273
273
|
## Timeouts
|
274
274
|
|
275
275
|
The client allows you to configure connect, read, and write timeouts.
|
276
|
+
Starting in version 5.0, the default for each is 1. Before that, it was 5.
|
276
277
|
Passing a single `timeout` option will set all three values:
|
277
278
|
|
278
279
|
```ruby
|
@@ -222,6 +222,8 @@ class Redis
|
|
222
222
|
# - `:count => Integer`: return count keys at most per iteration
|
223
223
|
#
|
224
224
|
# @return [String, Array<[String, String]>] the next cursor and all found keys
|
225
|
+
#
|
226
|
+
# See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details
|
225
227
|
def hscan(key, cursor, **options)
|
226
228
|
_scan(:hscan, cursor, [key], **options) do |reply|
|
227
229
|
[reply[0], reply[1].each_slice(2).to_a]
|
@@ -239,6 +241,8 @@ class Redis
|
|
239
241
|
# - `:count => Integer`: return count keys at most per iteration
|
240
242
|
#
|
241
243
|
# @return [Enumerator] an enumerator for all found keys
|
244
|
+
#
|
245
|
+
# See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details
|
242
246
|
def hscan_each(key, **options, &block)
|
243
247
|
return to_enum(:hscan_each, key, **options) unless block_given?
|
244
248
|
|
data/lib/redis/commands/keys.rb
CHANGED
@@ -22,6 +22,8 @@ class Redis
|
|
22
22
|
# - `:type => String`: return keys only of the given type
|
23
23
|
#
|
24
24
|
# @return [String, Array<String>] the next cursor and all found keys
|
25
|
+
#
|
26
|
+
# See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details
|
25
27
|
def scan(cursor, **options)
|
26
28
|
_scan(:scan, cursor, [], **options)
|
27
29
|
end
|
@@ -46,6 +48,8 @@ class Redis
|
|
46
48
|
# - `:type => String`: return keys only of the given type
|
47
49
|
#
|
48
50
|
# @return [Enumerator] an enumerator for all found keys
|
51
|
+
#
|
52
|
+
# See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details
|
49
53
|
def scan_each(**options, &block)
|
50
54
|
return to_enum(:scan_each, **options) unless block_given?
|
51
55
|
|
@@ -282,6 +286,8 @@ class Redis
|
|
282
286
|
#
|
283
287
|
# @param [String] pattern
|
284
288
|
# @return [Array<String>]
|
289
|
+
#
|
290
|
+
# See the [Redis Server KEYS documentation](https://redis.io/docs/latest/commands/keys/) for further details
|
285
291
|
def keys(pattern = "*")
|
286
292
|
send_command([:keys, pattern]) do |reply|
|
287
293
|
if reply.is_a?(String)
|
@@ -29,17 +29,23 @@ class Redis
|
|
29
29
|
end
|
30
30
|
|
31
31
|
# Listen for messages published to channels matching the given patterns.
|
32
|
+
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
|
33
|
+
# for further details
|
32
34
|
def psubscribe(*channels, &block)
|
33
35
|
_subscription(:psubscribe, 0, channels, block)
|
34
36
|
end
|
35
37
|
|
36
38
|
# Listen for messages published to channels matching the given patterns.
|
37
39
|
# Throw a timeout error if there is no messages for a timeout period.
|
40
|
+
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
|
41
|
+
# for further details
|
38
42
|
def psubscribe_with_timeout(timeout, *channels, &block)
|
39
43
|
_subscription(:psubscribe_with_timeout, timeout, channels, block)
|
40
44
|
end
|
41
45
|
|
42
46
|
# Stop listening for messages posted to channels matching the given patterns.
|
47
|
+
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/)
|
48
|
+
# for further details
|
43
49
|
def punsubscribe(*channels)
|
44
50
|
_subscription(:punsubscribe, 0, channels, nil)
|
45
51
|
end
|
data/lib/redis/commands/sets.rb
CHANGED
@@ -184,6 +184,8 @@ class Redis
|
|
184
184
|
# - `:count => Integer`: return count keys at most per iteration
|
185
185
|
#
|
186
186
|
# @return [String, Array<String>] the next cursor and all found members
|
187
|
+
#
|
188
|
+
# See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details
|
187
189
|
def sscan(key, cursor, **options)
|
188
190
|
_scan(:sscan, cursor, [key], **options)
|
189
191
|
end
|
@@ -199,6 +201,8 @@ class Redis
|
|
199
201
|
# - `:count => Integer`: return count keys at most per iteration
|
200
202
|
#
|
201
203
|
# @return [Enumerator] an enumerator for all keys in the set
|
204
|
+
#
|
205
|
+
# See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details
|
202
206
|
def sscan_each(key, **options, &block)
|
203
207
|
return to_enum(:sscan_each, key, **options) unless block_given?
|
204
208
|
|
@@ -817,6 +817,8 @@ class Redis
|
|
817
817
|
#
|
818
818
|
# @return [String, Array<[String, Float]>] the next cursor and all found
|
819
819
|
# members and scores
|
820
|
+
#
|
821
|
+
# See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details
|
820
822
|
def zscan(key, cursor, **options)
|
821
823
|
_scan(:zscan, cursor, [key], **options) do |reply|
|
822
824
|
[reply[0], FloatifyPairs.call(reply[1])]
|
@@ -834,6 +836,8 @@ class Redis
|
|
834
836
|
# - `:count => Integer`: return count keys at most per iteration
|
835
837
|
#
|
836
838
|
# @return [Enumerator] an enumerator for all found scores and members
|
839
|
+
#
|
840
|
+
# See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details
|
837
841
|
def zscan_each(key, **options, &block)
|
838
842
|
return to_enum(:zscan_each, key, **options) unless block_given?
|
839
843
|
|
data/lib/redis/distributed.rb
CHANGED
@@ -948,12 +948,16 @@ class Redis
|
|
948
948
|
end
|
949
949
|
|
950
950
|
# Listen for messages published to channels matching the given patterns.
|
951
|
+
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/)
|
952
|
+
# for further details
|
951
953
|
def psubscribe(*channels, &block)
|
952
954
|
raise NotImplementedError
|
953
955
|
end
|
954
956
|
|
955
957
|
# Stop listening for messages posted to channels matching the given
|
956
958
|
# patterns.
|
959
|
+
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/)
|
960
|
+
# for further details
|
957
961
|
def punsubscribe(*channels)
|
958
962
|
raise NotImplementedError
|
959
963
|
end
|
data/lib/redis/pipeline.rb
CHANGED
@@ -58,7 +58,7 @@ class Redis
|
|
58
58
|
|
59
59
|
class MultiConnection < PipelinedConnection
|
60
60
|
def multi
|
61
|
-
raise Redis::
|
61
|
+
raise Redis::BaseError, "Can't nest multi transaction"
|
62
62
|
end
|
63
63
|
|
64
64
|
private
|
@@ -118,12 +118,14 @@ class Redis
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def _set(replies)
|
121
|
-
if replies
|
122
|
-
@futures.
|
121
|
+
@object = if replies
|
122
|
+
@futures.map.with_index do |future, index|
|
123
123
|
future._set(replies[index])
|
124
|
+
future.value
|
124
125
|
end
|
126
|
+
else
|
127
|
+
replies
|
125
128
|
end
|
126
|
-
@object = replies
|
127
129
|
end
|
128
130
|
end
|
129
131
|
end
|
data/lib/redis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezra Zygmuntowicz
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2024-
|
19
|
+
date: 2024-08-21 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: redis-client
|
@@ -75,9 +75,9 @@ licenses:
|
|
75
75
|
metadata:
|
76
76
|
bug_tracker_uri: https://github.com/redis/redis-rb/issues
|
77
77
|
changelog_uri: https://github.com/redis/redis-rb/blob/master/CHANGELOG.md
|
78
|
-
documentation_uri: https://www.rubydoc.info/gems/redis/5.
|
78
|
+
documentation_uri: https://www.rubydoc.info/gems/redis/5.3.0
|
79
79
|
homepage_uri: https://github.com/redis/redis-rb
|
80
|
-
source_code_uri: https://github.com/redis/redis-rb/tree/v5.
|
80
|
+
source_code_uri: https://github.com/redis/redis-rb/tree/v5.3.0
|
81
81
|
post_install_message:
|
82
82
|
rdoc_options: []
|
83
83
|
require_paths:
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.5.
|
96
|
+
rubygems_version: 3.5.11
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: A Ruby client library for Redis
|