bunny 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +15 -5
- data/README.md +1 -1
- data/lib/bunny/transport.rb +10 -1
- data/lib/bunny/version.rb +1 -1
- data/spec/higher_level_api/integration/exclusive_queue_spec.rb +28 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad9161e606b40789a56997ff7b9b3d81f61c3d28
|
4
|
+
data.tar.gz: 22ecc57943938dcefc1fa6d798470d985b61f3ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88fe8294f3572a9f6f9c7badaf0e92428c0320ba1b9c6d4b2d10c12cb947ce606baa77ab090d73b272e4826ef16122fb0c2d8ef1fb69d5c71c46bf421f8f5e75
|
7
|
+
data.tar.gz: 6d9c2b5e8acb8012a719787c2e410972e981bea80902905f409ba433a74af866217b3ccc61e17ba33f4d47b3deb9f21d604c514cc20888a468c23fbc26d5b614
|
data/ChangeLog.md
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
-
## Changes between Bunny 0.10.
|
1
|
+
## Changes between Bunny 0.10.2 and 0.10.3
|
2
2
|
|
3
|
-
###
|
3
|
+
### Default Paths for TLS/SSL CA's on Linux
|
4
4
|
|
5
|
-
|
6
|
-
from `Bunny::Consumer#handle_cancellation`, which is now invoked in the channel's
|
7
|
-
thread pool.
|
5
|
+
Bunny now will use the following TLS/SSL CA's paths on Linux by default:
|
8
6
|
|
7
|
+
* `/etc/ssl/certs/ca-certificates.crt` on Ubuntu/Debian
|
8
|
+
* `/etc/ssl/certs/ca-bundle.crt` on Amazon Linux
|
9
|
+
* `/etc/ssl/ca-bundle.pem` on OpenSUSE
|
10
|
+
* `/etc/pki/tls/certs/ca-bundle.crt` on Fedora/RHEL
|
11
|
+
|
12
|
+
and will log a warning if no CA files are available via default paths
|
13
|
+
or `:tls_ca_certificates`.
|
14
|
+
|
15
|
+
Contributed by Carl Hörberg.
|
16
|
+
|
17
|
+
|
18
|
+
## Changes between Bunny 0.10.1 and 0.10.2
|
9
19
|
|
10
20
|
### Consumers Can Be Re-Registered From Bunny::Consumer#handle_cancellation
|
11
21
|
|
data/README.md
CHANGED
data/lib/bunny/transport.rb
CHANGED
@@ -41,7 +41,12 @@ module Bunny
|
|
41
41
|
@tls_certificate = opts[:tls_certificate] || opts[:ssl_cert_string]
|
42
42
|
@tls_key = opts[:tls_key] || opts[:ssl_key_string]
|
43
43
|
@tls_certificate_store = opts[:tls_certificate_store]
|
44
|
-
@tls_ca_certificates = opts.fetch(:tls_ca_certificates, [
|
44
|
+
@tls_ca_certificates = opts.fetch(:tls_ca_certificates, [
|
45
|
+
'/etc/ssl/certs/ca-certificates.crt', # Ubuntu/Debian
|
46
|
+
'/etc/ssl/certs/ca-bundle.crt', # Amazon Linux
|
47
|
+
'/etc/ssl/ca-bundle.pem', # OpenSUSE
|
48
|
+
'/etc/pki/tls/certs/ca-bundle.crt' # Fedora/RHEL
|
49
|
+
])
|
45
50
|
@verify_peer = opts[:verify_ssl] || opts[:verify_peer]
|
46
51
|
|
47
52
|
@read_write_timeout = opts[:socket_timeout] || 3
|
@@ -339,6 +344,10 @@ module Bunny
|
|
339
344
|
end
|
340
345
|
|
341
346
|
def initialize_tls_certificate_store(certs)
|
347
|
+
certs = certs.select { |path| File.readable? path }
|
348
|
+
if certs.empty?
|
349
|
+
@logger.error "No CA certificates found, add one with :tls_ca_certificates"
|
350
|
+
end
|
342
351
|
OpenSSL::X509::Store.new.tap do |store|
|
343
352
|
certs.each { |path| store.add_file(path) }
|
344
353
|
end
|
data/lib/bunny/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Bunny::Queue do
|
4
|
+
let(:connection) do
|
5
|
+
c = Bunny.new(:user => "bunny_gem", :password => "bunny_password", :vhost => "bunny_testbed")
|
6
|
+
c.start
|
7
|
+
c
|
8
|
+
end
|
9
|
+
|
10
|
+
after :each do
|
11
|
+
connection.close if connection.open?
|
12
|
+
end
|
13
|
+
|
14
|
+
it "is closed when the connection it was declared on is closed" do
|
15
|
+
ch1 = connection.create_channel
|
16
|
+
ch2 = connection.create_channel
|
17
|
+
q = ch1.queue("", :exclusive => true)
|
18
|
+
|
19
|
+
ch1.queue_declare(q.name, :passive => true)
|
20
|
+
ch2.queue_declare(q.name, :passive => true)
|
21
|
+
|
22
|
+
ch1.close
|
23
|
+
ch2.queue_declare(q.name, :passive => true)
|
24
|
+
|
25
|
+
ch2.queue_delete(q.name)
|
26
|
+
ch2.close
|
27
|
+
end
|
28
|
+
end
|
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.10.
|
4
|
+
version: 0.10.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: 2013-08-
|
15
|
+
date: 2013-08-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- spec/higher_level_api/integration/exchange_declare_spec.rb
|
153
153
|
- spec/higher_level_api/integration/exchange_delete_spec.rb
|
154
154
|
- spec/higher_level_api/integration/exchange_unbind_spec.rb
|
155
|
+
- spec/higher_level_api/integration/exclusive_queue_spec.rb
|
155
156
|
- spec/higher_level_api/integration/heartbeat_spec.rb
|
156
157
|
- spec/higher_level_api/integration/merry_go_round_spec.rb
|
157
158
|
- spec/higher_level_api/integration/message_properties_access_spec.rb
|
@@ -243,6 +244,7 @@ test_files:
|
|
243
244
|
- spec/higher_level_api/integration/exchange_declare_spec.rb
|
244
245
|
- spec/higher_level_api/integration/exchange_delete_spec.rb
|
245
246
|
- spec/higher_level_api/integration/exchange_unbind_spec.rb
|
247
|
+
- spec/higher_level_api/integration/exclusive_queue_spec.rb
|
246
248
|
- spec/higher_level_api/integration/heartbeat_spec.rb
|
247
249
|
- spec/higher_level_api/integration/merry_go_round_spec.rb
|
248
250
|
- spec/higher_level_api/integration/message_properties_access_spec.rb
|