rabbitmq_http_api_client 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -1
- data/.travis.yml +1 -1
- data/ChangeLog.md +27 -0
- data/README.md +1 -1
- data/lib/rabbitmq/http/client.rb +7 -3
- data/lib/rabbitmq/http/client/version.rb +1 -1
- data/rabbitmq_http_api_client.gemspec +1 -1
- data/spec/integration/client_spec.rb +14 -0
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee146762bb320bc627e4ce1cf56a603060a6b8dc
|
4
|
+
data.tar.gz: 294fff5dd6fbe4fd0aab4d2ef187b50edbb72fcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30b20681cbf87269c63fa4a243fdb9c7f482be9e3042e70cafa12b69948b70626e905faaeb4aa99ab6daf375a10379f50e6b21e103e0d2317663160a3c60989a
|
7
|
+
data.tar.gz: 9ad2cf2991f8f4d4691cce32a3f1a93158436cb03c76f86ee3a95b7c0d83c566618af93841eb0589142c25fd19c9c005444ebc09581f77cb32c0015bb2dc70ca
|
data/.rspec
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
--color
|
2
|
+
--format documentation
|
data/.travis.yml
CHANGED
data/ChangeLog.md
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
+
## Changes Between 1.2.0 and 1.3.0
|
2
|
+
|
3
|
+
### Faraday Upgrade
|
4
|
+
|
5
|
+
The project now depends on Faraday `0.9.x`.
|
6
|
+
|
7
|
+
Contributed by John Murphy.
|
8
|
+
|
9
|
+
### Exchange Deletion
|
10
|
+
|
11
|
+
`RabbitMQ::HTTP::Client#delete_exchange` is a new function that deletes exchanges:
|
12
|
+
|
13
|
+
``` ruby
|
14
|
+
c.delete_exchange("/", "an.exchange")
|
15
|
+
```
|
16
|
+
|
17
|
+
Contributed by Matt Bostock.
|
18
|
+
|
19
|
+
|
20
|
+
## Changes Between 1.1.0 and 1.2.0
|
21
|
+
|
22
|
+
### Ruby 1.8 Compatibility Restored
|
23
|
+
|
24
|
+
The library no longer uses 1.9-specific hash syntax.
|
25
|
+
|
26
|
+
|
27
|
+
|
1
28
|
## Changes Between 1.0.0 and 1.1.0
|
2
29
|
|
3
30
|
### declare_exchange
|
data/README.md
CHANGED
data/lib/rabbitmq/http/client.rb
CHANGED
@@ -125,6 +125,10 @@ module RabbitMQ
|
|
125
125
|
decode_resource(response)
|
126
126
|
end
|
127
127
|
|
128
|
+
def delete_exchange(vhost, name)
|
129
|
+
decode_resource(@connection.delete("/api/exchanges/#{uri_encode(vhost)}/#{uri_encode(name)}"))
|
130
|
+
end
|
131
|
+
|
128
132
|
def exchange_info(vhost, name)
|
129
133
|
decode_resource(@connection.get("/api/exchanges/#{uri_encode(vhost)}/#{uri_encode(name)}"))
|
130
134
|
end
|
@@ -369,10 +373,10 @@ module RabbitMQ
|
|
369
373
|
def initialize_connection(endpoint, options = {})
|
370
374
|
uri = URI.parse(endpoint)
|
371
375
|
|
372
|
-
user = uri.user || options
|
373
|
-
password = uri.password || options
|
376
|
+
user = uri.user || options.delete(:username) || "guest"
|
377
|
+
password = uri.password || options.delete(:password) || "guest"
|
374
378
|
|
375
|
-
@connection = Faraday.new(options
|
379
|
+
@connection = Faraday.new(endpoint, options) do |conn|
|
376
380
|
conn.basic_auth user, password
|
377
381
|
conn.use FaradayMiddleware::FollowRedirects, :limit => 3
|
378
382
|
conn.use Faraday::Response::RaiseError
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.add_dependency "hashie", "~> 2.0.5"
|
22
22
|
gem.add_dependency "multi_json", "~> 1.8.4"
|
23
|
-
gem.add_dependency "faraday", "~> 0.
|
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"
|
26
26
|
end
|
@@ -284,6 +284,20 @@ describe RabbitMQ::HTTP::Client do
|
|
284
284
|
end
|
285
285
|
end
|
286
286
|
|
287
|
+
describe "DELETE /api/exchanges/:vhost/:name" do
|
288
|
+
before :all do
|
289
|
+
@channel = @connection.create_channel
|
290
|
+
end
|
291
|
+
|
292
|
+
let(:exchange_name) { "httpdeclared" }
|
293
|
+
|
294
|
+
it "deletes an exchange" do
|
295
|
+
x = @channel.declare_exchange("/", exchange_name, :durable => false, :type => "fanout")
|
296
|
+
subject.delete_exchange("/", exchange_name)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
|
287
301
|
describe "GET /api/exchanges/:vhost/:name/bindings/source" do
|
288
302
|
before :all do
|
289
303
|
@channel = @connection.create_channel
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
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.3.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: 2014-
|
11
|
+
date: 2014-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.0.5
|
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
26
|
version: 2.0.5
|
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
33
|
version: 1.8.4
|
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
40
|
version: 1.8.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faraday
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.9.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.9.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: faraday_middleware
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.9.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.9.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: effin_utf8
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 1.0.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.0.0
|
83
83
|
description: RabbitMQ HTTP API client for Ruby
|
@@ -87,9 +87,9 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- .gitignore
|
91
|
-
- .rspec
|
92
|
-
- .travis.yml
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
93
|
- ChangeLog.md
|
94
94
|
- Gemfile
|
95
95
|
- LICENSE.txt
|
@@ -112,12 +112,12 @@ require_paths:
|
|
112
112
|
- lib
|
113
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|