redis-cluster-client 0.9.0 → 0.9.1

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: 97383b0daf1dcc2e5fcd8e50640e9ecbd903562a10cca0f4996ada1807469f80
4
- data.tar.gz: 675ae25f2fbf2d9d67234b4e1ad81894656f11a32fe4cd1ebf8ae73c90c67509
3
+ metadata.gz: 75b8f7550c743c813f79d15ba60d5e78fe5e81c751854b5600cc1984b56256fa
4
+ data.tar.gz: c560f4fb9a3e5e044a64c8b8c0da8bf51413d384dd19d069994f14f44e4d4055
5
5
  SHA512:
6
- metadata.gz: 851565ace738fb9bf51d1211ece97767520c94a7b02e49b053732de351d77a30e7104ae1f8143a0ee3903a2b99de39b298b3eec80c2fb94b08fb4747180bb03d
7
- data.tar.gz: 0a0b6ada72bccfcdb7cecda533f8f31761f15f991e359bc211a4d54ba973b2c68983efd3a9a594e7baab11b614fecb058de98b71f1890f7e52150f40e2c34d1b
6
+ metadata.gz: 5165edd2f2ae4c27680be76227cc73ed1b5e5c17914dc08eb6f9015199d29bb14f0c4961f5a291c3e764b78dfee3892e6666fff6aca95bc466eab144d4ce43d4
7
+ data.tar.gz: 91f09f17897dcd974f11001cd2ea0445a384cb83134d8b51835ad197835ee4710935253e024fd6c938f12fa10bb8daea56465ac7f522a6e2484ec25f942fcb0d
@@ -70,6 +70,17 @@ class RedisClient
70
70
 
71
71
  key[s + 1..e - 1]
72
72
  end
73
+
74
+ def hash_tag_included?(key)
75
+ key = key.to_s
76
+ s = key.index(LEFT_BRACKET)
77
+ return false if s.nil?
78
+
79
+ e = key.index(RIGHT_BRACKET, s + 1)
80
+ return false if e.nil?
81
+
82
+ s + 1 < e
83
+ end
73
84
  end
74
85
  end
75
86
  end
@@ -336,7 +336,7 @@ class RedisClient
336
336
 
337
337
  def send_multiple_keys_command(cmd, method, command, args, &block) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
338
338
  key_step = @command.determine_key_step(cmd)
339
- if command.size <= key_step + 1 || !::RedisClient::Cluster::KeySlotConverter.extract_hash_tag(command[1]).empty? # rubocop:disable Style/IfUnlessModifier
339
+ if command.size <= key_step + 1 || ::RedisClient::Cluster::KeySlotConverter.hash_tag_included?(command[1]) # rubocop:disable Style/IfUnlessModifier
340
340
  return try_send(assign_node(command), method, command, args, &block)
341
341
  end
342
342
 
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.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taishi Kasuga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-02 00:00:00.000000000 Z
11
+ date: 2024-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client