redis 3.3.2 → 3.3.3

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
  SHA1:
3
- metadata.gz: d74bd71d0e30d7a582b6840b4aaa45790a4a2a05
4
- data.tar.gz: 8652e243304b3fba9f041bb7ea6c85b46e54f6a1
3
+ metadata.gz: e2c3925815d6e2759b4b515f0763642ae57008c0
4
+ data.tar.gz: eb7c95f1d00b9d2e1361fe1642a25bb51d9d42ab
5
5
  SHA512:
6
- metadata.gz: c82eb96fce806b42775e86655c4a7fdf8dc87a728ee3998c67c9f5fd45c32ac8f618f14f4c7700106e8258901288e53c9b5612e0ba8ab8e089f758cf053b1e7f
7
- data.tar.gz: 1a85694ea7fced9e4c0521a1d9d081d96a02e63fe8c9455af9a5d4be7858de3576fddc869939974bac1b1143ec9592d03a60165e7d1b75a2af8ea8f060b55ef2
6
+ metadata.gz: f734dca16f3a504caeb402b26f0b20c43c89d18e279facc58d0257500e4f8eb2ead727dca33947fd526e845a18950bf299f8351135281f63fe93fc1c96643047
7
+ data.tar.gz: ee0ab1ef846235e499dc3a576ba8285c2e2e807d1c64612059e29d391418772d68cd0cc23474711015e29ec4c936d9f4305bb8a1c926dc5f53cd9d4ed0546896
@@ -12,6 +12,10 @@
12
12
  security updates in June of 2013; continuing to support it would prevent
13
13
  the use of newer features of Ruby.
14
14
 
15
+ # 3.3.3
16
+
17
+ * Improved timeout handling after dropping Timeout module.
18
+
15
19
  # 3.3.2
16
20
 
17
21
  * Added support for SPOP with COUNT. See #628.
@@ -451,12 +451,12 @@ class Redis
451
451
  case options[:tcp_keepalive]
452
452
  when Hash
453
453
  [:time, :intvl, :probes].each do |key|
454
- unless options[:tcp_keepalive][key].is_a?(Fixnum)
455
- raise "Expected the #{key.inspect} key in :tcp_keepalive to be a Fixnum"
454
+ unless options[:tcp_keepalive][key].is_a?(Integer)
455
+ raise "Expected the #{key.inspect} key in :tcp_keepalive to be an Integer"
456
456
  end
457
457
  end
458
458
 
459
- when Fixnum
459
+ when Integer
460
460
  if options[:tcp_keepalive] >= 60
461
461
  options[:tcp_keepalive] = {:time => options[:tcp_keepalive] - 20, :intvl => 10, :probes => 2}
462
462
 
@@ -27,11 +27,12 @@ class Redis
27
27
  CRLF = "\r\n".freeze
28
28
 
29
29
  # Exceptions raised during non-blocking I/O ops that require retrying the op
30
- NBIO_READ_EXCEPTIONS = [Errno::EWOULDBLOCK, Errno::EAGAIN]
31
- NBIO_WRITE_EXCEPTIONS = [Errno::EWOULDBLOCK, Errno::EAGAIN]
32
30
  if RUBY_VERSION >= "1.9.3"
33
- NBIO_READ_EXCEPTIONS << IO::WaitReadable
34
- NBIO_WRITE_EXCEPTIONS << IO::WaitWritable
31
+ NBIO_READ_EXCEPTIONS = [IO::WaitReadable]
32
+ NBIO_WRITE_EXCEPTIONS = [IO::WaitWritable]
33
+ else
34
+ NBIO_READ_EXCEPTIONS = [Errno::EWOULDBLOCK, Errno::EAGAIN]
35
+ NBIO_WRITE_EXCEPTIONS = [Errno::EWOULDBLOCK, Errno::EAGAIN]
35
36
  end
36
37
 
37
38
  def initialize(*args)
@@ -104,14 +105,14 @@ class Redis
104
105
  begin
105
106
  write_nonblock(data)
106
107
 
107
- rescue *NBIO_READ_EXCEPTIONS
108
- if IO.select([self], nil, nil, @write_timeout)
108
+ rescue *NBIO_WRITE_EXCEPTIONS
109
+ if IO.select(nil, [self], nil, @write_timeout)
109
110
  retry
110
111
  else
111
112
  raise Redis::TimeoutError
112
113
  end
113
- rescue *NBIO_WRITE_EXCEPTIONS
114
- if IO.select(nil, [self], nil, @write_timeout)
114
+ rescue *NBIO_READ_EXCEPTIONS
115
+ if IO.select([self], nil, nil, @write_timeout)
115
116
  retry
116
117
  else
117
118
  raise Redis::TimeoutError
@@ -306,6 +307,7 @@ class Redis
306
307
  raise ArgumentError, "SSL incompatible with unix sockets" if config[:ssl]
307
308
  sock = UNIXSocket.connect(config[:path], config[:connect_timeout])
308
309
  elsif config[:scheme] == "rediss" || config[:ssl]
310
+ raise ArgumentError, "This library does not support SSL on Ruby < 1.9" if RUBY_VERSION < "1.9.3"
309
311
  sock = SSLSocket.connect(config[:host], config[:port], config[:connect_timeout], config[:ssl_params])
310
312
  else
311
313
  sock = TCPSocket.connect(config[:host], config[:port], config[:connect_timeout])
@@ -1,3 +1,3 @@
1
1
  class Redis
2
- VERSION = "3.3.2"
2
+ VERSION = "3.3.3"
3
3
  end
@@ -101,7 +101,7 @@ class TestRemoteServerControlCommands < Test::Unit::TestCase
101
101
  assert_equal 1, r.object(:refcount, "list")
102
102
  encoding = r.object(:encoding, "list")
103
103
  assert "ziplist" == encoding || "quicklist" == encoding, "Wrong encoding for list"
104
- assert r.object(:idletime, "list").kind_of?(Fixnum)
104
+ assert r.object(:idletime, "list").kind_of?(Integer)
105
105
  end
106
106
 
107
107
  def test_sync
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: 3.3.2
4
+ version: 3.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Zygmuntowicz
@@ -16,20 +16,20 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2016-11-17 00:00:00.000000000 Z
19
+ date: 2017-01-23 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rake
23
23
  requirement: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "<"
25
+ - - <
26
26
  - !ruby/object:Gem::Version
27
27
  version: 11.0.0
28
28
  type: :development
29
29
  prerelease: false
30
30
  version_requirements: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "<"
32
+ - - <
33
33
  - !ruby/object:Gem::Version
34
34
  version: 11.0.0
35
35
  - !ruby/object:Gem::Dependency
@@ -56,10 +56,10 @@ executables: []
56
56
  extensions: []
57
57
  extra_rdoc_files: []
58
58
  files:
59
- - ".gitignore"
60
- - ".travis.yml"
61
- - ".travis/Gemfile"
62
- - ".yardopts"
59
+ - .gitignore
60
+ - .travis.yml
61
+ - .travis/Gemfile
62
+ - .yardopts
63
63
  - CHANGELOG.md
64
64
  - Gemfile
65
65
  - LICENSE
@@ -184,17 +184,17 @@ require_paths:
184
184
  - lib
185
185
  required_ruby_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - ">="
187
+ - - '>='
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
196
  rubyforge_project:
197
- rubygems_version: 2.5.1
197
+ rubygems_version: 2.4.6
198
198
  signing_key:
199
199
  specification_version: 4
200
200
  summary: A Ruby client library for Redis