dnsimple-ruby 1.5.3 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile +1 -1
- data/bin/dnsimple.rb +1 -1
- data/features/step_definitions/cli_steps.rb +4 -4
- data/lib/dnsimple/domain.rb +45 -1
- data/lib/dnsimple/user.rb +1 -1
- data/lib/dnsimple/version.rb +1 -1
- data/spec/dnsimple/certificate_spec.rb +2 -2
- data/spec/dnsimple/client_spec.rb +3 -3
- data/spec/dnsimple/contact_spec.rb +2 -2
- data/spec/dnsimple/domain_spec.rb +100 -2
- data/spec/dnsimple/extended_attributes_spec.rb +5 -5
- data/spec/dnsimple/record_spec.rb +2 -2
- data/spec/dnsimple/template_spec.rb +2 -2
- data/spec/dnsimple/user_spec.rb +11 -11
- data/spec/files/account/user/success.http +19 -0
- data/spec/files/domains/auto_renewal_disable/notfound.http +21 -0
- data/spec/files/domains/auto_renewal_disable/success.http +23 -0
- data/spec/files/domains/auto_renewal_enable/notfound.http +21 -0
- data/spec/files/domains/auto_renewal_enable/success.http +23 -0
- data/spec/files/domains/show/success.http +1 -1
- metadata +13 -5
- data/spec/files/users/me/success.http +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db3994814dc041f6beaad3e056c53f08e04d2196
|
4
|
+
data.tar.gz: c918040f508a5b9f5ebcfaeb73c362acedf9ca6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b9f2ad01e7e2ac18e6b93c4c4e142a683b74335e30e6b9cf1e630d0b60a004d53813b46135e89b50fb9db5240839e437da912bfb18d7b7fd33d736c19f6a1a2
|
7
|
+
data.tar.gz: 040eadb1538de2a61e4fe26317acdd5835261f133fc6cfc282554c4f35d385cd9a332d8efeafb3b6038cec7ae399f08fd45d294786bdf611e9f6cec43ad8269d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
#### Release 1.5.4
|
4
|
+
|
5
|
+
- NEW: Added domain#expires_on attribute (GH-34). Thanks @alkema
|
6
|
+
|
7
|
+
- NEW: Add various missing domain attributes (GH-38). Thanks @nickhammond
|
8
|
+
|
9
|
+
- NEW: Added support for auto-renewal (GH-36). Thanks @mzuneska
|
10
|
+
|
11
|
+
- CHANGED: User.me now uses the correct patch for API v1.
|
12
|
+
|
3
13
|
#### Release 1.5.3
|
4
14
|
|
5
15
|
- FIXED: In some cases the client crashed with NoMethodError VERSION (GH-35).
|
data/Gemfile
CHANGED
data/bin/dnsimple.rb
CHANGED
@@ -85,7 +85,7 @@ certificate:describe domain.com id # Get a specific cer
|
|
85
85
|
certificate:purchase domain.com name contact_id # Purchase a certificate
|
86
86
|
certificate:submit domain.com id approver_email # Submit a certificate for processing
|
87
87
|
|
88
|
-
Please see the DNSimple documentation at
|
88
|
+
Please see the DNSimple documentation at http://developer.dnsimple.com for additional
|
89
89
|
information on the commands that are available to DNSimple customers.
|
90
90
|
|
91
91
|
EOF
|
@@ -1,8 +1,8 @@
|
|
1
1
|
Given /^I have set up my credentials$/ do
|
2
2
|
path = DNSimple::Client.config_path
|
3
|
-
File.exists?(File.expand_path(path)).should
|
3
|
+
File.exists?(File.expand_path(path)).should be_truthy, "Please set up your #{path} file to continue"
|
4
4
|
credentials = YAML.load(File.new(File.expand_path(path)))
|
5
|
-
credentials['username'].
|
6
|
-
credentials['password'].
|
7
|
-
credentials['base_uri'].
|
5
|
+
expect(credentials['username']).to_not be_nil, "You must specify a username in your #{path} file"
|
6
|
+
expect(credentials['password']).to_not be_nil, "You must specify a password in your #{path} file"
|
7
|
+
expect(credentials['base_uri']).to_not be_nil, "For cucumber to run, you must specify a base_uri in your #{path} file"
|
8
8
|
end
|
data/lib/dnsimple/domain.rb
CHANGED
@@ -16,6 +16,27 @@ module DNSimple
|
|
16
16
|
# The current known name server status
|
17
17
|
attr_accessor :name_server_status
|
18
18
|
|
19
|
+
# When the domain is due to expire
|
20
|
+
attr_accessor :expires_on
|
21
|
+
|
22
|
+
# The state of the domain in DNSimple
|
23
|
+
attr_accessor :state
|
24
|
+
|
25
|
+
# ID of the registrant in DNSimple
|
26
|
+
attr_accessor :registrant_id
|
27
|
+
|
28
|
+
# User ID in DNSimple
|
29
|
+
attr_accessor :user_id
|
30
|
+
|
31
|
+
# Is the domain lockable
|
32
|
+
attr_accessor :lockable
|
33
|
+
|
34
|
+
# Is the domain set to autorenew
|
35
|
+
attr_accessor :auto_renew
|
36
|
+
|
37
|
+
# Is the whois information protected
|
38
|
+
attr_accessor :whois_protected
|
39
|
+
|
19
40
|
|
20
41
|
# Check the availability of a name
|
21
42
|
def self.check(name, options={})
|
@@ -97,6 +118,17 @@ module DNSimple
|
|
97
118
|
end
|
98
119
|
end
|
99
120
|
|
121
|
+
# Enable auto_renew on the domain
|
122
|
+
def enable_auto_renew
|
123
|
+
return if auto_renew
|
124
|
+
auto_renew!(:post)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Disable auto_renew on the domain
|
128
|
+
def disable_auto_renew
|
129
|
+
return unless auto_renew
|
130
|
+
auto_renew!(:delete)
|
131
|
+
end
|
100
132
|
|
101
133
|
# Delete the domain from DNSimple. WARNING: this cannot
|
102
134
|
# be undone.
|
@@ -114,7 +146,6 @@ module DNSimple
|
|
114
146
|
DNSimple::Client.post("/v1/domains/#{name}/templates/#{template.id}/apply", options)
|
115
147
|
end
|
116
148
|
|
117
|
-
#:nodoc:
|
118
149
|
def resolve_template(template)
|
119
150
|
case template
|
120
151
|
when DNSimple::Template
|
@@ -169,5 +200,18 @@ module DNSimple
|
|
169
200
|
end
|
170
201
|
end
|
171
202
|
|
203
|
+
|
204
|
+
private
|
205
|
+
|
206
|
+
def auto_renew!(method)
|
207
|
+
response = DNSimple::Client.send(method, "/v1/domains/#{name}/auto_renewal")
|
208
|
+
case response.code
|
209
|
+
when 200
|
210
|
+
self.auto_renew = response['domain']['auto_renew']
|
211
|
+
else
|
212
|
+
raise RequestError.new("Error setting auto_renew", response)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
172
216
|
end
|
173
217
|
end
|
data/lib/dnsimple/user.rb
CHANGED
data/lib/dnsimple/version.rb
CHANGED
@@ -14,8 +14,8 @@ describe DNSimple::Certificate do
|
|
14
14
|
it "builds the correct request" do
|
15
15
|
described_class.find(domain, "2")
|
16
16
|
|
17
|
-
WebMock.
|
18
|
-
|
17
|
+
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com/certificates/2").
|
18
|
+
with(:headers => { 'Accept' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
21
21
|
context "when the certificate exists" do
|
@@ -91,16 +91,16 @@ describe DNSimple::Client do
|
|
91
91
|
describe ".base_uri" do
|
92
92
|
it "returns the qualified API uri" do
|
93
93
|
klass.base_uri = "http://api.dnsimple.com"
|
94
|
-
klass.base_uri.
|
94
|
+
expect(klass.base_uri).to eq("http://api.dnsimple.com")
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
98
|
describe ".base_uri=" do
|
99
99
|
it "sets the base_uri" do
|
100
100
|
klass.base_uri = "http://api1.dnsimple.com/"
|
101
|
-
klass.base_uri.
|
101
|
+
expect(klass.base_uri).to eq("http://api1.dnsimple.com")
|
102
102
|
klass.base_uri = "http://api2.dnsimple.com"
|
103
|
-
klass.base_uri.
|
103
|
+
expect(klass.base_uri).to eq("http://api2.dnsimple.com")
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
@@ -11,8 +11,8 @@ describe DNSimple::Contact do
|
|
11
11
|
it "builds the correct request" do
|
12
12
|
described_class.find("2")
|
13
13
|
|
14
|
-
WebMock.
|
15
|
-
|
14
|
+
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/contacts/2").
|
15
|
+
with(:headers => { 'Accept' => 'application/json' })
|
16
16
|
end
|
17
17
|
|
18
18
|
context "when the contact exists" do
|
@@ -13,8 +13,8 @@ describe DNSimple::Domain do
|
|
13
13
|
it "builds the correct request" do
|
14
14
|
described_class.find("example.com")
|
15
15
|
|
16
|
-
WebMock.
|
17
|
-
|
16
|
+
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com").
|
17
|
+
with(:headers => { 'Accept' => 'application/json' })
|
18
18
|
end
|
19
19
|
|
20
20
|
context "when the domain exists" do
|
@@ -24,12 +24,110 @@ describe DNSimple::Domain do
|
|
24
24
|
expect(result).to be_a(described_class)
|
25
25
|
expect(result.id).to eq(6)
|
26
26
|
expect(result.name).to eq("test-1383931357.com")
|
27
|
+
expect(result.expires_on).to eq('2015-11-08')
|
27
28
|
expect(result.created_at).to eq("2013-11-08T17:22:48Z")
|
28
29
|
expect(result.updated_at).to eq("2014-01-14T18:27:04Z")
|
30
|
+
expect(result.state).to eq("registered")
|
31
|
+
expect(result.registrant_id).to eq(2)
|
32
|
+
expect(result.user_id).to eq(2)
|
33
|
+
expect(result.lockable).to eq(true)
|
34
|
+
expect(result.auto_renew).to eq(true)
|
35
|
+
expect(result.whois_protected).to eq(false)
|
29
36
|
|
30
37
|
expect(result.name_server_status).to be_nil
|
31
38
|
end
|
32
39
|
end
|
33
40
|
end
|
34
41
|
|
42
|
+
describe "#enable_auto_renew" do
|
43
|
+
let(:domain) { described_class.new(name: 'example.com', auto_renew: false) }
|
44
|
+
|
45
|
+
context "when response is not 200" do
|
46
|
+
before do
|
47
|
+
stub_request(:post, %r[/v1/domains/example.com/auto_renewal]).
|
48
|
+
to_return(read_fixture("domains/auto_renewal_enable/notfound.http"))
|
49
|
+
end
|
50
|
+
|
51
|
+
it "raises a RequestError" do
|
52
|
+
expect { domain.enable_auto_renew }.to raise_error(DNSimple::RequestError)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "when auto_renew is true" do
|
57
|
+
let(:domain) { described_class.new(name: 'example.com', auto_renew: true) }
|
58
|
+
|
59
|
+
it "does not send a web request" do
|
60
|
+
domain.enable_auto_renew
|
61
|
+
expect(WebMock).to have_not_been_made
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context "when auto_renew is false" do
|
66
|
+
let(:domain) { described_class.new(name: 'example.com', auto_renew: false) }
|
67
|
+
|
68
|
+
before do
|
69
|
+
stub_request(:post, %r[/v1/domains/example.com/auto_renewal]).
|
70
|
+
to_return(read_fixture("domains/auto_renewal_enable/success.http"))
|
71
|
+
end
|
72
|
+
|
73
|
+
it "builds the correct request to enable auto_renew" do
|
74
|
+
domain.enable_auto_renew
|
75
|
+
|
76
|
+
expect(WebMock).to have_requested(:post, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com/auto_renewal").
|
77
|
+
with(:headers => { 'Accept' => 'application/json' })
|
78
|
+
end
|
79
|
+
|
80
|
+
it "sets auto_renew to true on the domain" do
|
81
|
+
domain.enable_auto_renew
|
82
|
+
expect(domain.auto_renew).to be_truthy
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
describe "#disable_auto_renew" do
|
89
|
+
let(:domain) { described_class.new(name: 'example.com', auto_renew: true) }
|
90
|
+
|
91
|
+
context "when response is not 200" do
|
92
|
+
before do
|
93
|
+
stub_request(:delete, %r[/v1/domains/example.com/auto_renewal]).
|
94
|
+
to_return(read_fixture("domains/auto_renewal_disable/notfound.http"))
|
95
|
+
end
|
96
|
+
|
97
|
+
it "raises a RequestError" do
|
98
|
+
expect { domain.disable_auto_renew }.to raise_error(DNSimple::RequestError)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
context "when auto_renew is false" do
|
103
|
+
let(:domain) { described_class.new(name: 'example.com', auto_renew: false) }
|
104
|
+
|
105
|
+
it "does not send a web request" do
|
106
|
+
domain.disable_auto_renew
|
107
|
+
expect(WebMock).to have_not_been_made
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
context "when auto_renew is true" do
|
112
|
+
let(:domain) { described_class.new(name: 'example.com', auto_renew: true) }
|
113
|
+
|
114
|
+
before do
|
115
|
+
stub_request(:delete, %r[/v1/domains/example.com/auto_renewal]).
|
116
|
+
to_return(read_fixture("domains/auto_renewal_disable/success.http"))
|
117
|
+
end
|
118
|
+
|
119
|
+
it "builds the correct request to disable auto_renew" do
|
120
|
+
domain.disable_auto_renew
|
121
|
+
|
122
|
+
expect(WebMock).to have_requested(:delete, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com/auto_renewal").
|
123
|
+
with(:headers => { 'Accept' => 'application/json' })
|
124
|
+
end
|
125
|
+
|
126
|
+
it "sets auto_renew to false on the domain" do
|
127
|
+
domain.disable_auto_renew
|
128
|
+
expect(domain.auto_renew).to be_falsey
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
end
|
35
133
|
end
|
@@ -11,8 +11,8 @@ describe DNSimple::ExtendedAttribute do
|
|
11
11
|
it "builds the correct request" do
|
12
12
|
described_class.find("com")
|
13
13
|
|
14
|
-
WebMock.
|
15
|
-
|
14
|
+
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/extended_attributes/com").
|
15
|
+
with(:headers => { 'Accept' => 'application/json' })
|
16
16
|
end
|
17
17
|
|
18
18
|
context "when the TLD has no attributes" do
|
@@ -38,15 +38,15 @@ describe DNSimple::ExtendedAttribute do
|
|
38
38
|
result = described_class.find("ca")
|
39
39
|
|
40
40
|
expect(result).to be_a(Array)
|
41
|
-
expect(result).to
|
41
|
+
expect(result.size).to eq(5)
|
42
42
|
|
43
43
|
attribute = result[0]
|
44
44
|
expect(attribute).to be_a(described_class)
|
45
45
|
expect(attribute.name).to eq("cira_legal_type")
|
46
46
|
expect(attribute.description).to eq("Legal type of registrant contact")
|
47
|
-
expect(attribute.required).to
|
47
|
+
expect(attribute.required).to be_truthy
|
48
48
|
expect(attribute.options).to be_a(Array)
|
49
|
-
expect(attribute.options).to
|
49
|
+
expect(attribute.options.size).to eq(18)
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -14,8 +14,8 @@ describe DNSimple::Record do
|
|
14
14
|
it "builds the correct request" do
|
15
15
|
described_class.find(domain, "2")
|
16
16
|
|
17
|
-
WebMock.
|
18
|
-
|
17
|
+
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com/records/2").
|
18
|
+
with(:headers => { 'Accept' => 'application/json' })
|
19
19
|
end
|
20
20
|
|
21
21
|
context "when the record exists" do
|
@@ -11,8 +11,8 @@ describe DNSimple::Template do
|
|
11
11
|
it "builds the correct request" do
|
12
12
|
described_class.find("google-apps")
|
13
13
|
|
14
|
-
WebMock.
|
15
|
-
|
14
|
+
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/templates/google-apps").
|
15
|
+
with(:headers => { 'Accept' => 'application/json' })
|
16
16
|
end
|
17
17
|
|
18
18
|
context "when the template exists" do
|
data/spec/dnsimple/user_spec.rb
CHANGED
@@ -3,29 +3,29 @@ require 'spec_helper'
|
|
3
3
|
describe DNSimple::User do
|
4
4
|
describe ".me" do
|
5
5
|
before do
|
6
|
-
stub_request(:get, %r[/v1/
|
7
|
-
to_return(read_fixture("
|
6
|
+
stub_request(:get, %r[/v1/user]).
|
7
|
+
to_return(read_fixture("account/user/success.http"))
|
8
8
|
end
|
9
9
|
|
10
10
|
it "builds the correct request" do
|
11
11
|
described_class.me
|
12
12
|
|
13
|
-
WebMock.
|
14
|
-
|
13
|
+
expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/user").
|
14
|
+
with(:headers => { 'Accept' => 'application/json' })
|
15
15
|
end
|
16
16
|
|
17
17
|
it "returns the user" do
|
18
18
|
result = described_class.me
|
19
19
|
|
20
20
|
expect(result).to be_a(described_class)
|
21
|
-
expect(result.id).to eq(
|
21
|
+
expect(result.id).to eq(19)
|
22
22
|
expect(result.email).to eq("example@example.com")
|
23
|
-
expect(result.domain_count).to
|
24
|
-
expect(result.domain_limit).to
|
25
|
-
expect(result.login_count).to
|
26
|
-
expect(result.failed_login_count).to
|
27
|
-
expect(result.created_at).to eq("
|
28
|
-
expect(result.updated_at).to
|
23
|
+
expect(result.domain_count).to be_a(Integer)
|
24
|
+
expect(result.domain_limit).to be_a(Integer)
|
25
|
+
expect(result.login_count).to be_a(Integer)
|
26
|
+
expect(result.failed_login_count).to be_a(Integer)
|
27
|
+
expect(result.created_at).to eq("2014-01-15T21:59:04Z")
|
28
|
+
expect(result.updated_at).to be_a(String)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.4.4
|
3
|
+
Date: Wed, 15 Jan 2014 23:22:55 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: close
|
7
|
+
Status: 200 OK
|
8
|
+
X-DNSimple-API-Version: 1.0.0
|
9
|
+
Access-Control-Allow-Origin: *
|
10
|
+
Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
|
11
|
+
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
|
12
|
+
X-UA-Compatible: IE=Edge,chrome=1
|
13
|
+
ETag: "95b5414d75f4adff476276f378e1a742"
|
14
|
+
Cache-Control: max-age=0, private, must-revalidate
|
15
|
+
X-Request-Id: 15e68ad6a41c24c727d57cfc1a733de7
|
16
|
+
X-Runtime: 0.022328
|
17
|
+
Strict-Transport-Security: max-age=315360000
|
18
|
+
|
19
|
+
{"user":{"id":19,"email":"example@example.com","referral_token":"ad932ffb60c295","single_access_token":"api-token","default_contact_id":null,"phone":null,"country_code":null,"authy_identifier":null,"authy_verified_at":null,"domain_count":2,"domain_limit":500,"login_count":3,"failed_login_count":0,"unsubscribed_at":null,"created_at":"2014-01-15T21:59:04Z","updated_at":"2014-01-15T23:21:50Z","first_name":null,"last_name":null}}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 404 Not Found
|
2
|
+
Server: nginx/1.4.7
|
3
|
+
Date: Tue, 01 Jul 2014 16:16:47 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: close
|
7
|
+
Status: 404 Not Found
|
8
|
+
Strict-Transport-Security: max-age=631138519
|
9
|
+
X-Frame-Options: SAMEORIGIN
|
10
|
+
X-XSS-Protection: 1
|
11
|
+
X-Content-Type-Options: nosniff
|
12
|
+
X-UA-Compatible: chrome=1
|
13
|
+
Access-Control-Allow-Origin: *
|
14
|
+
Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
|
15
|
+
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
|
16
|
+
Content-Security-Policy: default-src 'self'; connect-src 'self'; font-src 'self' data: netdna.bootstrapcdn.com *.edgecastcdn.net; frame-src 'self'; img-src 'self' data: *.nr-data.net; media-src 'self'; object-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.getdrip.com *.visualwebsiteoptimizer.com *.doubleclick.net *.pathful.com *.newrelic.com; style-src 'self' data: 'unsafe-inline' 'unsafe-eval' netdna.bootstrapcdn.com cloud.webtype.com cloud.typography.com;
|
17
|
+
Cache-Control: no-cache
|
18
|
+
X-Request-Id: a3258b20-64e8-4a82-aed2-7487b8fbd941
|
19
|
+
X-Runtime: 0.020447
|
20
|
+
|
21
|
+
{"message":"Domain `example.com' not found","error":"Domain `example.com' not found"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.4.7
|
3
|
+
Date: Tue, 01 Jul 2014 16:15:42 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: close
|
7
|
+
Status: 200 OK
|
8
|
+
Strict-Transport-Security: max-age=631138519
|
9
|
+
X-Frame-Options: SAMEORIGIN
|
10
|
+
X-XSS-Protection: 1
|
11
|
+
X-Content-Type-Options: nosniff
|
12
|
+
X-UA-Compatible: chrome=1
|
13
|
+
Access-Control-Allow-Origin: *
|
14
|
+
Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
|
15
|
+
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
|
16
|
+
Content-Security-Policy: default-src 'self'; connect-src 'self'; font-src 'self' data: netdna.bootstrapcdn.com *.edgecastcdn.net; frame-src 'self'; img-src 'self' data: *.nr-data.net; media-src 'self'; object-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.getdrip.com *.visualwebsiteoptimizer.com *.doubleclick.net *.pathful.com *.newrelic.com; style-src 'self' data: 'unsafe-inline' 'unsafe-eval' netdna.bootstrapcdn.com cloud.webtype.com cloud.typography.com;
|
17
|
+
ETag: "bd3e2e772876c2061a4953449963473a"
|
18
|
+
Cache-Control: max-age=0, private, must-revalidate
|
19
|
+
X-Request-Id: 55f7d890-6971-4b50-8ea9-802e3d426de8
|
20
|
+
X-Runtime: 1.005223
|
21
|
+
Strict-Transport-Security: max-age=315360000
|
22
|
+
|
23
|
+
{"domain":{"id":227,"user_id":19,"registrant_id":28,"name":"example-1389823304.com","unicode_name":"example-1389823304.com","token":"api-token","state":"registered","language":null,"lockable":true,"auto_renew":false,"whois_protected":false,"record_count":7,"service_count":0,"expires_on":"2015-01-16","created_at":"2014-01-15T22:01:55.494Z","updated_at":"2014-07-01T16:15:42.350Z","parsed_expiration_date":"2015-01-16T22:56:00.000Z","expires_at":"1/16/2015 10:56:00 PM","name_server_status":null,"private_whois?":false}}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 404 Not Found
|
2
|
+
Server: nginx/1.4.7
|
3
|
+
Date: Tue, 01 Jul 2014 16:16:24 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: close
|
7
|
+
Status: 404 Not Found
|
8
|
+
Strict-Transport-Security: max-age=631138519
|
9
|
+
X-Frame-Options: SAMEORIGIN
|
10
|
+
X-XSS-Protection: 1
|
11
|
+
X-Content-Type-Options: nosniff
|
12
|
+
X-UA-Compatible: chrome=1
|
13
|
+
Access-Control-Allow-Origin: *
|
14
|
+
Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
|
15
|
+
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
|
16
|
+
Content-Security-Policy: default-src 'self'; connect-src 'self'; font-src 'self' data: netdna.bootstrapcdn.com *.edgecastcdn.net; frame-src 'self'; img-src 'self' data: *.nr-data.net; media-src 'self'; object-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.getdrip.com *.visualwebsiteoptimizer.com *.doubleclick.net *.pathful.com *.newrelic.com; style-src 'self' data: 'unsafe-inline' 'unsafe-eval' netdna.bootstrapcdn.com cloud.webtype.com cloud.typography.com;
|
17
|
+
Cache-Control: no-cache
|
18
|
+
X-Request-Id: a1ec9a9a-6d0f-44a4-9e37-8a4adc7f4d2a
|
19
|
+
X-Runtime: 0.022126
|
20
|
+
|
21
|
+
{"message":"Domain `example.com' not found","error":"Domain `example.com' not found"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/1.4.7
|
3
|
+
Date: Tue, 01 Jul 2014 16:15:06 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: close
|
7
|
+
Status: 200 OK
|
8
|
+
Strict-Transport-Security: max-age=631138519
|
9
|
+
X-Frame-Options: SAMEORIGIN
|
10
|
+
X-XSS-Protection: 1
|
11
|
+
X-Content-Type-Options: nosniff
|
12
|
+
X-UA-Compatible: chrome=1
|
13
|
+
Access-Control-Allow-Origin: *
|
14
|
+
Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
|
15
|
+
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
|
16
|
+
Content-Security-Policy: default-src 'self'; connect-src 'self'; font-src 'self' data: netdna.bootstrapcdn.com *.edgecastcdn.net; frame-src 'self'; img-src 'self' data: *.nr-data.net; media-src 'self'; object-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.getdrip.com *.visualwebsiteoptimizer.com *.doubleclick.net *.pathful.com *.newrelic.com; style-src 'self' data: 'unsafe-inline' 'unsafe-eval' netdna.bootstrapcdn.com cloud.webtype.com cloud.typography.com;
|
17
|
+
ETag: "ab6304c604f60fabe9a0db5b5d2c7a27"
|
18
|
+
Cache-Control: max-age=0, private, must-revalidate
|
19
|
+
X-Request-Id: 03f71270-5c5b-44e1-9542-20a21d213222
|
20
|
+
X-Runtime: 3.279343
|
21
|
+
Strict-Transport-Security: max-age=315360000
|
22
|
+
|
23
|
+
{"domain":{"id":227,"user_id":19,"registrant_id":28,"name":"example-1389823304.com","unicode_name":"example-1389823304.com","token":"api-token","state":"registered","language":null,"lockable":true,"auto_renew":true,"whois_protected":false,"record_count":7,"service_count":0,"expires_on":"2015-01-16","created_at":"2014-01-15T22:01:55.494Z","updated_at":"2014-07-01T16:15:06.485Z","parsed_expiration_date":"2015-01-16T22:56:00.000Z","expires_at":"1/16/2015 10:56:00 PM","name_server_status":null,"private_whois?":false}}
|
@@ -16,4 +16,4 @@ X-Request-Id: eec6552de5a2aa5ae570139b388ffb9b
|
|
16
16
|
X-Runtime: 0.046892
|
17
17
|
Strict-Transport-Security: max-age=315360000
|
18
18
|
|
19
|
-
{"domain":{"id":6,"user_id":2,"registrant_id":2,"name":"test-1383931357.com","unicode_name":"test-1383931357.com","token":"
|
19
|
+
{"domain":{"id":6,"user_id":2,"registrant_id":2,"name":"test-1383931357.com","unicode_name":"test-1383931357.com","token":"api-token","state":"registered","language":null,"lockable":true,"auto_renew":true,"whois_protected":false,"record_count":7,"service_count":0,"expires_on":"2015-11-08","created_at":"2013-11-08T17:22:48Z","updated_at":"2014-01-14T18:27:04Z","parsed_expiration_date":"2015-11-08T17:23:00Z","expires_at":"11/8/2015 5:23:00 PM","name_server_status":null,"private_whois?":false}}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsimple-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Eden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01
|
11
|
+
date: 2014-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -233,11 +233,16 @@ files:
|
|
233
233
|
- spec/dnsimple/record_spec.rb
|
234
234
|
- spec/dnsimple/template_spec.rb
|
235
235
|
- spec/dnsimple/user_spec.rb
|
236
|
+
- spec/files/account/user/success.http
|
236
237
|
- spec/files/certificates/index/success.http
|
237
238
|
- spec/files/certificates/show/notfound.http
|
238
239
|
- spec/files/certificates/show/success.http
|
239
240
|
- spec/files/contacts/show/notfound.http
|
240
241
|
- spec/files/contacts/show/success.http
|
242
|
+
- spec/files/domains/auto_renewal_disable/notfound.http
|
243
|
+
- spec/files/domains/auto_renewal_disable/success.http
|
244
|
+
- spec/files/domains/auto_renewal_enable/notfound.http
|
245
|
+
- spec/files/domains/auto_renewal_enable/success.http
|
241
246
|
- spec/files/domains/show/notfound.http
|
242
247
|
- spec/files/domains/show/success.http
|
243
248
|
- spec/files/extended_attributes/ca.http
|
@@ -248,7 +253,6 @@ files:
|
|
248
253
|
- spec/files/records/show/success.http
|
249
254
|
- spec/files/templates/show/notfound.http
|
250
255
|
- spec/files/templates/show/success.http
|
251
|
-
- spec/files/users/me/success.http
|
252
256
|
- spec/spec_helper.rb
|
253
257
|
- spec/support/helpers.rb
|
254
258
|
- spec/support/webmock.rb
|
@@ -271,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
275
|
version: '0'
|
272
276
|
requirements: []
|
273
277
|
rubyforge_project:
|
274
|
-
rubygems_version: 2.
|
278
|
+
rubygems_version: 2.2.2
|
275
279
|
signing_key:
|
276
280
|
specification_version: 4
|
277
281
|
summary: A ruby wrapper for the DNSimple API
|
@@ -307,11 +311,16 @@ test_files:
|
|
307
311
|
- spec/dnsimple/record_spec.rb
|
308
312
|
- spec/dnsimple/template_spec.rb
|
309
313
|
- spec/dnsimple/user_spec.rb
|
314
|
+
- spec/files/account/user/success.http
|
310
315
|
- spec/files/certificates/index/success.http
|
311
316
|
- spec/files/certificates/show/notfound.http
|
312
317
|
- spec/files/certificates/show/success.http
|
313
318
|
- spec/files/contacts/show/notfound.http
|
314
319
|
- spec/files/contacts/show/success.http
|
320
|
+
- spec/files/domains/auto_renewal_disable/notfound.http
|
321
|
+
- spec/files/domains/auto_renewal_disable/success.http
|
322
|
+
- spec/files/domains/auto_renewal_enable/notfound.http
|
323
|
+
- spec/files/domains/auto_renewal_enable/success.http
|
315
324
|
- spec/files/domains/show/notfound.http
|
316
325
|
- spec/files/domains/show/success.http
|
317
326
|
- spec/files/extended_attributes/ca.http
|
@@ -322,7 +331,6 @@ test_files:
|
|
322
331
|
- spec/files/records/show/success.http
|
323
332
|
- spec/files/templates/show/notfound.http
|
324
333
|
- spec/files/templates/show/success.http
|
325
|
-
- spec/files/users/me/success.http
|
326
334
|
- spec/spec_helper.rb
|
327
335
|
- spec/support/helpers.rb
|
328
336
|
- spec/support/webmock.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
HTTP/1.1 200 OK
|
2
|
-
Server: nginx/1.4.4
|
3
|
-
Date: Tue, 14 Jan 2014 17:45:57 GMT
|
4
|
-
Content-Type: application/json; charset=utf-8
|
5
|
-
Transfer-Encoding: chunked
|
6
|
-
Connection: close
|
7
|
-
Status: 200 OK
|
8
|
-
X-DNSimple-API-Version: 1.0.0
|
9
|
-
Access-Control-Allow-Origin: *
|
10
|
-
Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
|
11
|
-
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
|
12
|
-
X-UA-Compatible: IE=Edge,chrome=1
|
13
|
-
ETag: "eaafff1bd6f4251411afaf624b31ba67"
|
14
|
-
Cache-Control: max-age=0, private, must-revalidate
|
15
|
-
X-Request-Id: fea9cce456c8be69c4b0dec81452726b
|
16
|
-
X-Runtime: 0.034644
|
17
|
-
Strict-Transport-Security: max-age=315360000
|
18
|
-
|
19
|
-
{"user":{"id":2,"email":"example@example.com","referral_token":"04b12390f6204e","single_access_token":"fCF0n6OTW5n4NtFh8W","default_contact_id":null,"phone":null,"country_code":null,"authy_identifier":null,"authy_verified_at":null,"domain_count":2,"domain_limit":50,"login_count":2,"failed_login_count":0,"unsubscribed_at":null,"created_at":"2013-11-08T17:20:58Z","updated_at":"2014-01-14T17:45:57Z","first_name":null,"last_name":null}}
|