ultradns-sdk 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ultradns/client.rb +10 -1
- data/lib/ultradns/version.rb +1 -1
- data/test/test_client_api.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e7c73a8161b279c698da154ad9c3a2deb7f6d3d
|
4
|
+
data.tar.gz: 5c533fac88f1b4d0e537a0529d8f6479897e1784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63e9dbb43a3a65875c8d45c27ac52c550d0254829db649c4376083b5c35e2ca0b9bc189d9712dfa30a81e23303d0f8b9a8b7871b3bf6d16742cdfbef6972ab87
|
7
|
+
data.tar.gz: ee6e8c5538de7e069e41b312c5fe3e6f966485d7f560d03f1ad5b1017584b6aee8128d18a9fd16f1d0b8a72899130fae87436fae4251876d3c623ed01ecf26a4
|
data/lib/ultradns/client.rb
CHANGED
@@ -51,7 +51,16 @@ class Ultradns::Client
|
|
51
51
|
|
52
52
|
@options = {}
|
53
53
|
# override or ignored if nil
|
54
|
-
|
54
|
+
|
55
|
+
default_base_uri = URI(self.class.default_options[:base_uri])
|
56
|
+
|
57
|
+
if options[:host]
|
58
|
+
host = options[:host].prepend("#{default_base_uri.scheme}://")
|
59
|
+
host << default_base_uri.path
|
60
|
+
@options[:base_uri] = HTTParty.normalize_base_uri(host)
|
61
|
+
elsif options[:base_uri] # take whatever they provide
|
62
|
+
@options[:base_uri] = HTTParty.normalize_base_uri(options[:base_uri])
|
63
|
+
end
|
55
64
|
|
56
65
|
auth(username, password, @options[:base_uri] || self.class.default_options[:base_uri])
|
57
66
|
|
data/lib/ultradns/version.rb
CHANGED
data/test/test_client_api.rb
CHANGED
@@ -18,7 +18,7 @@ class TestClientApi < Minitest::Unit::TestCase
|
|
18
18
|
|
19
19
|
def test_different_base_uri
|
20
20
|
VCR.use_cassette('test_different_base_uri') do
|
21
|
-
client = Ultradns::Client.new(@user, @pw, host: 'test-restapi.ultradns.com:443
|
21
|
+
client = Ultradns::Client.new(@user, @pw, host: 'test-restapi.ultradns.com:443')
|
22
22
|
|
23
23
|
result = client.status
|
24
24
|
assert result['message'] != nil
|