dnsmadeeasy-rest-api 1.0.7 → 1.0.8
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/README.md +7 -1
- data/dnsmadeeasy-rest-api.gemspec +1 -1
- data/lib/dnsmadeeasy-rest-api.rb +3 -3
- data/spec/lib/dnsmadeeasyapi-rest-api_spec.rb +2 -2
- 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: ea11e9f3e4bd98ca1e7c96fa950103ced863745b
|
4
|
+
data.tar.gz: 1bef7b48f3f0941cd6c8b5eae87f7cac2b08abac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e667b4ebdc8a24286130def23c20009d6fb55132e42daa12bb9366c1fcb5d8d46002d21ddb9336a0dd7df3331b09dc4f819735431f09e356359f97ceea5aab0a
|
7
|
+
data.tar.gz: 1a58213c6cc533fa722f75403694302ea115aa1c1f7576657c575555eadf3547d711abdd1c714966c06ac2353a2c4b5d494b00b26c094769fcc635e14d3469ff
|
data/README.md
CHANGED
@@ -29,9 +29,15 @@ Start by creating a new instance of the `DnsMadeEasy` class, and passing your ap
|
|
29
29
|
api = DnsMadeEasy.new('awesome-api-key', 'super-secret-and-awesome-api-secret')
|
30
30
|
```
|
31
31
|
|
32
|
+
Optionally, you can connect to the sandbox API if you want to play around.
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
api = DnsMadeEasy.new('awesome-api-key', 'super-secret-and-awesome-api-secret', sandbox=TRUE)
|
36
|
+
```
|
37
|
+
|
32
38
|
All return values are the direct JSON responses from DNS Made Easy converted into a Hash.
|
33
39
|
|
34
|
-
See: [
|
40
|
+
See: [https://api-docs.dnsmadeeasy.com/](https://api-docs.dnsmadeeasy.com/)
|
35
41
|
|
36
42
|
### Managing Domains
|
37
43
|
|
data/lib/dnsmadeeasy-rest-api.rb
CHANGED
@@ -21,7 +21,7 @@ class DnsMadeEasy
|
|
21
21
|
@request_limit = -1
|
22
22
|
|
23
23
|
if sandbox
|
24
|
-
self.base_uri = 'https://
|
24
|
+
self.base_uri = 'https://api.sandbox.dnsmadeeasy.com/V2.0'
|
25
25
|
else
|
26
26
|
self.base_uri = 'https://api.dnsmadeeasy.com/V2.0'
|
27
27
|
end
|
@@ -206,8 +206,8 @@ class DnsMadeEasy
|
|
206
206
|
put "/monitor/#{record_id}", body
|
207
207
|
end
|
208
208
|
|
209
|
-
def disable_failover(record_id)
|
210
|
-
put "/monitor/#{record_id}", { 'failover' => false, 'monitor' => false }
|
209
|
+
def disable_failover(record_id, options={})
|
210
|
+
put "/monitor/#{record_id}", { 'failover' => false, 'monitor' => false }.merge(options)
|
211
211
|
end
|
212
212
|
|
213
213
|
private
|
@@ -388,14 +388,14 @@ describe DnsMadeEasy do
|
|
388
388
|
|
389
389
|
describe '#disable_failover' do
|
390
390
|
let(:response) { "{}" }
|
391
|
-
let(:body) { '{"failover":false,"monitor":false}' }
|
391
|
+
let(:body) { '{"failover":false,"monitor":false,"port":80,"sensitivity":5}' }
|
392
392
|
|
393
393
|
it 'disables the failover config for a failover enabled record' do
|
394
394
|
stub_request(:put, "https://api.dnsmadeeasy.com/V2.0/monitor/21").
|
395
395
|
with(headers: request_headers, body: body).
|
396
396
|
to_return(status: 200, body: response, headers: {})
|
397
397
|
|
398
|
-
expect(subject.disable_failover(21)).to eq({})
|
398
|
+
expect(subject.disable_failover(21, { 'port' => 80, 'sensitivity' => 5 })).to eq({})
|
399
399
|
end
|
400
400
|
end
|
401
401
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsmadeeasy-rest-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnoud Vermeer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-03-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.5.2
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: DNS Made Easy V2.0 REST API client for Ruby
|