bunny 0.9.0.pre11 → 0.9.0.pre12

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: 83dfd362f0b0debb9919c5970dca6755de1d0604
4
- data.tar.gz: cc5877189c28c76efd33bc6a04cb09801b144220
3
+ metadata.gz: 9ee7de4a1d5a24771bf6fe5f7e070c6d6afd6340
4
+ data.tar.gz: 3068de841ec8bbe3368b695866430a8f3859cf5a
5
5
  SHA512:
6
- metadata.gz: 2ea6375cc2de43483d8f50ad1fcc7395ebd54b0fd590d262bf8962a2872874bd7688790fd84d65b0a71ef027a6edc44d80193232d8b13d2c7179ffbbc3108e12
7
- data.tar.gz: 97ec376b03d8cacfaa805c689da8ee5eb7f82bfce40a7f900fc055317fb314ca73c8e4f57c7d256f3ff95aa094bdfd700a35471ac19c7f13c0642ef386a3b071
6
+ metadata.gz: 8ebc06c578c1ef13ac197f44aac01f38ca469bccada8f500aaeb80a3b3e3320ce19588cdfce825b1b669e4eef48305b1d169bae22ffb94208ed25828fe4a8786
7
+ data.tar.gz: 27bf9c563f423846c0cb3402779a043b2faf8b83a82099c8b5868934a8bff0b1b3164149b3b9c2a762a41b4f1d6b6fb66c6fcf560ba5b0ad9d10ee4b3520ff34
@@ -1,3 +1,16 @@
1
+ ## Changes between Bunny 0.9.0.pre11 and 0.9.0.pre12
2
+
3
+ ### Ruby 1.8 Compatibility Regression Fix
4
+
5
+ `Bunny::Socket` no longer uses Ruby 1.9-specific constants.
6
+
7
+
8
+ ### Bunny::Channel#wait_for_confirms Return Value Regression Fix
9
+
10
+ `Bunny::Channel#wait_for_confirms` returns `true` or `false` again.
11
+
12
+
13
+
1
14
  ## Changes between Bunny 0.9.0.pre10 and 0.9.0.pre11
2
15
 
3
16
  ### Bunny::Session#create_channel Now Accepts Consumer Work Pool Size
data/README.md CHANGED
@@ -33,12 +33,12 @@ To install Bunny 0.9.x with RubyGems:
33
33
  gem install bunny --pre
34
34
  ```
35
35
 
36
- the most recent 0.9.x version is `0.9.0.pre10`.
36
+ the most recent 0.9.x version is `0.9.0.pre11`.
37
37
 
38
38
  To use Bunny 0.9.x in a project managed with Bundler:
39
39
 
40
40
  ``` ruby
41
- gem "bunny", ">= 0.9.0.pre10" # optionally: , :git => "git://github.com/ruby-amqp/bunny.git", :branch => "master"
41
+ gem "bunny", ">= 0.9.0.pre11" # optionally: , :git => "git://github.com/ruby-amqp/bunny.git", :branch => "master"
42
42
  ```
43
43
 
44
44
 
@@ -1309,6 +1309,7 @@ module Bunny
1309
1309
  # @see http://rubybunny.info/articles/extensions.html RabbitMQ Extensions guide
1310
1310
  # @api public
1311
1311
  def wait_for_confirms
1312
+ @only_acks_received = true
1312
1313
  wait_on_confirms_continuations
1313
1314
 
1314
1315
  @only_acks_received
@@ -1562,6 +1563,7 @@ module Bunny
1562
1563
 
1563
1564
  @unconfirmed_set_mutex.synchronize do
1564
1565
  @only_acks_received = (@only_acks_received && !nack)
1566
+ @logger.debug "Channel #{@id}: @only_acks_received = #{@only_acks_received.inspect}, nack: #{nack.inspect}"
1565
1567
 
1566
1568
  @confirms_continuations.push(true) if @unconfirmed_set.empty?
1567
1569
 
@@ -8,6 +8,10 @@ module Bunny
8
8
  class Socket < TCPSocket
9
9
  attr_accessor :options
10
10
 
11
+ # IO::WaitReadable is 1.9+ only
12
+ READ_RETRY_EXCEPTION_CLASSES = [Errno::EAGAIN, Errno::EWOULDBLOCK]
13
+ READ_RETRY_EXCEPTION_CLASSES << IO::WaitReadable if IO.const_defined?(:WaitReadable)
14
+
11
15
  def self.open(host, port, options = {})
12
16
  Timeout.timeout(options[:socket_timeout]) do
13
17
  sock = new(host, port)
@@ -39,7 +43,7 @@ module Bunny
39
43
  rescue EOFError
40
44
  # @eof will break Rubinius' TCPSocket implementation. MK.
41
45
  @__bunny_socket_eof_flag__ = true
42
- rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable
46
+ rescue *READ_RETRY_EXCEPTION_CLASSES
43
47
  if IO.select([self], nil, nil, timeout)
44
48
  retry
45
49
  else
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Bunny
4
- VERSION = "0.9.0.pre11"
4
+ VERSION = "0.9.0.pre12"
5
5
  end
@@ -28,7 +28,7 @@ describe Bunny::Channel do
28
28
  end
29
29
 
30
30
  ch.next_publish_seq_no.should == 501
31
- ch.wait_for_confirms
31
+ ch.wait_for_confirms.should be_true
32
32
  sleep 0.25
33
33
 
34
34
  q.message_count.should == 500
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: 0.9.0.pre11
4
+ version: 0.9.0.pre12
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: 2013-05-14 00:00:00.000000000 Z
15
+ date: 2013-05-17 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol