celldee-bunny 0.0.7 → 0.0.8
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.
- data/README.markdown +8 -3
- data/spec/exchange_spec.rb +0 -8
- metadata +1 -1
data/README.markdown
CHANGED
|
@@ -6,15 +6,20 @@ Google Group: [bunny-amqp](http://groups.google.com/group/bunny-amqp)
|
|
|
6
6
|
|
|
7
7
|
**IMPORTANT**
|
|
8
8
|
|
|
9
|
-
The Exchange#initialize method
|
|
9
|
+
The Exchange#initialize method arguments have changed as of version 0.0.7
|
|
10
10
|
|
|
11
11
|
You now create an exchange like this -
|
|
12
12
|
|
|
13
13
|
b = Bunny.new
|
|
14
|
-
exch = b.exchange('
|
|
14
|
+
exch = b.exchange('my_exchange', :type => :fanout)
|
|
15
15
|
|
|
16
16
|
If you do not specify a :type option then a default of :direct is used.
|
|
17
17
|
|
|
18
|
+
The old way was -
|
|
19
|
+
|
|
20
|
+
b = Bunny.new
|
|
21
|
+
exch = b.exchange(:fanout, 'my_exchange')
|
|
22
|
+
|
|
18
23
|
## About
|
|
19
24
|
|
|
20
25
|
*Bunny* is an [AMQP](http://www.amqp.org) (Advanced Message Queuing Protocol) client, written in Ruby, that is intended to allow you to interact with AMQP-compliant message brokers/servers such as [RabbitMQ](http://www.rabbitmq.com) in a synchronous fashion.
|
|
@@ -71,7 +76,7 @@ Bunny#stop
|
|
|
71
76
|
### Create a Queue
|
|
72
77
|
Bunny#queue(_**name**_, {_options_})
|
|
73
78
|
|
|
74
|
-
###
|
|
79
|
+
### Create an Exchange
|
|
75
80
|
Bunny#exchange(_**name**_, {_options_})
|
|
76
81
|
|
|
77
82
|
### Return connection status ('CONNECTED' or 'NOT CONNECTED')
|
data/spec/exchange_spec.rb
CHANGED
|
@@ -51,14 +51,6 @@ describe Exchange do
|
|
|
51
51
|
@b.exchanges.has_key?('fanout_exchange').should be true
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
-
it "should be able to be instantiated as a headers exchange" do
|
|
55
|
-
exch = @b.exchange('head_exchange', :type => :headers)
|
|
56
|
-
exch.should be_an_instance_of Exchange
|
|
57
|
-
exch.name.should == 'head_exchange'
|
|
58
|
-
exch.type.should == :headers
|
|
59
|
-
@b.exchanges.has_key?('head_exchange').should be true
|
|
60
|
-
end
|
|
61
|
-
|
|
62
54
|
it "should be able to publish a message" do
|
|
63
55
|
exch = @b.exchange('direct_exchange')
|
|
64
56
|
exch.publish('This is a published message')
|