bunny 2.6.2 → 2.6.3

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
  SHA1:
3
- metadata.gz: a408c8cc518f3c5eda506652d04b7791df76836d
4
- data.tar.gz: bb55d125ab3558d5c21292f10e9999a5b6d12a6e
3
+ metadata.gz: 09f8221a4c018999983c6ff9d805866d2a2fe31e
4
+ data.tar.gz: 285410a65a2ff20efcafabc1ea3528584c8baf23
5
5
  SHA512:
6
- metadata.gz: fef4df3286150c5baca2823526187fc3cec59a41bf54ac23cbac9a58964070882a17866208d1232f8812742647473729b499429bb1fd6ebe9ffcb4676d34c54b
7
- data.tar.gz: c7846c6d797c577fb4e34997bf68b4e490893d2e02b12b4e40b5870ab6b028aebdc091be637c4603e8e9d6640bdb14a1cc7056d5cfd5a3335baa33768962c25b
6
+ metadata.gz: dd0a5fd69a7c527b6db252cf903fe3e84967ab07053880c954379f1476004546871acf34959f47e5662bdc701077940ff945d46fb3340f7cc0f7d471696c9230
7
+ data.tar.gz: 023e1c74e51481e9cae6dbb3014b84e2d397a25234cb225424de62df3340b1d83ed82d2d0f170c6304d5a99d7bfb7ab095e4a7e58db86bbaf529632b6f97f4b3
@@ -1,8 +1,17 @@
1
- ## Changes between Bunny 2.6.1 and 2.6.2 (unreleased)
1
+ ## Changes between Bunny 2.6.2 and 2.6.3 (unreleased)
2
2
 
3
3
  No changes yet.
4
4
 
5
5
 
6
+ ## Changes between Bunny 2.6.1 and 2.6.2 (December 17th, 2016)
7
+
8
+ ### Do Not Modify Host Arrays
9
+
10
+ Bunny now can work with frozen host arrays.
11
+
12
+ GitHub issue: [#446](https://github.com/ruby-amqp/bunny/issues/446)
13
+
14
+
6
15
 
7
16
  ## Changes between Bunny 2.6.0 and 2.6.1 (October 23rd, 2016)
8
17
 
@@ -9,8 +9,21 @@ module Bunny
9
9
  module Socket
10
10
  attr_accessor :options
11
11
 
12
- READ_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable]
13
- WRITE_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable]
12
+ READ_RETRY_EXCEPTION_CLASSES = if defined?(IO::EAGAINWaitReadable)
13
+ # Ruby 2.1+
14
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable,
15
+ IO::EAGAINWaitReadable, IO::EWOULDBLOCKWaitReadable]
16
+ else
17
+ # 2.0
18
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable]
19
+ end
20
+ WRITE_RETRY_EXCEPTION_CLASSES = if defined?(IO::EAGAINWaitWritable)
21
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable,
22
+ IO::EAGAINWaitWritable, IO::EWOULDBLOCKWaitWritable]
23
+ else
24
+ # 2.0
25
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable]
26
+ end
14
27
 
15
28
  def self.open(host, port, options = {})
16
29
  socket = ::Socket.tcp(host, port, nil, nil,
@@ -8,8 +8,21 @@ module Bunny
8
8
  # methods found in Bunny::Socket.
9
9
  class SSLSocket < OpenSSL::SSL::SSLSocket
10
10
 
11
- READ_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable]
12
- WRITE_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable]
11
+ READ_RETRY_EXCEPTION_CLASSES = if defined?(IO::EAGAINWaitReadable)
12
+ # Ruby 2.1+
13
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable,
14
+ IO::EAGAINWaitReadable, IO::EWOULDBLOCKWaitReadable]
15
+ else
16
+ # 2.0
17
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable]
18
+ end
19
+ WRITE_RETRY_EXCEPTION_CLASSES = if defined?(IO::EAGAINWaitWritable)
20
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable,
21
+ IO::EAGAINWaitWritable, IO::EWOULDBLOCKWaitWritable]
22
+ else
23
+ # 2.0
24
+ [Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitWritable]
25
+ end
13
26
 
14
27
  # Reads given number of bytes with an optional timeout
15
28
  #
@@ -209,7 +209,7 @@ module Bunny
209
209
  end
210
210
 
211
211
  if (options[:host] || options[:hostname]) && (options[:hosts] || options[:addresses])
212
- @logger.warn "The connection options contain both a host and an array of hosts, the single host is ignored."
212
+ @logger.warn "Connection options contain both a host and an array of hosts (addresses), please pick one."
213
213
  end
214
214
  end
215
215
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "2.6.2"
5
+ VERSION = "2.6.3"
6
6
  end
@@ -282,8 +282,7 @@ describe Bunny::Session do
282
282
 
283
283
  it "logs a warning when there is a single host and an array" do
284
284
  described_class.new(addresses: [address], host: host, logger: logger)
285
- expect(io.string).to include 'WARN -- : The connection options contain '\
286
- 'both a host and an array of hosts, the single host is ignored.'
285
+ expect(io.string).to match(/both a host and an array of hosts/)
287
286
  end
288
287
 
289
288
  it "converts hosts in addresses to addresses" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Duncan
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-12-17 00:00:00.000000000 Z
15
+ date: 2017-01-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol