redis-client 0.21.0 → 0.21.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: 6e9f47246df9bffdd7cea0efe3b320c69e5f355217547d9632b25657cd0636bb
4
- data.tar.gz: 42e567338560a5e391bca9229d3f8d47e91ebe67c97a033263079ca96332e4d3
3
+ metadata.gz: 4742ae57d2d4b4510921d37359540257a2e70ee0f9038276f40f95506ae2ffa0
4
+ data.tar.gz: cb3f9702abcd04ae46cfb5d59350884fb9bcff6f6d4990f1e6a0ae66fb6a1f4a
5
5
  SHA512:
6
- metadata.gz: 34f5c286b713d3698c45648fb8ed06b8cfa11e2e3bc7b5f8b415aa9508199ce7488983a8e354d47d0dc5c6bd157887d2a8f71da7f9f30e710308ed972912fc86
7
- data.tar.gz: e8088f096eb4ef4a9f32c8fd55929b9fcf43604641dbd6f002457eec8dde5f88eeb2ea373efc85100f206947020e4d992ef4f1d6da9f3d931f7d1694e59caecf
6
+ metadata.gz: 14212b26415dd02f6b23f2f729b9690bcf9bd06c156b60ffb5cb4b9061172a3c08f670242d2e6d391770c4abb9cfdd3bd79dfd8d039ae54a9e1537ea39dfd05f
7
+ data.tar.gz: d5b1276dffe3c3fb6220fb06b9e22fd1440bd7d83e19e37031019f98b69ab3ae5c13cbef8bcd036e1929008f764d9b5117451c9fcb07964b28d11cad14ac449e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 0.21.1
4
+
5
+ - Handle unresolved Sentinel master/replica error when displaying server URL in exceptions. See #182.
6
+
3
7
  # 0.21.0
4
8
 
5
9
  - Include redis server URL in most error messages. See #178.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redis-client (0.21.0)
4
+ redis-client (0.21.1)
5
5
  connection_pool
6
6
 
7
7
  GEM
@@ -15,7 +15,7 @@ GEM
15
15
  hiredis (0.6.3-java)
16
16
  json (2.7.1)
17
17
  json (2.7.1-java)
18
- minitest (5.22.2)
18
+ minitest (5.22.3)
19
19
  parallel (1.24.0)
20
20
  parser (3.3.0.5)
21
21
  ast (~> 2.4.1)
@@ -91,6 +91,10 @@ class RedisClient
91
91
  @username || DEFAULT_USERNAME
92
92
  end
93
93
 
94
+ def resolved?
95
+ true
96
+ end
97
+
94
98
  def sentinel?
95
99
  false
96
100
  end
@@ -74,7 +74,7 @@ class RedisClient
74
74
  buffer = RESP3.dump(command)
75
75
  begin
76
76
  @io.write(buffer)
77
- rescue SystemCallError, IOError => error
77
+ rescue SystemCallError, IOError, OpenSSL::SSL::SSLError => error
78
78
  raise ConnectionError.with_config(error.message, config)
79
79
  end
80
80
  end
@@ -86,7 +86,7 @@ class RedisClient
86
86
  end
87
87
  begin
88
88
  @io.write(buffer)
89
- rescue SystemCallError, IOError => error
89
+ rescue SystemCallError, IOError, OpenSSL::SSL::SSLError => error
90
90
  raise ConnectionError.with_config(error.message, config)
91
91
  end
92
92
  end
@@ -112,6 +112,12 @@ class RedisClient
112
112
  end
113
113
  end
114
114
 
115
+ def resolved?
116
+ @mutex.synchronize do
117
+ !!@config
118
+ end
119
+ end
120
+
115
121
  private
116
122
 
117
123
  def sentinels_to_configs(sentinels)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RedisClient
4
- VERSION = "0.21.0"
4
+ VERSION = "0.21.1"
5
5
  end
data/lib/redis_client.rb CHANGED
@@ -85,7 +85,7 @@ class RedisClient
85
85
  end
86
86
 
87
87
  def message
88
- return super unless config
88
+ return super unless config&.resolved?
89
89
 
90
90
  "#{super} (#{config.server_url})"
91
91
  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.21.0
4
+ version: 0.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-04 00:00:00.000000000 Z
11
+ date: 2024-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool