rabbitmq_http_api_client 1.8.0 → 1.9.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 +16 -1
- data/Gemfile +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +6 -4
- data/lib/rabbitmq/http/client.rb +2 -1
- data/lib/rabbitmq/http/client/version.rb +1 -1
- data/spec/integration/client_spec.rb +30 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 689fb5a05c6fead2a4cb21bec129cb4be0a13041
|
4
|
+
data.tar.gz: a31f9a028e196524eff2670de85fdffd3740260f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02ea6b0b437ca540616eb474b558c09572d750ffc67fc2fa57ed4bb64f843e56dd250dca154c428318670493028c8c2d9923794a967e5273c05ba813f7e94c41
|
7
|
+
data.tar.gz: 7d5e0de0708c2d07baa06c74c246a994e9651044fd22604af3860535dedc7230bf5308074275e3029c5ed61a5952535ce10efcf2952fb674fddf757205e737cc
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,19 @@
|
|
1
|
-
## Changes Between 1.
|
1
|
+
## Changes Between 1.8.0 and 1.9.0 (unreleased)
|
2
|
+
|
3
|
+
No changes yet.
|
4
|
+
|
5
|
+
|
6
|
+
## Changes Between 1.8.0 and 1.9.0 (July 30th, 2017)
|
7
|
+
|
8
|
+
### Make it Possible to Pass Faraday Adapter as Option
|
9
|
+
|
10
|
+
GitHub issue: [#30](https://github.com/ruby-amqp/rabbitmq_http_api_client/issues/30)
|
11
|
+
|
12
|
+
Contributed by Mrinmoy Das.
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## Changes Between 1.7.0 and 1.8.0 (Feb 1st, 2017)
|
2
17
|
|
3
18
|
### Correct URI Path Segment Encoding
|
4
19
|
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -31,15 +31,17 @@ All versions require [RabbitMQ Management UI plugin](http://www.rabbitmq.com/man
|
|
31
31
|
|
32
32
|
Add this line to your application's Gemfile:
|
33
33
|
|
34
|
-
|
34
|
+
``` ruby
|
35
|
+
gem 'rabbitmq_http_api_client', '>= 1.8.0'
|
36
|
+
```
|
35
37
|
|
36
38
|
And then execute:
|
37
39
|
|
38
|
-
|
40
|
+
bundle install
|
39
41
|
|
40
42
|
Or install it yourself as:
|
41
43
|
|
42
|
-
|
44
|
+
gem install rabbitmq_http_api_client
|
43
45
|
|
44
46
|
## Usage
|
45
47
|
|
@@ -369,5 +371,5 @@ and rabbitmq-management plugin enabled.
|
|
369
371
|
|
370
372
|
Double-licensed under the MIT and Mozilla Public License (same as RabbitMQ).
|
371
373
|
|
372
|
-
(c) Michael S. Klishin, 2012-
|
374
|
+
(c) Michael S. Klishin, 2012-2017.
|
373
375
|
|
data/lib/rabbitmq/http/client.rb
CHANGED
@@ -404,6 +404,7 @@ module RabbitMQ
|
|
404
404
|
user = uri.user || options.delete(:username) || "guest"
|
405
405
|
password = uri.password || options.delete(:password) || "guest"
|
406
406
|
options = options.merge(:url => uri.to_s)
|
407
|
+
adapter = options.delete(:adapter) || Faraday.default_adapter
|
407
408
|
|
408
409
|
@connection = Faraday.new(options) do |conn|
|
409
410
|
conn.basic_auth user, password
|
@@ -411,7 +412,7 @@ module RabbitMQ
|
|
411
412
|
conn.use Faraday::Response::RaiseError
|
412
413
|
conn.response :json, :content_type => /\bjson$/
|
413
414
|
|
414
|
-
conn.adapter
|
415
|
+
conn.adapter adapter
|
415
416
|
end
|
416
417
|
end
|
417
418
|
|
@@ -890,6 +890,23 @@ describe RabbitMQ::HTTP::Client do
|
|
890
890
|
subject.create_vhost(vhost)
|
891
891
|
subject.delete_vhost(vhost)
|
892
892
|
end
|
893
|
+
|
894
|
+
gen = Rantly.new
|
895
|
+
200.times do
|
896
|
+
vhost = gen.string
|
897
|
+
|
898
|
+
context "when vhost #{vhost} is deleted immediately after being created" do
|
899
|
+
it "creates a vhost" do
|
900
|
+
subject.create_vhost(vhost)
|
901
|
+
subject.create_vhost(vhost)
|
902
|
+
|
903
|
+
v = subject.vhost_info(vhost)
|
904
|
+
expect(v.name).to eq(vhost)
|
905
|
+
|
906
|
+
subject.delete_vhost(v.name)
|
907
|
+
end
|
908
|
+
end
|
909
|
+
end
|
893
910
|
end
|
894
911
|
|
895
912
|
describe "GET /api/vhosts/:name/permissions" do
|
@@ -1046,4 +1063,17 @@ describe RabbitMQ::HTTP::Client do
|
|
1046
1063
|
expect(r).to eq(true)
|
1047
1064
|
end
|
1048
1065
|
end
|
1066
|
+
|
1067
|
+
#
|
1068
|
+
# Accept Faraday adapter options
|
1069
|
+
#
|
1070
|
+
describe "connection accepts different faraday adapters" do
|
1071
|
+
it "accepts explicit adapter" do
|
1072
|
+
c = described_class.connect("http://guest:guest@127.0.0.1:15672/api",
|
1073
|
+
adapter: :net_http)
|
1074
|
+
r = c.overview
|
1075
|
+
expect(r.rabbitmq_version).to_not be_nil
|
1076
|
+
expect(r.erlang_version).to_not be_nil
|
1077
|
+
end
|
1078
|
+
end
|
1049
1079
|
end
|
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.9.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: 2017-
|
11
|
+
date: 2017-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.6.11
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: RabbitMQ HTTP API client for Ruby
|