bunny 1.1.1 → 1.1.2

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: 549beacd9dcbe811dd5ad11c61efa51746eda01f
4
- data.tar.gz: ed9a4c5d128c707122504fdfdae94556794d5633
3
+ metadata.gz: 3eeef6754f706470bdfc5d99e6a45287ed3cfd5c
4
+ data.tar.gz: 63fc42f3516d6eb7aeea1f1b8f420765cb5cc9ce
5
5
  SHA512:
6
- metadata.gz: c3c90fb4df6a1ae0edff196e9b4cea4f2c7fc424b184dc6bc3b4215af3f01149442c57fd3eea2d857b733c05ebb2eb0d7530bb704fb55a50d832422a16a616bd
7
- data.tar.gz: 87b6dc534478f963b80a82b06a4ccfbfb21bbbc01ee07c580e525bda26e0c86969d6b64890bac8afcd1b456f632b8edd537f61eca2fdf6dbf644453f99e5cdba
6
+ metadata.gz: dda47ffc1ab40a3fb23c3e2e40bf3940769437c8ade1f6a1ed64a89b185c5b02d6bc9df757a431f01a1c1fefa78f3fd2b7cdef903692b06218479c48e0b14f58
7
+ data.tar.gz: 540c1f8464d24e4b1b90152e4fb2d26d1e537fdc1cf5db5cd4855334ef0915e6460d77b847ba6bd28153aa169299746d9822e5d6ec506872112581def6d389ab
@@ -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
@@ -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
@@ -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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Bunny
4
4
  # @return [String] Version of the library
5
- VERSION = "1.1.1"
5
+ VERSION = "1.1.2"
6
6
  end
@@ -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.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-01-30 00:00:00.000000000 Z
15
+ date: 2014-02-04 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: amq-protocol