dnsimple 4.4.0 → 4.5.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 +5 -5
- data/.rubocop_dnsimple.yml +34 -2
- data/.travis.yml +5 -1
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +12 -7
- data/README.md +1 -2
- data/dnsimple.gemspec +1 -1
- data/lib/dnsimple/client.rb +1 -1
- data/lib/dnsimple/client/accounts.rb +0 -1
- data/lib/dnsimple/client/certificates.rb +1 -0
- data/lib/dnsimple/client/clients.rb +4 -2
- data/lib/dnsimple/client/contacts.rb +0 -5
- data/lib/dnsimple/client/domains.rb +0 -4
- data/lib/dnsimple/client/{collaborators.rb → domains_collaborators.rb} +1 -1
- data/lib/dnsimple/client/registrar_delegation.rb +4 -4
- data/lib/dnsimple/client/services.rb +0 -2
- data/lib/dnsimple/client/tlds.rb +14 -17
- data/lib/dnsimple/client/webhooks.rb +0 -3
- data/lib/dnsimple/client/zones.rb +0 -1
- data/lib/dnsimple/client/zones_distributions.rb +47 -0
- data/lib/dnsimple/client/zones_records.rb +23 -28
- data/lib/dnsimple/struct.rb +2 -0
- data/lib/dnsimple/struct/vanity_name_server.rb +25 -0
- data/lib/dnsimple/struct/zone_distribution.rb +11 -0
- data/lib/dnsimple/version.rb +1 -1
- data/spec/dnsimple/client/{collaborators_spec.rb → domains_collaborators_spec.rb} +0 -0
- data/spec/dnsimple/client/registrar_delegation_spec.rb +3 -2
- data/spec/dnsimple/client/tlds_spec.rb +13 -12
- data/spec/dnsimple/client/zones_distributions_spec.rb +135 -0
- data/spec/dnsimple/client/zones_records_spec.rb +33 -33
- data/spec/dnsimple/client_spec.rb +5 -5
- data/spec/fixtures.http/checkZoneDistribution/error.http +21 -0
- data/spec/fixtures.http/checkZoneDistribution/failure.http +21 -0
- data/spec/fixtures.http/checkZoneDistribution/success.http +21 -0
- data/spec/fixtures.http/checkZoneRecordDistribution/error.http +21 -0
- data/spec/fixtures.http/checkZoneRecordDistribution/failure.http +21 -0
- data/spec/fixtures.http/checkZoneRecordDistribution/success.http +21 -0
- data/spec/spec_helper.rb +1 -1
- metadata +24 -7
@@ -5,7 +5,7 @@ describe Dnsimple::Client, ".zones" do
|
|
5
5
|
subject { described_class.new(base_url: "https://api.dnsimple.test", access_token: "a1b2c3").zones }
|
6
6
|
|
7
7
|
|
8
|
-
describe "#
|
8
|
+
describe "#list_zone_records" do
|
9
9
|
let(:account_id) { 1010 }
|
10
10
|
let(:zone_id) { "example.com" }
|
11
11
|
|
@@ -15,38 +15,38 @@ describe Dnsimple::Client, ".zones" do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "builds the correct request" do
|
18
|
-
subject.
|
18
|
+
subject.list_zone_records(account_id, zone_id)
|
19
19
|
|
20
20
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records")
|
21
21
|
.with(headers: { 'Accept' => 'application/json' })
|
22
22
|
end
|
23
23
|
|
24
24
|
it "supports pagination" do
|
25
|
-
subject.
|
25
|
+
subject.list_zone_records(account_id, zone_id, page: 2)
|
26
26
|
|
27
27
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records?page=2")
|
28
28
|
end
|
29
29
|
|
30
30
|
it "supports extra request options" do
|
31
|
-
subject.
|
31
|
+
subject.list_zone_records(account_id, zone_id, query: { foo: "bar" })
|
32
32
|
|
33
33
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records?foo=bar")
|
34
34
|
end
|
35
35
|
|
36
36
|
it "supports sorting" do
|
37
|
-
subject.
|
37
|
+
subject.list_zone_records(account_id, zone_id, sort: "type:asc")
|
38
38
|
|
39
39
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records?sort=type:asc")
|
40
40
|
end
|
41
41
|
|
42
42
|
it "supports filtering" do
|
43
|
-
subject.
|
43
|
+
subject.list_zone_records(account_id, zone_id, filter: { type: "A" })
|
44
44
|
|
45
45
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records?type=A")
|
46
46
|
end
|
47
47
|
|
48
48
|
it "returns the records" do
|
49
|
-
response = subject.
|
49
|
+
response = subject.list_zone_records(account_id, zone_id)
|
50
50
|
|
51
51
|
expect(response).to be_a(Dnsimple::PaginatedResponse)
|
52
52
|
expect(response.data).to be_a(Array)
|
@@ -60,7 +60,7 @@ describe Dnsimple::Client, ".zones" do
|
|
60
60
|
end
|
61
61
|
|
62
62
|
it "exposes the pagination information" do
|
63
|
-
response = subject.
|
63
|
+
response = subject.list_zone_records(account_id, zone_id)
|
64
64
|
|
65
65
|
expect(response.respond_to?(:page)).to be(true)
|
66
66
|
expect(response.page).to eq(1)
|
@@ -75,13 +75,13 @@ describe Dnsimple::Client, ".zones" do
|
|
75
75
|
.to_return(read_http_fixture("notfound-zone.http"))
|
76
76
|
|
77
77
|
expect {
|
78
|
-
subject.
|
78
|
+
subject.list_zone_records(account_id, zone_id)
|
79
79
|
}.to raise_error(Dnsimple::NotFoundError)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
describe "#
|
84
|
+
describe "#all_zone_records" do
|
85
85
|
before do
|
86
86
|
stub_request(:get, %r{/v2/#{account_id}/zones/#{zone_id}/records})
|
87
87
|
.to_return(read_http_fixture("listZoneRecords/success.http"))
|
@@ -91,24 +91,24 @@ describe Dnsimple::Client, ".zones" do
|
|
91
91
|
let(:zone_id) { "example.com" }
|
92
92
|
|
93
93
|
it "delegates to client.paginate" do
|
94
|
-
expect(subject).to receive(:paginate).with(:
|
95
|
-
subject.
|
94
|
+
expect(subject).to receive(:paginate).with(:list_zone_records, account_id, zone_id, foo: "bar")
|
95
|
+
subject.all_zone_records(account_id, zone_id, foo: "bar")
|
96
96
|
end
|
97
97
|
|
98
98
|
it "supports sorting" do
|
99
|
-
subject.
|
99
|
+
subject.all_zone_records(account_id, zone_id, sort: "type:asc")
|
100
100
|
|
101
101
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records?page=1&per_page=100&sort=type:asc")
|
102
102
|
end
|
103
103
|
|
104
104
|
it "supports filtering" do
|
105
|
-
subject.
|
105
|
+
subject.all_zone_records(account_id, zone_id, filter: { name: "foo", type: "AAAA" })
|
106
106
|
|
107
107
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records?page=1&per_page=100&name=foo&type=AAAA")
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
-
describe "#
|
111
|
+
describe "#create_zone_record" do
|
112
112
|
let(:account_id) { 1010 }
|
113
113
|
let(:zone_id) { "example.com" }
|
114
114
|
|
@@ -120,7 +120,7 @@ describe Dnsimple::Client, ".zones" do
|
|
120
120
|
let(:attributes) { { type: "A", name: "www", content: "127.0.0.1", regions: %w(global) } }
|
121
121
|
|
122
122
|
it "builds the correct request" do
|
123
|
-
subject.
|
123
|
+
subject.create_zone_record(account_id, zone_id, attributes)
|
124
124
|
|
125
125
|
expect(WebMock).to have_requested(:post, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records")
|
126
126
|
.with(body: attributes)
|
@@ -128,7 +128,7 @@ describe Dnsimple::Client, ".zones" do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
it "returns the record" do
|
131
|
-
response = subject.
|
131
|
+
response = subject.create_zone_record(account_id, zone_id, attributes)
|
132
132
|
expect(response).to be_a(Dnsimple::Response)
|
133
133
|
|
134
134
|
result = response.data
|
@@ -146,13 +146,13 @@ describe Dnsimple::Client, ".zones" do
|
|
146
146
|
.to_return(read_http_fixture("notfound-zone.http"))
|
147
147
|
|
148
148
|
expect {
|
149
|
-
subject.
|
149
|
+
subject.create_zone_record(account_id, zone_id, attributes)
|
150
150
|
}.to raise_error(Dnsimple::NotFoundError)
|
151
151
|
end
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
|
-
describe "#
|
155
|
+
describe "#zone_record" do
|
156
156
|
let(:account_id) { 1010 }
|
157
157
|
let(:zone_id) { "example.com" }
|
158
158
|
let(:record_id) { 5 }
|
@@ -163,14 +163,14 @@ describe Dnsimple::Client, ".zones" do
|
|
163
163
|
end
|
164
164
|
|
165
165
|
it "builds the correct request" do
|
166
|
-
subject.
|
166
|
+
subject.zone_record(account_id, zone_id, record_id)
|
167
167
|
|
168
168
|
expect(WebMock).to have_requested(:get, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records/#{record_id}")
|
169
169
|
.with(headers: { 'Accept' => 'application/json' })
|
170
170
|
end
|
171
171
|
|
172
172
|
it "returns the record" do
|
173
|
-
response = subject.
|
173
|
+
response = subject.zone_record(account_id, zone_id, record_id)
|
174
174
|
expect(response).to be_a(Dnsimple::Response)
|
175
175
|
|
176
176
|
result = response.data
|
@@ -195,7 +195,7 @@ describe Dnsimple::Client, ".zones" do
|
|
195
195
|
.to_return(read_http_fixture("notfound-zone.http"))
|
196
196
|
|
197
197
|
expect {
|
198
|
-
subject.
|
198
|
+
subject.zone_record(account_id, zone_id, "0")
|
199
199
|
}.to raise_error(Dnsimple::NotFoundError)
|
200
200
|
end
|
201
201
|
end
|
@@ -206,13 +206,13 @@ describe Dnsimple::Client, ".zones" do
|
|
206
206
|
.to_return(read_http_fixture("notfound-record.http"))
|
207
207
|
|
208
208
|
expect {
|
209
|
-
subject.
|
209
|
+
subject.zone_record(account_id, zone_id, "0")
|
210
210
|
}.to raise_error(Dnsimple::NotFoundError)
|
211
211
|
end
|
212
212
|
end
|
213
213
|
end
|
214
214
|
|
215
|
-
describe "#
|
215
|
+
describe "#update_zone_record" do
|
216
216
|
let(:account_id) { 1010 }
|
217
217
|
let(:zone_id) { "example.com" }
|
218
218
|
let(:record_id) { 5 }
|
@@ -225,7 +225,7 @@ describe Dnsimple::Client, ".zones" do
|
|
225
225
|
let(:attributes) { { content: "mxb.example.com", priority: "20", regions: ['global'] } }
|
226
226
|
|
227
227
|
it "builds the correct request" do
|
228
|
-
subject.
|
228
|
+
subject.update_zone_record(account_id, zone_id, record_id, attributes)
|
229
229
|
|
230
230
|
expect(WebMock).to have_requested(:patch, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records/#{record_id}")
|
231
231
|
.with(body: attributes)
|
@@ -233,7 +233,7 @@ describe Dnsimple::Client, ".zones" do
|
|
233
233
|
end
|
234
234
|
|
235
235
|
it "returns the record" do
|
236
|
-
response = subject.
|
236
|
+
response = subject.update_zone_record(account_id, zone_id, record_id, attributes)
|
237
237
|
expect(response).to be_a(Dnsimple::Response)
|
238
238
|
|
239
239
|
result = response.data
|
@@ -250,7 +250,7 @@ describe Dnsimple::Client, ".zones" do
|
|
250
250
|
.to_return(read_http_fixture("notfound-zone.http"))
|
251
251
|
|
252
252
|
expect {
|
253
|
-
subject.
|
253
|
+
subject.update_zone_record(account_id, zone_id, "0", {})
|
254
254
|
}.to raise_error(Dnsimple::NotFoundError)
|
255
255
|
end
|
256
256
|
end
|
@@ -261,13 +261,13 @@ describe Dnsimple::Client, ".zones" do
|
|
261
261
|
.to_return(read_http_fixture("notfound-record.http"))
|
262
262
|
|
263
263
|
expect {
|
264
|
-
subject.
|
264
|
+
subject.update_zone_record(account_id, zone_id, "0", {})
|
265
265
|
}.to raise_error(Dnsimple::NotFoundError)
|
266
266
|
end
|
267
267
|
end
|
268
268
|
end
|
269
269
|
|
270
|
-
describe "#
|
270
|
+
describe "#delete_zone_record" do
|
271
271
|
let(:account_id) { 1010 }
|
272
272
|
let(:zone_id) { "example.com" }
|
273
273
|
|
@@ -277,14 +277,14 @@ describe Dnsimple::Client, ".zones" do
|
|
277
277
|
end
|
278
278
|
|
279
279
|
it "builds the correct request" do
|
280
|
-
subject.
|
280
|
+
subject.delete_zone_record(account_id, zone_id, record_id = 2)
|
281
281
|
|
282
282
|
expect(WebMock).to have_requested(:delete, "https://api.dnsimple.test/v2/#{account_id}/zones/#{zone_id}/records/#{record_id}")
|
283
283
|
.with(headers: { 'Accept' => 'application/json' })
|
284
284
|
end
|
285
285
|
|
286
286
|
it "returns nothing" do
|
287
|
-
response = subject.
|
287
|
+
response = subject.delete_zone_record(account_id, zone_id, 2)
|
288
288
|
expect(response).to be_a(Dnsimple::Response)
|
289
289
|
|
290
290
|
result = response.data
|
@@ -297,7 +297,7 @@ describe Dnsimple::Client, ".zones" do
|
|
297
297
|
.to_return(read_http_fixture("notfound-zone.http"))
|
298
298
|
|
299
299
|
expect {
|
300
|
-
subject.
|
300
|
+
subject.delete_zone_record(account_id, zone_id, "0")
|
301
301
|
}.to raise_error(Dnsimple::NotFoundError)
|
302
302
|
end
|
303
303
|
end
|
@@ -308,7 +308,7 @@ describe Dnsimple::Client, ".zones" do
|
|
308
308
|
.to_return(read_http_fixture("notfound-record.http"))
|
309
309
|
|
310
310
|
expect {
|
311
|
-
subject.
|
311
|
+
subject.delete_zone_record(account_id, zone_id, "0")
|
312
312
|
}.to raise_error(Dnsimple::NotFoundError)
|
313
313
|
end
|
314
314
|
end
|
@@ -130,7 +130,7 @@ describe Dnsimple::Client do
|
|
130
130
|
format: :json,
|
131
131
|
basic_auth: { username: "user", password: "pass" },
|
132
132
|
headers: { 'Accept' => 'application/json', 'User-Agent' => Dnsimple::Default::USER_AGENT }
|
133
|
-
|
133
|
+
)
|
134
134
|
.and_return(double('response', code: 200))
|
135
135
|
|
136
136
|
subject.request(:get, 'foo')
|
@@ -145,7 +145,7 @@ describe Dnsimple::Client do
|
|
145
145
|
query: { foo: "bar" },
|
146
146
|
basic_auth: { username: "user", password: "pass" },
|
147
147
|
headers: { 'Accept' => 'application/json', 'Content-Type' => 'application/json', 'User-Agent' => Dnsimple::Default::USER_AGENT, "Custom" => "Header" }
|
148
|
-
|
148
|
+
)
|
149
149
|
.and_return(double('response', code: 200))
|
150
150
|
|
151
151
|
subject.request(:put, 'foo', { something: "else" }, { query: { foo: "bar" }, headers: { "Custom" => "Header" } })
|
@@ -159,7 +159,7 @@ describe Dnsimple::Client do
|
|
159
159
|
body: { something: "else" },
|
160
160
|
basic_auth: { username: "user", password: "pass" },
|
161
161
|
headers: { 'Accept' => 'application/json', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => Dnsimple::Default::USER_AGENT }
|
162
|
-
|
162
|
+
)
|
163
163
|
.and_return(double('response', code: 200))
|
164
164
|
|
165
165
|
subject.request(:post, 'foo', { something: "else" }, { headers: { "Content-Type" => "application/x-www-form-urlencoded" } })
|
@@ -173,7 +173,7 @@ describe Dnsimple::Client do
|
|
173
173
|
http_proxyaddr: "example-proxy.com",
|
174
174
|
http_proxyport: "4321",
|
175
175
|
headers: { 'Accept' => 'application/json', 'User-Agent' => Dnsimple::Default::USER_AGENT }
|
176
|
-
|
176
|
+
)
|
177
177
|
.and_return(double('response', code: 200))
|
178
178
|
|
179
179
|
subject = described_class.new(proxy: "example-proxy.com:4321")
|
@@ -186,7 +186,7 @@ describe Dnsimple::Client do
|
|
186
186
|
"#{subject.base_url}test",
|
187
187
|
format: :json,
|
188
188
|
headers: hash_including("User-Agent" => "#{Dnsimple::Default::USER_AGENT} customAgent")
|
189
|
-
|
189
|
+
)
|
190
190
|
.and_return(double("response", code: 200))
|
191
191
|
|
192
192
|
subject = described_class.new(user_agent: "customAgent")
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 504 Gateway Timeout
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 30 Oct 2017 09:09:41 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: keep-alive
|
7
|
+
X-RateLimit-Limit: 2400
|
8
|
+
X-RateLimit-Remaining: 2399
|
9
|
+
X-RateLimit-Reset: 1509358181
|
10
|
+
ETag: W/"10fc650d019e6bffa876f08bce8f3380"
|
11
|
+
Cache-Control: max-age=0, private, must-revalidate
|
12
|
+
X-Request-Id: 91f124fc-671d-40fa-877b-0b222692f623
|
13
|
+
X-Runtime: 0.471005
|
14
|
+
X-Content-Type-Options: nosniff
|
15
|
+
X-Download-Options: noopen
|
16
|
+
X-Frame-Options: DENY
|
17
|
+
X-Permitted-Cross-Domain-Policies: none
|
18
|
+
X-XSS-Protection: 1; mode=block
|
19
|
+
Strict-Transport-Security: max-age=31536000
|
20
|
+
|
21
|
+
{"message":"Could not query zone, connection timed out"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 30 Oct 2017 09:09:41 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: keep-alive
|
7
|
+
X-RateLimit-Limit: 2400
|
8
|
+
X-RateLimit-Remaining: 2399
|
9
|
+
X-RateLimit-Reset: 1509358181
|
10
|
+
ETag: W/"10fc650d019e6bffa876f08bce8f3380"
|
11
|
+
Cache-Control: max-age=0, private, must-revalidate
|
12
|
+
X-Request-Id: 91f124fc-671d-40fa-877b-0b222692f623
|
13
|
+
X-Runtime: 0.471005
|
14
|
+
X-Content-Type-Options: nosniff
|
15
|
+
X-Download-Options: noopen
|
16
|
+
X-Frame-Options: DENY
|
17
|
+
X-Permitted-Cross-Domain-Policies: none
|
18
|
+
X-XSS-Protection: 1; mode=block
|
19
|
+
Strict-Transport-Security: max-age=31536000
|
20
|
+
|
21
|
+
{"data":{"distributed":false}}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 30 Oct 2017 09:09:41 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: keep-alive
|
7
|
+
X-RateLimit-Limit: 2400
|
8
|
+
X-RateLimit-Remaining: 2399
|
9
|
+
X-RateLimit-Reset: 1509358181
|
10
|
+
ETag: W/"10fc650d019e6bffa876f08bce8f3380"
|
11
|
+
Cache-Control: max-age=0, private, must-revalidate
|
12
|
+
X-Request-Id: 91f124fc-671d-40fa-877b-0b222692f623
|
13
|
+
X-Runtime: 0.471005
|
14
|
+
X-Content-Type-Options: nosniff
|
15
|
+
X-Download-Options: noopen
|
16
|
+
X-Frame-Options: DENY
|
17
|
+
X-Permitted-Cross-Domain-Policies: none
|
18
|
+
X-XSS-Protection: 1; mode=block
|
19
|
+
Strict-Transport-Security: max-age=31536000
|
20
|
+
|
21
|
+
{"data":{"distributed":true}}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 504 Gateway Timeout
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 18 Dec 2017 10:54:48 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: keep-alive
|
7
|
+
X-RateLimit-Limit: 2400
|
8
|
+
X-RateLimit-Remaining: 2397
|
9
|
+
X-RateLimit-Reset: 1513597686
|
10
|
+
ETag: W/"10fc650d019e6bffa876f08bce8f3380"
|
11
|
+
Cache-Control: max-age=0, private, must-revalidate
|
12
|
+
X-Request-Id: 74059b13-9262-4e2d-b8ff-a833376dce19
|
13
|
+
X-Runtime: 0.408180
|
14
|
+
X-Content-Type-Options: nosniff
|
15
|
+
X-Download-Options: noopen
|
16
|
+
X-Frame-Options: DENY
|
17
|
+
X-Permitted-Cross-Domain-Policies: none
|
18
|
+
X-XSS-Protection: 1; mode=block
|
19
|
+
Strict-Transport-Security: max-age=31536000
|
20
|
+
|
21
|
+
{"message":"Could not query zone, connection timed out"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 18 Dec 2017 10:54:13 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: keep-alive
|
7
|
+
X-RateLimit-Limit: 2400
|
8
|
+
X-RateLimit-Remaining: 2398
|
9
|
+
X-RateLimit-Reset: 1513597686
|
10
|
+
ETag: W/"10fc650d019e6bffa876f08bce8f3380"
|
11
|
+
Cache-Control: max-age=0, private, must-revalidate
|
12
|
+
X-Request-Id: f5a86610-0e22-4047-a27c-350769eaa6d5
|
13
|
+
X-Runtime: 0.425440
|
14
|
+
X-Content-Type-Options: nosniff
|
15
|
+
X-Download-Options: noopen
|
16
|
+
X-Frame-Options: DENY
|
17
|
+
X-Permitted-Cross-Domain-Policies: none
|
18
|
+
X-XSS-Protection: 1; mode=block
|
19
|
+
Strict-Transport-Security: max-age=31536000
|
20
|
+
|
21
|
+
{"data":{"distributed":false}}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 18 Dec 2017 10:48:06 GMT
|
4
|
+
Content-Type: application/json; charset=utf-8
|
5
|
+
Transfer-Encoding: chunked
|
6
|
+
Connection: keep-alive
|
7
|
+
X-RateLimit-Limit: 2400
|
8
|
+
X-RateLimit-Remaining: 2399
|
9
|
+
X-RateLimit-Reset: 1513597686
|
10
|
+
ETag: W/"10fc650d019e6bffa876f08bce8f3380"
|
11
|
+
Cache-Control: max-age=0, private, must-revalidate
|
12
|
+
X-Request-Id: 34c69751-ffee-4856-ac28-ead4f3a66e18
|
13
|
+
X-Runtime: 0.438473
|
14
|
+
X-Content-Type-Options: nosniff
|
15
|
+
X-Download-Options: noopen
|
16
|
+
X-Frame-Options: DENY
|
17
|
+
X-Permitted-Cross-Domain-Policies: none
|
18
|
+
X-XSS-Protection: 1; mode=block
|
19
|
+
Strict-Transport-Security: max-age=31536000
|
20
|
+
|
21
|
+
{"data":{"distributed":true}}
|
data/spec/spec_helper.rb
CHANGED
@@ -9,7 +9,7 @@ $:.unshift(File.dirname(__FILE__) + '/lib')
|
|
9
9
|
require 'dnsimple'
|
10
10
|
|
11
11
|
unless defined?(SPEC_ROOT)
|
12
|
-
SPEC_ROOT = File.expand_path(
|
12
|
+
SPEC_ROOT = File.expand_path(__dir__)
|
13
13
|
end
|
14
14
|
|
15
15
|
Dir[File.join(SPEC_ROOT, "support/**/*.rb")].each { |f| require f }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsimple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Eden
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-
|
14
|
+
date: 2018-10-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: httparty
|
@@ -114,9 +114,9 @@ files:
|
|
114
114
|
- lib/dnsimple/client/accounts.rb
|
115
115
|
- lib/dnsimple/client/certificates.rb
|
116
116
|
- lib/dnsimple/client/clients.rb
|
117
|
-
- lib/dnsimple/client/collaborators.rb
|
118
117
|
- lib/dnsimple/client/contacts.rb
|
119
118
|
- lib/dnsimple/client/domains.rb
|
119
|
+
- lib/dnsimple/client/domains_collaborators.rb
|
120
120
|
- lib/dnsimple/client/domains_delegation_signer_records.rb
|
121
121
|
- lib/dnsimple/client/domains_dnssec.rb
|
122
122
|
- lib/dnsimple/client/domains_email_forwards.rb
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- lib/dnsimple/client/vanity_name_servers.rb
|
137
137
|
- lib/dnsimple/client/webhooks.rb
|
138
138
|
- lib/dnsimple/client/zones.rb
|
139
|
+
- lib/dnsimple/client/zones_distributions.rb
|
139
140
|
- lib/dnsimple/client/zones_records.rb
|
140
141
|
- lib/dnsimple/default.rb
|
141
142
|
- lib/dnsimple/error.rb
|
@@ -167,18 +168,20 @@ files:
|
|
167
168
|
- lib/dnsimple/struct/template_record.rb
|
168
169
|
- lib/dnsimple/struct/tld.rb
|
169
170
|
- lib/dnsimple/struct/user.rb
|
171
|
+
- lib/dnsimple/struct/vanity_name_server.rb
|
170
172
|
- lib/dnsimple/struct/webhook.rb
|
171
173
|
- lib/dnsimple/struct/whoami.rb
|
172
174
|
- lib/dnsimple/struct/whois_privacy.rb
|
173
175
|
- lib/dnsimple/struct/zone.rb
|
176
|
+
- lib/dnsimple/struct/zone_distribution.rb
|
174
177
|
- lib/dnsimple/struct/zone_file.rb
|
175
178
|
- lib/dnsimple/struct/zone_record.rb
|
176
179
|
- lib/dnsimple/version.rb
|
177
180
|
- spec/dnsimple/client/accounts_spec.rb
|
178
181
|
- spec/dnsimple/client/certificates_spec.rb
|
179
182
|
- spec/dnsimple/client/client_service_spec.rb
|
180
|
-
- spec/dnsimple/client/collaborators_spec.rb
|
181
183
|
- spec/dnsimple/client/contacts_spec.rb
|
184
|
+
- spec/dnsimple/client/domains_collaborators_spec.rb
|
182
185
|
- spec/dnsimple/client/domains_delegation_signer_records_spec.rb
|
183
186
|
- spec/dnsimple/client/domains_dnssec_spec.rb
|
184
187
|
- spec/dnsimple/client/domains_email_forwards_spec.rb
|
@@ -198,6 +201,7 @@ files:
|
|
198
201
|
- spec/dnsimple/client/tlds_spec.rb
|
199
202
|
- spec/dnsimple/client/vanity_name_servers_spec.rb
|
200
203
|
- spec/dnsimple/client/webhooks_spec.rb
|
204
|
+
- spec/dnsimple/client/zones_distributions_spec.rb
|
201
205
|
- spec/dnsimple/client/zones_records_spec.rb
|
202
206
|
- spec/dnsimple/client/zones_spec.rb
|
203
207
|
- spec/dnsimple/client_spec.rb
|
@@ -218,6 +222,12 @@ files:
|
|
218
222
|
- spec/fixtures.http/changeDomainDelegationFromVanity/success.http
|
219
223
|
- spec/fixtures.http/changeDomainDelegationToVanity/success.http
|
220
224
|
- spec/fixtures.http/checkDomain/success.http
|
225
|
+
- spec/fixtures.http/checkZoneDistribution/error.http
|
226
|
+
- spec/fixtures.http/checkZoneDistribution/failure.http
|
227
|
+
- spec/fixtures.http/checkZoneDistribution/success.http
|
228
|
+
- spec/fixtures.http/checkZoneRecordDistribution/error.http
|
229
|
+
- spec/fixtures.http/checkZoneRecordDistribution/failure.http
|
230
|
+
- spec/fixtures.http/checkZoneRecordDistribution/success.http
|
221
231
|
- spec/fixtures.http/createContact/created.http
|
222
232
|
- spec/fixtures.http/createDelegationSignerRecord/created.http
|
223
233
|
- spec/fixtures.http/createDelegationSignerRecord/validation-error.http
|
@@ -342,7 +352,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
342
352
|
requirements:
|
343
353
|
- - ">="
|
344
354
|
- !ruby/object:Gem::Version
|
345
|
-
version: '2.
|
355
|
+
version: '2.1'
|
346
356
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
357
|
requirements:
|
348
358
|
- - ">="
|
@@ -350,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
360
|
version: '0'
|
351
361
|
requirements: []
|
352
362
|
rubyforge_project:
|
353
|
-
rubygems_version: 2.
|
363
|
+
rubygems_version: 2.7.7
|
354
364
|
signing_key:
|
355
365
|
specification_version: 4
|
356
366
|
summary: The DNSimple API client for Ruby
|
@@ -358,8 +368,8 @@ test_files:
|
|
358
368
|
- spec/dnsimple/client/accounts_spec.rb
|
359
369
|
- spec/dnsimple/client/certificates_spec.rb
|
360
370
|
- spec/dnsimple/client/client_service_spec.rb
|
361
|
-
- spec/dnsimple/client/collaborators_spec.rb
|
362
371
|
- spec/dnsimple/client/contacts_spec.rb
|
372
|
+
- spec/dnsimple/client/domains_collaborators_spec.rb
|
363
373
|
- spec/dnsimple/client/domains_delegation_signer_records_spec.rb
|
364
374
|
- spec/dnsimple/client/domains_dnssec_spec.rb
|
365
375
|
- spec/dnsimple/client/domains_email_forwards_spec.rb
|
@@ -379,6 +389,7 @@ test_files:
|
|
379
389
|
- spec/dnsimple/client/tlds_spec.rb
|
380
390
|
- spec/dnsimple/client/vanity_name_servers_spec.rb
|
381
391
|
- spec/dnsimple/client/webhooks_spec.rb
|
392
|
+
- spec/dnsimple/client/zones_distributions_spec.rb
|
382
393
|
- spec/dnsimple/client/zones_records_spec.rb
|
383
394
|
- spec/dnsimple/client/zones_spec.rb
|
384
395
|
- spec/dnsimple/client_spec.rb
|
@@ -399,6 +410,12 @@ test_files:
|
|
399
410
|
- spec/fixtures.http/changeDomainDelegationFromVanity/success.http
|
400
411
|
- spec/fixtures.http/changeDomainDelegationToVanity/success.http
|
401
412
|
- spec/fixtures.http/checkDomain/success.http
|
413
|
+
- spec/fixtures.http/checkZoneDistribution/error.http
|
414
|
+
- spec/fixtures.http/checkZoneDistribution/failure.http
|
415
|
+
- spec/fixtures.http/checkZoneDistribution/success.http
|
416
|
+
- spec/fixtures.http/checkZoneRecordDistribution/error.http
|
417
|
+
- spec/fixtures.http/checkZoneRecordDistribution/failure.http
|
418
|
+
- spec/fixtures.http/checkZoneRecordDistribution/success.http
|
402
419
|
- spec/fixtures.http/createContact/created.http
|
403
420
|
- spec/fixtures.http/createDelegationSignerRecord/created.http
|
404
421
|
- spec/fixtures.http/createDelegationSignerRecord/validation-error.http
|