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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5f79488e6b65537ea12c2a0675e23f22b954f04
4
- data.tar.gz: ececfcb8dc3374af17d6a2e9265a6b4a1fa02d8a
3
+ metadata.gz: ad9161e606b40789a56997ff7b9b3d81f61c3d28
4
+ data.tar.gz: 22ecc57943938dcefc1fa6d798470d985b61f3ba
5
5
  SHA512:
6
- metadata.gz: 39577f8e482fc0fdbd727077c82747a262f97967c3e8e8027a410a2bc08cf41cf45edd46f383c1128f308c40c4602ecfaf64d56323cba3d8528582706f3ee292
7
- data.tar.gz: c22ca1d276aaa7d9dd992040366dcb3d27179dadc10c7204de1e2e75a8f641de955755a0118feb874507e9c3ee7a883a361787251fdea8834c59647cb7fc4719
6
+ metadata.gz: 88fe8294f3572a9f6f9c7badaf0e92428c0320ba1b9c6d4b2d10c12cb947ce606baa77ab090d73b272e4826ef16122fb0c2d8ef1fb69d5c71c46bf421f8f5e75
7
+ data.tar.gz: 6d9c2b5e8acb8012a719787c2e410972e981bea80902905f409ba433a74af866217b3ccc61e17ba33f4d47b3deb9f21d604c514cc20888a468c23fbc26d5b614
@@ -1,11 +1,21 @@
1
- ## Changes between Bunny 0.10.1 and 0.10.2
1
+ ## Changes between Bunny 0.10.2 and 0.10.3
2
2
 
3
- ### Consumers Can Be Re-Registered From Bunny::Consumer#handle_cancellation
3
+ ### Default Paths for TLS/SSL CA's on Linux
4
4
 
5
- It is now possible to re-register a consumer (and use any other synchronous methods)
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
@@ -90,7 +90,7 @@ gem install bunny
90
90
  To use Bunny in a project managed with Bundler:
91
91
 
92
92
  ``` ruby
93
- gem "bunny", ">= 0.10.0"
93
+ gem "bunny", ">= 0.10.2"
94
94
  ```
95
95
 
96
96
 
@@ -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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "0.10.2"
5
+ VERSION = "0.10.3"
6
6
  end
@@ -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.2
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-10 00:00:00.000000000 Z
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