bunny 2.2.1 → 2.2.2

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: ec4f4235cbef8ebc88c1e366750efbdb3dc3180c
4
- data.tar.gz: 5830cd9d2963966ddedf99687aaeca4196e551c0
3
+ metadata.gz: cee8bb663b9c828e0e82293ad144c29119114e94
4
+ data.tar.gz: f1186b143dde46b7a64ca23dfe664ca2daf04d09
5
5
  SHA512:
6
- metadata.gz: 3befb1f605b26c85039b2dc5d75984175974485daf424b7464943946d02080fc30afac91b5cf78195069c8c3b484310156de2be059c03bb402290b931c756c0d
7
- data.tar.gz: 3a9f602f0f6d73b0e96daccaec68d1d96a4e08b67adc4e55c3e408b8c81ac9a200798c466eeda88676da60aa905dde48ba2aa90dbdac7b5c7cba1e47fdcd83e4
6
+ metadata.gz: 6ef4487153f5b27349a6a93bf3248acbf3da3bbe8359ae786542fced024227bec545b23323cc939ec85e43da934891d98a50657b479ecd837b97062800c21cd1
7
+ data.tar.gz: 36698772a5428eb1c3ff7c5ce877c95529e93aaf207eab6afa8e068f161e9824841c852fbe9751a485d34bdc9e7b1d7d4b4e5d83eb59788c9e4544a06a480f03
@@ -1,3 +1,11 @@
1
+ ## Changes between Bunny 2.2.1 and 2.2.2
2
+
3
+ ### amq-protocol Update
4
+
5
+ Minimum `amq-protocol` version is now `2.0.1` which includes
6
+ bug fixes.
7
+
8
+
1
9
  ## Changes between Bunny 2.2.0 and 2.2.1
2
10
 
3
11
  ### No TLS Socket Double-init
data/Gemfile CHANGED
@@ -32,8 +32,8 @@ group :development do
32
32
  end
33
33
 
34
34
  group :test do
35
- gem "rspec", "~> 3.2.0"
36
- gem "rabbitmq_http_api_client", "~> 1.2.0"
35
+ gem "rspec", "~> 3.4.0"
36
+ gem "rabbitmq_http_api_client", "~> 1.6.0"
37
37
  end
38
38
 
39
39
  gemspec
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.email = ["michael.s.klishin@gmail.com"]
25
25
 
26
26
  # Dependencies
27
- s.add_dependency "amq-protocol", ">= 2.0.0"
27
+ s.add_dependency "amq-protocol", ">= 2.0.1"
28
28
 
29
29
  # Files.
30
30
  s.has_rdoc = true
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "2.2.1"
5
+ VERSION = "2.2.2"
6
6
  end
@@ -63,27 +63,34 @@ unless ENV["CI"]
63
63
  end
64
64
 
65
65
  def ensure_queue_recovery(ch, q)
66
+ ch.confirm_select
66
67
  q.purge
67
68
  x = ch.default_exchange
68
69
  x.publish("msg", :routing_key => q.name)
70
+ ch.wait_for_confirms
69
71
  sleep 0.5
70
72
  expect(q.message_count).to eq 1
71
73
  q.purge
72
74
  end
73
75
 
74
- def ensure_queue_binding_recovery(x, q, routing_key = "")
76
+ def ensure_queue_binding_recovery(ch, x, q, routing_key = "")
77
+ ch.confirm_select
75
78
  q.purge
76
79
  x.publish("msg", :routing_key => routing_key)
80
+ ch.wait_for_confirms
77
81
  sleep 0.5
78
82
  expect(q.message_count).to eq 1
79
83
  q.purge
80
84
  end
81
85
 
82
86
  def ensure_exchange_binding_recovery(ch, source, destination, routing_key = "")
87
+ ch.confirm_select
83
88
  q = ch.queue("", :exclusive => true)
84
89
  q.bind(destination, :routing_key => routing_key)
85
90
 
86
91
  source.publish("msg", :routing_key => routing_key)
92
+ ch.wait_for_confirms
93
+ sleep 0.5
87
94
  expect(q.message_count).to eq 1
88
95
  q.delete
89
96
  end
@@ -273,7 +280,7 @@ unless ENV["CI"]
273
280
 
274
281
  wait_for_recovery
275
282
  expect(ch).to be_open
276
- ensure_queue_binding_recovery(x, q)
283
+ ensure_queue_binding_recovery(ch, x, q)
277
284
  end
278
285
  end
279
286
 
@@ -136,6 +136,34 @@ describe Bunny::Queue do
136
136
  end
137
137
 
138
138
 
139
+ context "when queue is declared with priorities" do
140
+ let(:args) do
141
+ {"x-max-priority" => 5}
142
+ end
143
+
144
+ it "enables priority implementation" do
145
+ ch = connection.create_channel
146
+ ch.confirm_select
147
+
148
+ q = ch.queue("bunny.tests.queues.with-arguments.priority", :arguments => args, :exclusive => true)
149
+ expect(q.arguments).to eq args
150
+
151
+ q.publish("xyzzy")
152
+ ch.wait_for_confirms
153
+ sleep 0.1
154
+
155
+ # this test only does sanity checking,
156
+ # without trying to actually test prioritisation.
157
+ #
158
+ # added to guard against issues such as
159
+ # https://github.com/rabbitmq/rabbitmq-server/issues/488
160
+ expect(q.message_count).to eq 1
161
+
162
+ ch.close
163
+ end
164
+ end
165
+
166
+
139
167
  describe "#queue_exists?" do
140
168
  context "when a queue exists" do
141
169
  it "returns true" 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.2.1
4
+ version: 2.2.2
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: 2015-11-01 00:00:00.000000000 Z
15
+ date: 2015-12-17 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol
@@ -20,14 +20,14 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.0.0
23
+ version: 2.0.1
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: 2.0.0
30
+ version: 2.0.1
31
31
  description: Easy to use, feature complete Ruby client for RabbitMQ 3.3 and later
32
32
  versions.
33
33
  email: