rabbitmq_http_api_client 1.3.0 → 1.4.0
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 +20 -0
- data/Gemfile +1 -1
- data/README.md +3 -7
- data/lib/rabbitmq/http/client.rb +3 -2
- data/lib/rabbitmq/http/client/version.rb +1 -1
- data/rabbitmq_http_api_client.gemspec +2 -2
- data/spec/integration/client_spec.rb +13 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1804b5a58f15be23377604aa4ded51161a53f5d5
|
4
|
+
data.tar.gz: bc32d5b90c2a6706a407a61dcfedb3d3e927cf7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3af37ad9375df0de92c1728e36cc1c57f47eafc06b684175b57612c095aca0121e924a269b2a39aa8a7cdd5361494541ac0d2a8c2b937ed24328818fd532b777
|
7
|
+
data.tar.gz: 96ef7bd174555bac699ff7e094a0a0a13d55a14af8fb3c72e820823656448eec82e1935ca7164e4ea4d707e4a7c881cebf0be0ae9cae66641b9453af1210f082
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
## Changes Between 1.3.0 and 1.4.0
|
2
|
+
|
3
|
+
### Protocol Ports for Non-Administrators
|
4
|
+
|
5
|
+
`Client#protocol_ports` no longer fails with a nil pointer exception
|
6
|
+
for non-administrators.
|
7
|
+
|
8
|
+
### Hashi Upgrade
|
9
|
+
|
10
|
+
The library now depends on `hashie ~> 3.2`.
|
11
|
+
|
12
|
+
Contributed by Damon Morgan.
|
13
|
+
|
14
|
+
### MultiJSON Upgrade
|
15
|
+
|
16
|
+
The library now depends on `multi_json ~> 1.9`.
|
17
|
+
|
18
|
+
Contributed by Damon Morgan.
|
19
|
+
|
20
|
+
|
1
21
|
## Changes Between 1.2.0 and 1.3.0
|
2
22
|
|
3
23
|
### Faraday Upgrade
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -18,14 +18,10 @@ and will support more HTTP API features in the future
|
|
18
18
|
|
19
19
|
## Supported Ruby Versions
|
20
20
|
|
21
|
-
*
|
22
|
-
* MRI 2.0
|
23
|
-
* MRI 1.9.3
|
21
|
+
* CRuby 1.8.7 through 2.2.x
|
24
22
|
* JRuby 1.7+
|
25
23
|
* Rubinius 2.0+
|
26
|
-
|
27
|
-
* MRI 1.8.7
|
28
|
-
|
24
|
+
|
29
25
|
## Supported RabbitMQ Versions
|
30
26
|
|
31
27
|
* RabbitMQ 3.x
|
@@ -37,7 +33,7 @@ All versions require [RabbitMQ Management UI plugin](http://www.rabbitmq.com/man
|
|
37
33
|
|
38
34
|
Add this line to your application's Gemfile:
|
39
35
|
|
40
|
-
gem 'rabbitmq_http_api_client', '>= 1.
|
36
|
+
gem 'rabbitmq_http_api_client', '>= 1.3.0'
|
41
37
|
|
42
38
|
And then execute:
|
43
39
|
|
data/lib/rabbitmq/http/client.rb
CHANGED
@@ -56,7 +56,7 @@ module RabbitMQ
|
|
56
56
|
#
|
57
57
|
# @return [Hash<String, Integer>] Hash of protocol => port
|
58
58
|
def protocol_ports
|
59
|
-
self.overview.listeners.
|
59
|
+
(self.overview.listeners || []).
|
60
60
|
reduce(Hash.new) { |acc, lnr| acc[lnr.protocol] = lnr.port; acc }
|
61
61
|
end
|
62
62
|
|
@@ -172,7 +172,8 @@ module RabbitMQ
|
|
172
172
|
end
|
173
173
|
|
174
174
|
def purge_queue(vhost, name)
|
175
|
-
|
175
|
+
@connection.delete("/api/queues/#{uri_encode(vhost)}/#{uri_encode(name)}/contents")
|
176
|
+
Hashie::Mash.new
|
176
177
|
end
|
177
178
|
|
178
179
|
def get_messages(vhost, name, options)
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
|
-
gem.add_dependency "hashie", "~> 2
|
22
|
-
gem.add_dependency "multi_json", "~> 1.
|
21
|
+
gem.add_dependency "hashie", "~> 3.2"
|
22
|
+
gem.add_dependency "multi_json", "~> 1.9"
|
23
23
|
gem.add_dependency "faraday", "~> 0.9.0"
|
24
24
|
gem.add_dependency "faraday_middleware", "~> 0.9.0"
|
25
25
|
gem.add_dependency "effin_utf8", "~> 1.0.0"
|
@@ -274,6 +274,10 @@ describe RabbitMQ::HTTP::Client do
|
|
274
274
|
@channel = @connection.create_channel
|
275
275
|
end
|
276
276
|
|
277
|
+
after :all do
|
278
|
+
@channel.close
|
279
|
+
end
|
280
|
+
|
277
281
|
let(:exchange_name) { "httpdeclared" }
|
278
282
|
|
279
283
|
it "declares an exchange" do
|
@@ -289,10 +293,14 @@ describe RabbitMQ::HTTP::Client do
|
|
289
293
|
@channel = @connection.create_channel
|
290
294
|
end
|
291
295
|
|
296
|
+
after :all do
|
297
|
+
@channel.close
|
298
|
+
end
|
299
|
+
|
292
300
|
let(:exchange_name) { "httpdeclared" }
|
293
301
|
|
294
302
|
it "deletes an exchange" do
|
295
|
-
x = @channel.
|
303
|
+
x = @channel.fanout(exchange_name, :durable => false)
|
296
304
|
subject.delete_exchange("/", exchange_name)
|
297
305
|
end
|
298
306
|
end
|
@@ -303,6 +311,10 @@ describe RabbitMQ::HTTP::Client do
|
|
303
311
|
@channel = @connection.create_channel
|
304
312
|
end
|
305
313
|
|
314
|
+
after :all do
|
315
|
+
@channel.close
|
316
|
+
end
|
317
|
+
|
306
318
|
it "returns a list of all bindings in which the given exchange is the source" do
|
307
319
|
e = @channel.fanout("http.api.tests.fanout", :durable => true)
|
308
320
|
q = @channel.queue("http.api.tests.queue1", :durable => true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbitmq_http_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klishin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2
|
19
|
+
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2
|
26
|
+
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: '1.9'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: '1.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faraday
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.4.5
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: RabbitMQ HTTP API client for Ruby
|