redis-cluster-client 0.17.6 → 0.17.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 675e3b7c851ac7deebc2f261d0aaa7fa6ef4c1865b3382014c41404ca314f5cc
4
- data.tar.gz: 6a25062f50524661e566a1223752822711cf10246bedec98e52d1bdac3205fcc
3
+ metadata.gz: '028bfbb6e37f09e90d0739017bfac62b40a98be4de93a0eb795f48f14b15c294'
4
+ data.tar.gz: 978ffaa979749f1eac72fbb926c90a37802d68d7d5d0a874a99af528ada955bf
5
5
  SHA512:
6
- metadata.gz: 98cd5427026578e9a175cdcd21def056ca24997213f1c70385c193ce5fa2991a5f60edadb34e557d5c4a75ba4ff985d2c9a8b0c2f7e3e76f22cd9ce529846961
7
- data.tar.gz: 1f8e2a9cc8576fee87fdfb91485fbb13a5609381ef8f186ae287915f8f51cd4c3611e627e65d82d9c0767d9345a1d62e14a24b0b0a41dd70624558fe3b50e2c5
6
+ metadata.gz: 761229dba60980f5380627f23ad8961a551954ea47cfe43797ab483b1fe9dfbf96cbaebe4d7fec9c3fcdf724ad781f95467f2eb5ed01d772d730cc5a9e7f256e
7
+ data.tar.gz: 1f128f1d70c0420522f482f6bcc7e884083958ce9bc905ec87bbaaeef0922c24b5ebe3489c99c352812a1b3075d3a812a213b41a10827b1427f99af93f258088
@@ -169,7 +169,7 @@ class RedisClient
169
169
  when Hash
170
170
  parse_node_option(addr)
171
171
  else
172
- raise InvalidClientConfigError, "`nodes` option includes invalid type values: #{addr}"
172
+ raise InvalidClientConfigError, "`nodes` option includes invalid type values: #{addr.class}"
173
173
  end
174
174
  end
175
175
 
@@ -178,7 +178,7 @@ class RedisClient
178
178
 
179
179
  uri = URI(addr)
180
180
  scheme = uri.scheme || DEFAULT_SCHEME
181
- raise InvalidClientConfigError, "`nodes` option includes a invalid uri scheme: #{addr}" unless VALID_SCHEMES.include?(scheme)
181
+ raise InvalidClientConfigError, "`nodes` option includes a invalid uri scheme: #{redact_url(addr)}" unless VALID_SCHEMES.include?(scheme)
182
182
 
183
183
  username = uri.user ? URI.decode_www_form_component(uri.user) : nil
184
184
  password = uri.password ? URI.decode_www_form_component(uri.password) : nil
@@ -190,7 +190,11 @@ class RedisClient
190
190
  { ssl: scheme == SECURE_SCHEME, username: username, password: password, host: host, port: port, db: db }
191
191
  .reject { |_, v| v.nil? || v == '' || v == false }
192
192
  rescue URI::InvalidURIError => e
193
- raise InvalidClientConfigError, "#{e.message}: #{addr}"
193
+ raise InvalidClientConfigError, redact_url(e.message)
194
+ end
195
+
196
+ def redact_url(str)
197
+ str.sub(%r{//(.*)@}, '//REDACTED@')
194
198
  end
195
199
 
196
200
  def parse_node_option(addr)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-cluster-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.6
4
+ version: 0.17.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taishi Kasuga