redis-cluster-client 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redis_client/cluster/command.rb +6 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0890e2d621a219037cad3f57ff1f3ea459f274ae1027247360a644743b323e0c'
|
4
|
+
data.tar.gz: 7225a3ba1fa71776c81deda0ff34aa4fc46eb0146aa63da8b9c3b5d9503a807f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78d7cb40b48dae677dea264d7408546673414f927edd236ae5d091ba09fabc306465ffb3b2c77c39c475886d1e547f7f630ee112f193fceb4d39df4a6b94c75f
|
7
|
+
data.tar.gz: 8990869249f008c27c7a795c6d73cd6b7d942eecce4ba0d9dd1d85b4b9ba65048f367b155be24cc8d8c90c4095fe67c1aa5133120504a433cd43f2b715802384
|
@@ -8,6 +8,8 @@ class RedisClient
|
|
8
8
|
class Cluster
|
9
9
|
class Command
|
10
10
|
EMPTY_STRING = ''
|
11
|
+
LEFT_BRACKET = '{'
|
12
|
+
RIGHT_BRACKET = '}'
|
11
13
|
|
12
14
|
Detail = Struct.new(
|
13
15
|
'RedisCommand',
|
@@ -104,10 +106,11 @@ class RedisClient
|
|
104
106
|
# @see https://redis.io/topics/cluster-spec#keys-hash-tags Keys hash tags
|
105
107
|
def extract_hash_tag(key)
|
106
108
|
key = key.to_s
|
107
|
-
s = key.index(
|
108
|
-
|
109
|
+
s = key.index(LEFT_BRACKET)
|
110
|
+
return EMPTY_STRING if s.nil?
|
109
111
|
|
110
|
-
|
112
|
+
e = key.index(RIGHT_BRACKET, s + 1)
|
113
|
+
return EMPTY_STRING if e.nil?
|
111
114
|
|
112
115
|
key[s + 1..e - 1]
|
113
116
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-cluster-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taishi Kasuga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-client
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.3.
|
72
|
+
rubygems_version: 3.3.22
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: A Redis cluster client for Ruby
|