redis-client 0.7.3 → 0.7.4

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: 38d06784583843dbaa9375de07c9c13313d79859b6c58aa8089174a01e2dd9cf
4
- data.tar.gz: a83642acf97c40818c588cc151ad4c4a8c5191a4acf17275e5130c887a2617b0
3
+ metadata.gz: e6fbe9260e43212ff9c501d95cf262f0c34e4db3cbc4dc6bebef3e8d2f98fc52
4
+ data.tar.gz: d8356c2d342ae51f70e33b28f5e5679bea021ed31240b35c055ea5ad5625e9a4
5
5
  SHA512:
6
- metadata.gz: 56b40ba378de26e41133216660c19ea81f506828547fad07e6c89e5fff16e9206ce446716153e3641ad00c3fcbe8422e0b68f9e1796824823535cfcaddf77742
7
- data.tar.gz: c76f8800caf273870ad449d86108ec8d6aa17a777fd59e09fb61d066033d1b59b5c33742a71a870073426c8e5046bf405ee6bc073d8811f6aefbb186111688bc
6
+ metadata.gz: 7ad5fdf44a060e90f3d9a4b350733d208a745e625fa95764c7288047bfa4138e9e882a6608634374c66b3fa595037d8603eb902f431603c8c94048bacfbf8184
7
+ data.tar.gz: c09bea07473c08a6d67b0615811484e50199da37ceb25a977129f616595fc7692d24aa46851272129b4a41c735f83a22dae0922a09bc74f6be72fe28dda2576d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 0.7.4
4
+
5
+ - Properly parse script errors on pre 7.0 redis server.
6
+
3
7
  # 0.7.3
4
8
 
5
9
  - Fix a bug in `url` parsing conflicting with the `path` option.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redis-client (0.7.3)
4
+ redis-client (0.7.4)
5
5
  connection_pool
6
6
 
7
7
  GEM
@@ -38,7 +38,7 @@ GEM
38
38
  rubocop-minitest (0.19.1)
39
39
  rubocop (>= 0.90, < 2.0)
40
40
  ruby-progressbar (1.11.0)
41
- stackprof (0.2.19)
41
+ stackprof (0.2.21)
42
42
  toxiproxy (2.0.2)
43
43
  unicode-display_width (2.2.0)
44
44
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RedisClient
4
- VERSION = "0.7.3"
4
+ VERSION = "0.7.4"
5
5
  end
data/lib/redis_client.rb CHANGED
@@ -94,7 +94,14 @@ class RedisClient
94
94
 
95
95
  class << self
96
96
  def parse(error_message)
97
- code = error_message.split(' ', 2).first
97
+ code = if error_message.start_with?("ERR Error running script")
98
+ # On older redis servers script errors are nested.
99
+ # So we need to parse some more.
100
+ if (match = error_message.match(/:\s-([A-Z]+) /))
101
+ match[1]
102
+ end
103
+ end
104
+ code ||= error_message.split(' ', 2).first
98
105
  klass = ERRORS.fetch(code, self)
99
106
  klass.new(error_message)
100
107
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-05 00:00:00.000000000 Z
11
+ date: 2022-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool