bunny 1.4.1 → 1.5.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +1 -1
  4. data/ChangeLog.md +19 -5
  5. data/README.md +23 -3
  6. data/examples/guides/extensions/basic_nack.rb +1 -1
  7. data/examples/guides/extensions/dead_letter_exchange.rb +1 -1
  8. data/examples/guides/queues/redeliveries.rb +2 -2
  9. data/lib/bunny.rb +1 -1
  10. data/lib/bunny/channel.rb +34 -21
  11. data/lib/bunny/exceptions.rb +17 -2
  12. data/lib/bunny/exchange.rb +14 -22
  13. data/lib/bunny/queue.rb +19 -12
  14. data/lib/bunny/session.rb +67 -57
  15. data/lib/bunny/version.rb +1 -1
  16. data/spec/config/enabled_plugins +1 -0
  17. data/spec/config/rabbitmq.config +18 -0
  18. data/spec/higher_level_api/integration/basic_ack_spec.rb +29 -2
  19. data/spec/higher_level_api/integration/basic_consume_with_objects_spec.rb +1 -1
  20. data/spec/higher_level_api/integration/basic_nack_spec.rb +5 -5
  21. data/spec/higher_level_api/integration/basic_reject_spec.rb +3 -3
  22. data/spec/higher_level_api/integration/connection_recovery_spec.rb +79 -2
  23. data/spec/higher_level_api/integration/connection_spec.rb +24 -0
  24. data/spec/higher_level_api/integration/dead_lettering_spec.rb +1 -1
  25. data/spec/higher_level_api/integration/exchange_unbind_spec.rb +1 -1
  26. data/spec/higher_level_api/integration/message_properties_access_spec.rb +1 -1
  27. data/spec/issues/issue78_spec.rb +2 -2
  28. data/spec/spec_helper.rb +6 -7
  29. data/spec/tls/ca_certificate.pem +18 -0
  30. data/spec/tls/ca_key.pem +27 -0
  31. data/spec/tls/client_cert.pem +16 -16
  32. data/spec/tls/client_key.pem +25 -25
  33. data/spec/tls/server_cert.pem +16 -16
  34. data/spec/tls/server_key.pem +25 -25
  35. metadata +12 -10
  36. data/.ruby-version +0 -1
  37. data/lib/bunny/compatibility.rb +0 -24
  38. data/spec/compatibility/queue_declare_spec.rb +0 -44
  39. data/spec/compatibility/queue_declare_with_default_channel_spec.rb +0 -33
@@ -1,44 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Bunny::Queue, "backwards compatibility API" do
4
- let(:connection) do
5
- c = Bunny.new
6
- c.start
7
- c
8
- end
9
-
10
- after :all do
11
- connection.close if connection.open?
12
- end
13
-
14
- context "when queue name is specified" do
15
- let(:name) { "a queue declared at #{Time.now.to_i}" }
16
-
17
- it "declares a new queue with that name" do
18
- q = Bunny::Queue.new(connection, name)
19
- q.name.should == name
20
- end
21
- end
22
-
23
-
24
- context "when queue name is passed on as an empty string" do
25
- it "uses server-assigned queue name" do
26
- q = Bunny::Queue.new(connection, "")
27
- q.name.should_not be_empty
28
- q.name.should =~ /^amq.gen.+/
29
- q.should be_server_named
30
- q.delete
31
- end
32
- end
33
-
34
-
35
- context "when queue name is completely omitted" do
36
- it "uses server-assigned queue name" do
37
- q = Bunny::Queue.new(connection)
38
- q.name.should_not be_empty
39
- q.name.should =~ /^amq.gen.+/
40
- q.should be_server_named
41
- q.delete
42
- end
43
- end
44
- end
@@ -1,33 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Bunny::Session do
4
- let(:connection) do
5
- c = Bunny.new
6
- c.start
7
- c
8
- end
9
-
10
- after :all do
11
- connection.close if connection.open?
12
- end
13
-
14
- it "proxies #queue to the pre-opened channel for backwards compatibility" do
15
- q = connection.queue("", :exclusive => true)
16
- q.name.should =~ /^amq.gen/
17
- end
18
-
19
- it "proxies #fanout to the pre-opened channel for backwards compatibility" do
20
- x = connection.fanout("amq.fanout")
21
- x.name.should == "amq.fanout"
22
- end
23
-
24
- it "proxies #topic to the pre-opened channel for backwards compatibility" do
25
- x = connection.topic("amq.topic")
26
- x.name.should == "amq.topic"
27
- end
28
-
29
- it "proxies #direct to the pre-opened channel for backwards compatibility" do
30
- x = connection.topic("amq.direct")
31
- x.name.should == "amq.direct"
32
- end
33
- end