redis 5.0.4 → 5.0.5

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: f65967c3d313cca4af20076de88097790ae39dd7935cd9ef25f6ce4d6200c0a5
4
- data.tar.gz: f744db40e4de3794921aedd4d792eb7f275c24e4bd88e8954ce4b3b56a1b2d64
3
+ metadata.gz: 1b7a13649e5ef98d3c804d2d56d62831fd9b23c83c87c40786a95d812f9dfbbd
4
+ data.tar.gz: eebfce4b4f01428a2fbd8cb476b007a0d0c5bfc1c168ca90aa4ea8dbbbe8d633
5
5
  SHA512:
6
- metadata.gz: 1368bd997873d59bc5910ac1d1431a53ff2fde0179c4398e35c645d3a6b605695294ff959a79940a74d54b2fc3dd1dc75d6e70636d1cf611285c5c215e64aaa5
7
- data.tar.gz: cb1b07ce5cb323b92ad50846165350ed740729f00df50cdb6a8162e961fbf5c9bda2bf83db2eff0413416e8800c8510698d46b5678f0fe74f45f0935fc1b1fff
6
+ metadata.gz: ea3d51ea955613bc695040eca6b6925bb82bc7eb32e19afc7999cf9bbfdb8c794884b6a60633e05ced2343ecc203c90d40c0af7d76c76bbab57d8844114bc015
7
+ data.tar.gz: 9d50a2d93891fd508409c3517aeb23f204dbc53a6586758e06d06875e701d4d871e2e6c54b0c0aba9f1b58b00735c1a8b6e6bffb86b5fc48a2ca48d4165a0636
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 5.0.5
4
+
5
+ - Fix automatic disconnection when the process was forked. See #1157.
6
+
3
7
  # 5.0.4
4
8
 
5
9
  - Cast `ttl` argument to integer in `expire`, `setex` and a few others.
data/README.md CHANGED
@@ -273,8 +273,8 @@ of durations:
273
273
  ```ruby
274
274
  Redis.new(reconnect_attempts: [
275
275
  0, # retry immediately
276
- 0.25 # retry a second time after 250ms
277
- 1 # retry a third and final time after another 1s
276
+ 0.25, # retry a second time after 250ms
277
+ 1, # retry a third and final time after another 1s
278
278
  ])
279
279
  ```
280
280
 
data/lib/redis/client.rb CHANGED
@@ -28,13 +28,6 @@ class Redis
28
28
  end
29
29
  end
30
30
 
31
- def initialize(*)
32
- super
33
- @inherit_socket = false
34
- @pid = nil
35
- end
36
- ruby2_keywords :initialize if respond_to?(:ruby2_keywords, true)
37
-
38
31
  def id
39
32
  config.id
40
33
  end
@@ -115,11 +108,6 @@ class Redis
115
108
  @inherit_socket = true
116
109
  end
117
110
 
118
- def close
119
- super
120
- @pid = nil
121
- end
122
-
123
111
  private
124
112
 
125
113
  def translate_error!(error)
@@ -136,16 +124,5 @@ class Redis
136
124
  raise
137
125
  end
138
126
  end
139
-
140
- def ensure_connected(retryable: true)
141
- unless @inherit_socket || (@pid ||= Process.pid) == Process.pid
142
- raise InheritedError,
143
- "Tried to use a connection from a child process without reconnecting. " \
144
- "You need to reconnect to Redis after forking " \
145
- "or set :inherit_socket to true."
146
- end
147
-
148
- super
149
- end
150
127
  end
151
128
  end
@@ -63,7 +63,7 @@ class Redis
63
63
  #
64
64
  # @see #hmset
65
65
  def mapped_hmset(key, hash)
66
- hmset(key, hash.to_a.flatten)
66
+ hmset(key, hash.flatten)
67
67
  end
68
68
 
69
69
  # Get the value of a hash field.
@@ -53,7 +53,7 @@ class Redis
53
53
  args << maxlen
54
54
  end
55
55
  args << id
56
- args.concat(entry.to_a.flatten)
56
+ args.concat(entry.flatten)
57
57
  send_command(args)
58
58
  end
59
59
 
@@ -152,7 +152,7 @@ class Redis
152
152
  #
153
153
  # @see #mset
154
154
  def mapped_mset(hash)
155
- mset(hash.to_a.flatten)
155
+ mset(hash.flatten)
156
156
  end
157
157
 
158
158
  # Set one or more values, only if none of the keys exist.
@@ -180,7 +180,7 @@ class Redis
180
180
  #
181
181
  # @see #msetnx
182
182
  def mapped_msetnx(hash)
183
- msetnx(hash.to_a.flatten)
183
+ msetnx(hash.flatten)
184
184
  end
185
185
 
186
186
  # Get the value of a key.
data/lib/redis/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Redis
4
- VERSION = '5.0.4'
4
+ VERSION = '5.0.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.4
4
+ version: 5.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Zygmuntowicz
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2022-09-09 00:00:00.000000000 Z
19
+ date: 2022-09-22 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: redis-client
@@ -24,14 +24,14 @@ dependencies:
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 0.7.4
27
+ version: 0.9.0
28
28
  type: :runtime
29
29
  prerelease: false
30
30
  version_requirements: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 0.7.4
34
+ version: 0.9.0
35
35
  description: |2
36
36
  A Ruby client that tries to match Redis' API one-to-one, while still
37
37
  providing an idiomatic interface.
@@ -75,9 +75,9 @@ licenses:
75
75
  metadata:
76
76
  bug_tracker_uri: https://github.com/redis/redis-rb/issues
77
77
  changelog_uri: https://github.com/redis/redis-rb/blob/master/CHANGELOG.md
78
- documentation_uri: https://www.rubydoc.info/gems/redis/5.0.4
78
+ documentation_uri: https://www.rubydoc.info/gems/redis/5.0.5
79
79
  homepage_uri: https://github.com/redis/redis-rb
80
- source_code_uri: https://github.com/redis/redis-rb/tree/v5.0.4
80
+ source_code_uri: https://github.com/redis/redis-rb/tree/v5.0.5
81
81
  post_install_message:
82
82
  rdoc_options: []
83
83
  require_paths: