redis 5.0.3 → 5.0.4
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 +5 -1
- data/README.md +1 -1
- data/lib/redis/commands/keys.rb +4 -4
- data/lib/redis/commands/strings.rb +2 -2
- data/lib/redis/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f65967c3d313cca4af20076de88097790ae39dd7935cd9ef25f6ce4d6200c0a5
|
4
|
+
data.tar.gz: f744db40e4de3794921aedd4d792eb7f275c24e4bd88e8954ce4b3b56a1b2d64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1368bd997873d59bc5910ac1d1431a53ff2fde0179c4398e35c645d3a6b605695294ff959a79940a74d54b2fc3dd1dc75d6e70636d1cf611285c5c215e64aaa5
|
7
|
+
data.tar.gz: cb1b07ce5cb323b92ad50846165350ed740729f00df50cdb6a8162e961fbf5c9bda2bf83db2eff0413416e8800c8510698d46b5678f0fe74f45f0935fc1b1fff
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Unreleased
|
2
2
|
|
3
|
+
# 5.0.4
|
4
|
+
|
5
|
+
- Cast `ttl` argument to integer in `expire`, `setex` and a few others.
|
6
|
+
|
3
7
|
# 5.0.3
|
4
8
|
|
5
9
|
- Add `OutOfMemoryError` as a subclass of `CommandError`
|
@@ -39,7 +43,7 @@
|
|
39
43
|
|
40
44
|
* Introduce `sadd?` and `srem?` as boolean returning versions of `sadd` and `srem`.
|
41
45
|
* Deprecate `sadd` and `srem` returning a boolean when called with a single argument.
|
42
|
-
To enable the redis 5.0 behavior you can set `Redis.sadd_returns_boolean =
|
46
|
+
To enable the redis 5.0 behavior you can set `Redis.sadd_returns_boolean = false`.
|
43
47
|
* Deprecate passing `timeout` as a positional argument in blocking commands (`brpop`, `blop`, etc).
|
44
48
|
|
45
49
|
# 4.7.1
|
data/README.md
CHANGED
data/lib/redis/commands/keys.rb
CHANGED
@@ -76,7 +76,7 @@ class Redis
|
|
76
76
|
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
|
77
77
|
# @return [Boolean] whether the timeout was set or not
|
78
78
|
def expire(key, seconds, nx: nil, xx: nil, gt: nil, lt: nil)
|
79
|
-
args = [:expire, key, seconds]
|
79
|
+
args = [:expire, key, Integer(seconds)]
|
80
80
|
args << "NX" if nx
|
81
81
|
args << "XX" if xx
|
82
82
|
args << "GT" if gt
|
@@ -96,7 +96,7 @@ class Redis
|
|
96
96
|
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
|
97
97
|
# @return [Boolean] whether the timeout was set or not
|
98
98
|
def expireat(key, unix_time, nx: nil, xx: nil, gt: nil, lt: nil)
|
99
|
-
args = [:expireat, key, unix_time]
|
99
|
+
args = [:expireat, key, Integer(unix_time)]
|
100
100
|
args << "NX" if nx
|
101
101
|
args << "XX" if xx
|
102
102
|
args << "GT" if gt
|
@@ -132,7 +132,7 @@ class Redis
|
|
132
132
|
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
|
133
133
|
# @return [Boolean] whether the timeout was set or not
|
134
134
|
def pexpire(key, milliseconds, nx: nil, xx: nil, gt: nil, lt: nil)
|
135
|
-
args = [:pexpire, key, milliseconds]
|
135
|
+
args = [:pexpire, key, Integer(milliseconds)]
|
136
136
|
args << "NX" if nx
|
137
137
|
args << "XX" if xx
|
138
138
|
args << "GT" if gt
|
@@ -152,7 +152,7 @@ class Redis
|
|
152
152
|
# - `:lt => true`: Set expiry only when the new expiry is less than current one.
|
153
153
|
# @return [Boolean] whether the timeout was set or not
|
154
154
|
def pexpireat(key, ms_unix_time, nx: nil, xx: nil, gt: nil, lt: nil)
|
155
|
-
args = [:pexpireat, key, ms_unix_time]
|
155
|
+
args = [:pexpireat, key, Integer(ms_unix_time)]
|
156
156
|
args << "NX" if nx
|
157
157
|
args << "XX" if xx
|
158
158
|
args << "GT" if gt
|
@@ -105,7 +105,7 @@ class Redis
|
|
105
105
|
# @param [String] value
|
106
106
|
# @return [String] `"OK"`
|
107
107
|
def setex(key, ttl, value)
|
108
|
-
send_command([:setex, key, ttl, value.to_s])
|
108
|
+
send_command([:setex, key, Integer(ttl), value.to_s])
|
109
109
|
end
|
110
110
|
|
111
111
|
# Set the time to live in milliseconds of a key.
|
@@ -115,7 +115,7 @@ class Redis
|
|
115
115
|
# @param [String] value
|
116
116
|
# @return [String] `"OK"`
|
117
117
|
def psetex(key, ttl, value)
|
118
|
-
send_command([:psetex, key, ttl, value.to_s])
|
118
|
+
send_command([:psetex, key, Integer(ttl), value.to_s])
|
119
119
|
end
|
120
120
|
|
121
121
|
# Set the value of a key, only if the key does not exist.
|
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.0.
|
4
|
+
version: 5.0.4
|
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: 2022-09-
|
19
|
+
date: 2022-09-09 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.0.
|
78
|
+
documentation_uri: https://www.rubydoc.info/gems/redis/5.0.4
|
79
79
|
homepage_uri: https://github.com/redis/redis-rb
|
80
|
-
source_code_uri: https://github.com/redis/redis-rb/tree/v5.0.
|
80
|
+
source_code_uri: https://github.com/redis/redis-rb/tree/v5.0.4
|
81
81
|
post_install_message:
|
82
82
|
rdoc_options: []
|
83
83
|
require_paths:
|