bunny 1.1.1 → 1.1.2
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.
- checksums.yaml +4 -4
- data/ChangeLog.md +17 -0
- data/lib/bunny/channel.rb +2 -2
- data/lib/bunny/exchange.rb +8 -0
- data/lib/bunny/version.rb +1 -1
- data/spec/higher_level_api/integration/exchange_declare_spec.rb +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eeef6754f706470bdfc5d99e6a45287ed3cfd5c
|
4
|
+
data.tar.gz: 63fc42f3516d6eb7aeea1f1b8f420765cb5cc9ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dda47ffc1ab40a3fb23c3e2e40bf3940769437c8ade1f6a1ed64a89b185c5b02d6bc9df757a431f01a1c1fefa78f3fd2b7cdef903692b06218479c48e0b14f58
|
7
|
+
data.tar.gz: 540c1f8464d24e4b1b90152e4fb2d26d1e537fdc1cf5db5cd4855334ef0915e6460d77b847ba6bd28153aa169299746d9822e5d6ec506872112581def6d389ab
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
## Changes between Bunny 1.1.1 and 1.1.2
|
2
|
+
|
3
|
+
### Internal Exchanges
|
4
|
+
|
5
|
+
Exchanges now can be declared as internal:
|
6
|
+
|
7
|
+
``` ruby
|
8
|
+
ch = conn.create_channel
|
9
|
+
x = ch.fanout("bunny.tests.exchanges.internal", :internal => true)
|
10
|
+
```
|
11
|
+
|
12
|
+
Internal exchanges cannot be published to by clients and are solely used
|
13
|
+
for [Exchange-to-Exchange bindings](http://rabbitmq.com/e2e.html) and various
|
14
|
+
plugins but apps may still need to bind them. Now it is possible
|
15
|
+
to do so with Bunny.
|
16
|
+
|
17
|
+
|
1
18
|
## Changes between Bunny 1.1.0 and 1.1.1
|
2
19
|
|
3
20
|
### Uncaught Consumer Exceptions
|
data/lib/bunny/channel.rb
CHANGED
@@ -1115,8 +1115,8 @@ module Bunny
|
|
1115
1115
|
opts.fetch(:passive, false),
|
1116
1116
|
opts.fetch(:durable, false),
|
1117
1117
|
opts.fetch(:auto_delete, false),
|
1118
|
-
false,
|
1119
|
-
false,
|
1118
|
+
opts.fetch(:internal, false),
|
1119
|
+
false, # nowait
|
1120
1120
|
opts[:arguments]))
|
1121
1121
|
Bunny::Timeout.timeout(read_write_timeout, ClientTimeout) do
|
1122
1122
|
@last_exchange_declare_ok = wait_on_continuations
|
data/lib/bunny/exchange.rb
CHANGED
@@ -85,6 +85,7 @@ module Bunny
|
|
85
85
|
|
86
86
|
@durable = @options[:durable]
|
87
87
|
@auto_delete = @options[:auto_delete]
|
88
|
+
@internal = @options[:internal]
|
88
89
|
@arguments = @options[:arguments]
|
89
90
|
|
90
91
|
declare! unless opts[:no_declare] || predeclared? || (@name == AMQ::Protocol::EMPTY_STRING)
|
@@ -104,6 +105,12 @@ module Bunny
|
|
104
105
|
@auto_delete
|
105
106
|
end # auto_delete?
|
106
107
|
|
108
|
+
# @return [Boolean] true if this exchange is internal (used solely for exchange-to-exchange
|
109
|
+
# bindings and cannot be published to by clients)
|
110
|
+
def internal?
|
111
|
+
@internal
|
112
|
+
end
|
113
|
+
|
107
114
|
# @return [Hash] Additional optional arguments (typically used by RabbitMQ extensions and plugins)
|
108
115
|
# @api public
|
109
116
|
def arguments
|
@@ -261,6 +268,7 @@ module Bunny
|
|
261
268
|
:passive => false,
|
262
269
|
:durable => false,
|
263
270
|
:auto_delete => false,
|
271
|
+
:internal => false,
|
264
272
|
:arguments => nil
|
265
273
|
}.merge(h)
|
266
274
|
else
|
data/lib/bunny/version.rb
CHANGED
@@ -201,4 +201,27 @@ describe Bunny::Exchange do
|
|
201
201
|
end
|
202
202
|
end
|
203
203
|
end
|
204
|
+
|
205
|
+
|
206
|
+
context "that is internal" do
|
207
|
+
it "can be declared" do
|
208
|
+
ch = connection.create_channel
|
209
|
+
x = ch.fanout("bunny.tests.exchanges.internal", :internal => true)
|
210
|
+
x.should be_internal
|
211
|
+
x.delete
|
212
|
+
|
213
|
+
ch.close
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
context "not declared as internal" do
|
218
|
+
it "is not internal" do
|
219
|
+
ch = connection.create_channel
|
220
|
+
x = ch.fanout("bunny.tests.exchanges.non-internal")
|
221
|
+
x.should_not be_internal
|
222
|
+
x.delete
|
223
|
+
|
224
|
+
ch.close
|
225
|
+
end
|
226
|
+
end
|
204
227
|
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: 1.1.
|
4
|
+
version: 1.1.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: 2014-
|
15
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|