hiredis-client 0.25.3 → 0.26.1

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: 06a7b94d016ad6ce6a8d839152d636ae7425447c44f698952a93a287aa4b1d03
4
- data.tar.gz: 67133f63add539a01d546214f38f8afd971c18a2eca6d64c1c46604d7b7ff3a6
3
+ metadata.gz: 740114f3454c9e1a322f98966fc9c6fc45ec919c8d103bf31ad6f1449db79577
4
+ data.tar.gz: 96ec35739c4ba1b5827cfcdcd5cab0def5f0cc3e9e93f76b83bfd2b01e55013a
5
5
  SHA512:
6
- metadata.gz: c65b5ca52401fcb779bee5551f870a79747441733d68ee76fd73b9a67a4c9ff78ccedf722260e63d58252740208322063bdb015a5f05f6705589b746297baa03
7
- data.tar.gz: 93a53b85cc0d34752e4fb508d7d456921a6dc390b5911621de4b9d1347073682b0daf54bd0444d985a17b6545799eec11ff4d529aac6768bb9cea9b33f101193
6
+ metadata.gz: 1d04f187cb816f56328d3f56cbb30123497517bdd1cdfc77999cb707eb6d619d3cf4013c9700f6693876210fc47a11eccc0381615bc6fb97c7d1965c3778debe
7
+ data.tar.gz: f8a69e6be041943fa9c4455306169d217d771fd370fa7e74d12ae643b20d1c8e4f9d2443e50158e213d7965638463fabbf693b0d499504aee66b65793206f45f
@@ -39,11 +39,8 @@ class RedisClient
39
39
  end
40
40
  end
41
41
 
42
- attr_reader :config
43
-
44
42
  def initialize(config, connect_timeout:, read_timeout:, write_timeout:)
45
- super()
46
- @config = config
43
+ super(config)
47
44
  self.connect_timeout = connect_timeout
48
45
  self.read_timeout = read_timeout
49
46
  self.write_timeout = write_timeout
@@ -100,9 +97,10 @@ class RedisClient
100
97
  end
101
98
  end
102
99
  rescue SystemCallError, IOError => error
103
- raise ConnectionError.with_config(error.message, config)
100
+ raise connection_error(error.message)
104
101
  rescue Error => error
105
102
  error._set_config(config)
103
+ error._set_retry_attempt(@retry_attempt)
106
104
  raise error
107
105
  end
108
106
 
@@ -110,9 +108,10 @@ class RedisClient
110
108
  _write(command)
111
109
  flush
112
110
  rescue SystemCallError, IOError => error
113
- raise ConnectionError.with_config(error.message, config)
111
+ raise connection_error(error.message)
114
112
  rescue Error => error
115
113
  error._set_config(config)
114
+ error._set_retry_attempt(@retry_attempt)
116
115
  raise error
117
116
  end
118
117
 
@@ -122,15 +121,17 @@ class RedisClient
122
121
  end
123
122
  flush
124
123
  rescue SystemCallError, IOError => error
125
- raise ConnectionError.with_config(error.message, config)
124
+ raise connection_error(error.message)
126
125
  rescue Error => error
127
126
  error._set_config(config)
127
+ error._set_retry_attempt(@retry_attempt)
128
128
  raise error
129
129
  end
130
130
 
131
131
  private
132
132
 
133
133
  def connect
134
+ @server_key = @config.server_key
134
135
  _connect(@config.path, @config.host, @config.port, @config.ssl_context)
135
136
  rescue SystemCallError => error
136
137
  host = @config.path || "#{@config.host}:#{@config.port}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiredis-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.3
4
+ version: 0.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 0.25.3
18
+ version: 0.26.1
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 0.25.3
25
+ version: 0.26.1
26
26
  email:
27
27
  - jean.boussier@gmail.com
28
28
  executables: []
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.7.1
104
+ rubygems_version: 3.6.9
105
105
  specification_version: 4
106
106
  summary: Hiredis binding for redis-client
107
107
  test_files: []