bunny 2.12.0 → 2.12.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: 24b8d9a2421af8117f8f4f1d51949cc990823754e360efd718f7f4f3b9fa3564
4
- data.tar.gz: 81757ab16c040ef1fdd69a9f602845c16e3d42725cbe229e0fa76c6bf9911376
3
+ metadata.gz: 1f6ae1527a8256fe3ca04baa753aae5548c9f139aa1b0e61b9050cc9494025ba
4
+ data.tar.gz: a7ab97f6fabc3a2c87756d21e6cba49654fef874025cf2e4666c2ed04a49d0c7
5
5
  SHA512:
6
- metadata.gz: 4fa2762642da8b0a916832425605a11e76fd4451b3996eaa7a947a41161597f0353b3be7ba860ca86a63a35820356dccc6f3b050e24d5577b4ae1e53a55e2d17
7
- data.tar.gz: 461ab750880c2767ddaea80927a0154b9ea7d6da5c15aec4a3ad0f1d2177ffb3e77fa89a92c106c61669376a9164cbd8e86fdc460c6780177f7f854b45773b49
6
+ metadata.gz: 8ecbda36d7c188f96ae54229c42d7b8258936c227742847a1eefc2b6b43da15714e803bf6c66bcd3fa561701a291a694ddaa8d982dd2756b95452db0fb3bb4f5
7
+ data.tar.gz: 47712973e6f513f4dcd476bf351c812ebf9568e85c0f8695b0fde923ecf5e2432a705d67639a6832745e2c5730f6a29a345545a62293e8242d475948ff0a10a4
@@ -1,8 +1,25 @@
1
- ## Changes between Bunny 2.12.0 and 2.13.0 (unreleased)
1
+ ## Changes between Bunny 2.12.1 and 2.12.2 (unreleased)
2
2
 
3
3
  No changes yet.
4
4
 
5
5
 
6
+ ## Changes between Bunny 2.12.0 and 2.12.1 (Dec 3rd, 2018)
7
+
8
+ ### More Defensive `Bunny::Channel` Method(s)
9
+
10
+ `Bunny::Channel#queue` will now throw an `ArgumentError` if a `nil`
11
+ is passed for queue name.
12
+
13
+ GitHub issue: [#570](https://github.com/ruby-amqp/bunny/issues/570)
14
+
15
+ ### Correct Logging of Recovery Attempts Left
16
+
17
+ During connection recovery, if `recover_attempts` is not set (is `nil`)
18
+ connection could produce confusing log messages.
19
+
20
+ GitHub issue: [#569](https://github.com/ruby-amqp/bunny/issues/569)
21
+
22
+
6
23
  ## Changes between Bunny 2.11.0 and 2.12.0 (Sep 22nd, 2018)
7
24
 
8
25
  ### More Defensive Treatment of `queue.declare-ok` Responses
@@ -41,6 +58,16 @@ GitHub issue: [#559](https://github.com/ruby-amqp/bunny/issues/559)
41
58
 
42
59
  Contributed by Scott Bonebraker.
43
60
 
61
+ ### Correct Connection State on Connections that Experienced Missed Heartbeat
62
+
63
+ Connections that experienced connection closure did not always correctly transition to the closed state.
64
+ `Bunny::ConnectionClosedError` will now be thrown when an operation is attempted on such
65
+ connections.
66
+
67
+ GitHub issue: [#561](https://github.com/ruby-amqp/bunny/issues/561)
68
+
69
+ Contributed by Scott Bonebraker.
70
+
44
71
  ### Connection Recovery Will Fail When Max Retry Attempt Limit is Exceeded
45
72
 
46
73
  GitHub issue: [#549](https://github.com/ruby-amqp/bunny/issues/549)
data/Gemfile CHANGED
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  group :test do
37
37
  gem "rspec", "~> 3.5.0"
38
- gem "rabbitmq_http_api_client", "~> 1.9.1", require: "rabbitmq/http/client"
38
+ gem "rabbitmq_http_api_client", "~> 1.10.0", require: "rabbitmq/http/client"
39
39
  gem "toxiproxy", "~> 1.0.3"
40
40
  end
41
41
 
@@ -415,6 +415,8 @@ module Bunny
415
415
  # @see http://rubybunny.info/articles/extensions.html RabbitMQ Extensions guide
416
416
  # @api public
417
417
  def queue(name = AMQ::Protocol::EMPTY_STRING, opts = {})
418
+ throw ArgumentError.new("queue name must not be nil") if name.nil?
419
+
418
420
  q = find_queue(name) || Bunny::Queue.new(self, name, opts)
419
421
 
420
422
  register_queue(q)
@@ -772,8 +772,10 @@ module Bunny
772
772
 
773
773
  # @private
774
774
  def decrement_recovery_attemp_counter!
775
- @recovery_attempts -= 1 if @recovery_attempts
776
- @logger.debug "#{@recovery_attempts} recovery attempts left"
775
+ if @recovery_attempts
776
+ @recovery_attempts -= 1
777
+ @logger.debug "#{@recovery_attempts} recovery attempts left"
778
+ end
777
779
  @recovery_attempts
778
780
  end
779
781
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "2.12.0"
5
+ VERSION = "2.12.1"
6
6
  end
@@ -36,7 +36,7 @@ describe Bunny::Queue do
36
36
  end
37
37
 
38
38
 
39
- context "when queue name is passed on as an empty string" do
39
+ context "when queue name is passed as an empty string" do
40
40
  it "uses server-assigned queue name" do
41
41
  ch = connection.create_channel
42
42
 
@@ -51,6 +51,17 @@ describe Bunny::Queue do
51
51
  end
52
52
 
53
53
 
54
+ context "when a nil is passed for queue name" do
55
+ it "throws an error" do
56
+ ch = connection.create_channel
57
+
58
+ expect {
59
+ ch.queue(nil, durable: true, auto_delete: false)
60
+ }.to raise_error(ArgumentError)
61
+ end
62
+ end
63
+
64
+
54
65
  context "when queue is declared as durable" do
55
66
  it "declares it as durable" do
56
67
  ch = connection.create_channel
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.12.0
4
+ version: 2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Duncan
@@ -12,28 +12,28 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2018-09-22 00:00:00.000000000 Z
15
+ date: 2018-12-03 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol
19
19
  requirement: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - "~>"
22
- - !ruby/object:Gem::Version
23
- version: '2.3'
24
21
  - - ">="
25
22
  - !ruby/object:Gem::Version
26
23
  version: 2.3.0
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.3'
27
27
  type: :runtime
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.3'
34
31
  - - ">="
35
32
  - !ruby/object:Gem::Version
36
33
  version: 2.3.0
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: '2.3'
37
37
  description: Easy to use, feature complete Ruby client for RabbitMQ 3.3 and later
38
38
  versions.
39
39
  email:
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  version: '0'
242
242
  requirements: []
243
243
  rubyforge_project:
244
- rubygems_version: 2.7.7
244
+ rubygems_version: 2.7.8
245
245
  signing_key:
246
246
  specification_version: 4
247
247
  summary: Popular easy to use Ruby client for RabbitMQ