dnsimple-ruby 0.9.9 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.bundle/config +2 -2
- data/.rvmrc +1 -2
- data/LICENSE +1 -1
- data/VERSION +1 -1
- data/dnsimple-ruby.gemspec +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Contact/a_new_contact.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Contact/an_existing_contact.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Domain/_all.yml +4 -4
- data/fixtures/vcr_cassettes/DNSimple_Domain/applying_templates.yml +7 -7
- data/fixtures/vcr_cassettes/DNSimple_Domain/creating_a_new_domain.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_id.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_name.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_a_new_registrant_contact.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_an_existing_contact.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_ca.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_com.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_Record/_all.yml +8 -8
- data/fixtures/vcr_cassettes/DNSimple_Record/creating_a_new_record.yml +2 -2
- data/fixtures/vcr_cassettes/DNSimple_Record/find_a_record.yml +2 -2
- data/fixtures/vcr_cassettes/DNSimple_Template/a_template.yml +1 -1
- data/fixtures/vcr_cassettes/DNSimple_User/_me.yml +1 -1
- data/lib/dnsimple.rb +4 -0
- data/lib/dnsimple/certificate.rb +1 -1
- data/lib/dnsimple/client.rb +12 -7
- data/lib/dnsimple/commands/describe_contact.rb +3 -3
- data/lib/dnsimple/record.rb +1 -1
- data/spec/certificate_spec.rb +18 -0
- data/spec/record_spec.rb +14 -0
- data/spec/spec_helper.rb +3 -0
- metadata +64 -64
data/.bundle/config
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
---
|
2
|
-
|
1
|
+
--- {}
|
2
|
+
|
data/.rvmrc
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
rvm use ruby-1.8.7-
|
2
|
-
rvm gemset use dnsimple-ruby
|
1
|
+
rvm use ruby-1.8.7@dnsimple-ruby --create
|
data/LICENSE
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0
|
data/dnsimple-ruby.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/contacts.json
|
6
6
|
body: contact[first_name]=John&contact[country]=US&contact[last_name]=Doe&contact[email_address]=john.doe%40example.com&contact[address1]=1%20SW%201st%20Street&contact[phone]=305%20111%202222&contact[city]=Miami&contact[state_province]=FL&contact[postal_code]=33143
|
7
7
|
headers:
|
8
8
|
authorization:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/contacts/32.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
authorization:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains
|
6
6
|
body: domain[name]=testdomain0.com
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -47,7 +47,7 @@
|
|
47
47
|
- !ruby/struct:VCR::HTTPInteraction
|
48
48
|
request: !ruby/struct:VCR::Request
|
49
49
|
method: :post
|
50
|
-
uri: https
|
50
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains
|
51
51
|
body: domain[name]=testdomain1.com
|
52
52
|
headers:
|
53
53
|
accept:
|
@@ -92,7 +92,7 @@
|
|
92
92
|
- !ruby/struct:VCR::HTTPInteraction
|
93
93
|
request: !ruby/struct:VCR::Request
|
94
94
|
method: :post
|
95
|
-
uri: https
|
95
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains
|
96
96
|
body: domain[name]=testdomain2.com
|
97
97
|
headers:
|
98
98
|
accept:
|
@@ -137,7 +137,7 @@
|
|
137
137
|
- !ruby/struct:VCR::HTTPInteraction
|
138
138
|
request: !ruby/struct:VCR::Request
|
139
139
|
method: :get
|
140
|
-
uri: https
|
140
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains
|
141
141
|
body:
|
142
142
|
headers:
|
143
143
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -47,7 +47,7 @@
|
|
47
47
|
- !ruby/struct:VCR::HTTPInteraction
|
48
48
|
request: !ruby/struct:VCR::Request
|
49
49
|
method: :get
|
50
|
-
uri: https
|
50
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
51
51
|
body:
|
52
52
|
headers:
|
53
53
|
accept:
|
@@ -92,7 +92,7 @@
|
|
92
92
|
- !ruby/struct:VCR::HTTPInteraction
|
93
93
|
request: !ruby/struct:VCR::Request
|
94
94
|
method: :get
|
95
|
-
uri: https
|
95
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/141/records
|
96
96
|
body:
|
97
97
|
headers:
|
98
98
|
accept:
|
@@ -137,7 +137,7 @@
|
|
137
137
|
- !ruby/struct:VCR::HTTPInteraction
|
138
138
|
request: !ruby/struct:VCR::Request
|
139
139
|
method: :get
|
140
|
-
uri: https
|
140
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/templates/googleapps
|
141
141
|
body:
|
142
142
|
headers:
|
143
143
|
accept:
|
@@ -182,7 +182,7 @@
|
|
182
182
|
- !ruby/struct:VCR::HTTPInteraction
|
183
183
|
request: !ruby/struct:VCR::Request
|
184
184
|
method: :post
|
185
|
-
uri: https
|
185
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/141/templates/3/apply
|
186
186
|
body:
|
187
187
|
headers:
|
188
188
|
accept:
|
@@ -227,7 +227,7 @@
|
|
227
227
|
- !ruby/struct:VCR::HTTPInteraction
|
228
228
|
request: !ruby/struct:VCR::Request
|
229
229
|
method: :get
|
230
|
-
uri: https
|
230
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
231
231
|
body:
|
232
232
|
headers:
|
233
233
|
accept:
|
@@ -272,7 +272,7 @@
|
|
272
272
|
- !ruby/struct:VCR::HTTPInteraction
|
273
273
|
request: !ruby/struct:VCR::Request
|
274
274
|
method: :get
|
275
|
-
uri: https
|
275
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/141/records
|
276
276
|
body:
|
277
277
|
headers:
|
278
278
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains
|
6
6
|
body: domain[name]=testdomain.com
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/141
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/141
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domain_registrations
|
6
6
|
body: domain[name]=testdomain-1306090283.net&contact[phone]=321%20555%201212&contact[state_province]=FL&contact[address1]=123%20SW%201st%20Street&contact[city]=Miami&contact[country]=US&contact[first_name]=John&contact[postal_code]=33143&contact[last_name]=Smith
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :post
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domain_registrations
|
6
6
|
body: domain[registrant_id]=4&domain[name]=testdomain-1306090402.net
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/extended_attributes/ca.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
authorization:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/extended_attributes/com.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
authorization:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -47,7 +47,7 @@
|
|
47
47
|
- !ruby/struct:VCR::HTTPInteraction
|
48
48
|
request: !ruby/struct:VCR::Request
|
49
49
|
method: :post
|
50
|
-
uri: https
|
50
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/155/records?record[content]=4.5.6.7&record[ttl]=3600&record[prio]=&record[name]=&record[record_type]=A
|
51
51
|
body:
|
52
52
|
headers:
|
53
53
|
accept:
|
@@ -92,7 +92,7 @@
|
|
92
92
|
- !ruby/struct:VCR::HTTPInteraction
|
93
93
|
request: !ruby/struct:VCR::Request
|
94
94
|
method: :get
|
95
|
-
uri: https
|
95
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
96
96
|
body:
|
97
97
|
headers:
|
98
98
|
accept:
|
@@ -137,7 +137,7 @@
|
|
137
137
|
- !ruby/struct:VCR::HTTPInteraction
|
138
138
|
request: !ruby/struct:VCR::Request
|
139
139
|
method: :post
|
140
|
-
uri: https
|
140
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/155/records?record[content]=testdomain.com&record[ttl]=3600&record[prio]=&record[name]=www&record[record_type]=CNAME
|
141
141
|
body:
|
142
142
|
headers:
|
143
143
|
accept:
|
@@ -182,7 +182,7 @@
|
|
182
182
|
- !ruby/struct:VCR::HTTPInteraction
|
183
183
|
request: !ruby/struct:VCR::Request
|
184
184
|
method: :get
|
185
|
-
uri: https
|
185
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
186
186
|
body:
|
187
187
|
headers:
|
188
188
|
accept:
|
@@ -227,7 +227,7 @@
|
|
227
227
|
- !ruby/struct:VCR::HTTPInteraction
|
228
228
|
request: !ruby/struct:VCR::Request
|
229
229
|
method: :post
|
230
|
-
uri: https
|
230
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/155/records?record[content]=mail.foo.com&record[ttl]=3600&record[prio]=10&record[name]=&record[record_type]=MX
|
231
231
|
body:
|
232
232
|
headers:
|
233
233
|
accept:
|
@@ -272,7 +272,7 @@
|
|
272
272
|
- !ruby/struct:VCR::HTTPInteraction
|
273
273
|
request: !ruby/struct:VCR::Request
|
274
274
|
method: :get
|
275
|
-
uri: https
|
275
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
276
276
|
body:
|
277
277
|
headers:
|
278
278
|
accept:
|
@@ -317,7 +317,7 @@
|
|
317
317
|
- !ruby/struct:VCR::HTTPInteraction
|
318
318
|
request: !ruby/struct:VCR::Request
|
319
319
|
method: :get
|
320
|
-
uri: https
|
320
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/155/records
|
321
321
|
body:
|
322
322
|
headers:
|
323
323
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -47,7 +47,7 @@
|
|
47
47
|
- !ruby/struct:VCR::HTTPInteraction
|
48
48
|
request: !ruby/struct:VCR::Request
|
49
49
|
method: :post
|
50
|
-
uri: https
|
50
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/141/records?record[content]=1.2.3.4&record[prio]=&record[ttl]=600&record[name]=&record[record_type]=A
|
51
51
|
body:
|
52
52
|
headers:
|
53
53
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/testdomain.com
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -47,7 +47,7 @@
|
|
47
47
|
- !ruby/struct:VCR::HTTPInteraction
|
48
48
|
request: !ruby/struct:VCR::Request
|
49
49
|
method: :get
|
50
|
-
uri: https
|
50
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/domains/141/records/193
|
51
51
|
body:
|
52
52
|
headers:
|
53
53
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/templates/googleapps
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri: https
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@test.dnsimple.com:443/users/me.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
authorization:
|
data/lib/dnsimple.rb
CHANGED
data/lib/dnsimple/certificate.rb
CHANGED
data/lib/dnsimple/client.rb
CHANGED
@@ -46,16 +46,21 @@ module DNSimple
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.load_credentials(path=config_path)
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
begin
|
50
|
+
credentials = YAML.load(File.new(File.expand_path(path)))
|
51
|
+
self.username = credentials['username']
|
52
|
+
self.password = credentials['password']
|
53
|
+
self.base_uri = credentials['site']
|
54
|
+
@@credentials_loaded = true
|
55
|
+
"Credentials loaded from #{path}"
|
56
|
+
rescue
|
57
|
+
puts "Error loading your credentials: #{$!.message}"
|
58
|
+
exit 1
|
59
|
+
end
|
55
60
|
end
|
56
61
|
|
57
62
|
def self.credentials_loaded?
|
58
|
-
@@credentials_loaded ||= false
|
63
|
+
(@@credentials_loaded ||= false) or (defined?(@@username) and defined?(@@password))
|
59
64
|
end
|
60
65
|
|
61
66
|
def self.standard_options
|
@@ -8,8 +8,8 @@ module DNSimple
|
|
8
8
|
puts "\tID: #{contact.id}"
|
9
9
|
puts "\tFirst Name: #{contact.first_name}"
|
10
10
|
puts "\tLast Name: #{contact.last_name}"
|
11
|
-
puts "\tOrganization Name: #{contact.organization_name}"
|
12
|
-
puts "\tJob Title: #{contact.job_title}"
|
11
|
+
puts "\tOrganization Name: #{contact.organization_name}" if contact.organization_name
|
12
|
+
puts "\tJob Title: #{contact.job_title}" if contact.job_title
|
13
13
|
puts "\tAddress 1: #{contact.address1}"
|
14
14
|
puts "\tAddress 2: #{contact.address2}"
|
15
15
|
puts "\tCity: #{contact.city}"
|
@@ -18,7 +18,7 @@ module DNSimple
|
|
18
18
|
puts "\tCountry: #{contact.country}"
|
19
19
|
puts "\tEmail: #{contact.email_address}"
|
20
20
|
puts "\tPhone: #{contact.phone}"
|
21
|
-
puts "\tPhone Ext: #{contact.phone_ext}"
|
21
|
+
puts "\tPhone Ext: #{contact.phone_ext}" if contact.phone_ext
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/lib/dnsimple/record.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe DNSimple::Certificate do
|
4
|
+
let(:domain) { DNSimple::Domain.new(:name => 'example.com') }
|
5
|
+
describe "#fqdn" do
|
6
|
+
it "joins the name and domain name" do
|
7
|
+
certificate = DNSimple::Certificate.new(:name => 'www')
|
8
|
+
certificate.domain = domain
|
9
|
+
certificate.fqdn.should eq('www.example.com')
|
10
|
+
end
|
11
|
+
it "strips blank parts from name" do
|
12
|
+
certificate = DNSimple::Certificate.new(:name => '')
|
13
|
+
certificate.domain = domain
|
14
|
+
certificate.fqdn.should eq('example.com')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/spec/record_spec.rb
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'spec_helper')
|
2
2
|
|
3
3
|
describe DNSimple::Record do
|
4
|
+
|
5
|
+
let(:domain) { DNSimple::Domain.new(:name => 'example.com') }
|
6
|
+
|
7
|
+
describe "#fqdn" do
|
8
|
+
it "joins the name and domain name" do
|
9
|
+
record = DNSimple::Record.new(:name => 'www', :domain => domain)
|
10
|
+
record.fqdn.should eq('www.example.com')
|
11
|
+
end
|
12
|
+
it "strips a blank name" do
|
13
|
+
record = DNSimple::Record.new(:name => '', :domain => domain)
|
14
|
+
record.fqdn.should eq('example.com')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
4
18
|
describe "creating a new record" do
|
5
19
|
use_vcr_cassette
|
6
20
|
it "has specific attributes" do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require 'vcr'
|
2
|
+
require 'cgi'
|
2
3
|
require 'lib/dnsimple'
|
3
4
|
|
4
5
|
VCR.config do |c|
|
5
6
|
c.cassette_library_dir = 'fixtures/vcr_cassettes'
|
6
7
|
c.stub_with :fakeweb
|
8
|
+
c.filter_sensitive_data("<USERNAME>") { CGI::escape(DNSimple::Client.username) }
|
9
|
+
c.filter_sensitive_data("<PASSWORD>") { CGI::escape(DNSimple::Client.password) }
|
7
10
|
end
|
8
11
|
|
9
12
|
RSpec.configure do |c|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsimple-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
7
9
|
- 0
|
8
|
-
|
9
|
-
- 9
|
10
|
-
version: 0.9.9
|
10
|
+
version: 1.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Anthony Eden
|
@@ -15,14 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable: dnsimple
|
18
|
+
date: 2011-11-03 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
name: httparty
|
25
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
21
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
22
|
none: false
|
27
23
|
requirements:
|
28
24
|
- - ">="
|
@@ -31,12 +27,12 @@ dependencies:
|
|
31
27
|
segments:
|
32
28
|
- 0
|
33
29
|
version: "0"
|
34
|
-
|
35
|
-
|
36
|
-
type: :development
|
30
|
+
version_requirements: *id001
|
31
|
+
name: httparty
|
37
32
|
prerelease: false
|
38
|
-
|
39
|
-
|
33
|
+
type: :runtime
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
36
|
none: false
|
41
37
|
requirements:
|
42
38
|
- - ">="
|
@@ -45,12 +41,12 @@ dependencies:
|
|
45
41
|
segments:
|
46
42
|
- 0
|
47
43
|
version: "0"
|
48
|
-
|
49
|
-
|
50
|
-
type: :development
|
44
|
+
version_requirements: *id002
|
45
|
+
name: rake
|
51
46
|
prerelease: false
|
52
|
-
|
53
|
-
|
47
|
+
type: :development
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
50
|
none: false
|
55
51
|
requirements:
|
56
52
|
- - ">="
|
@@ -59,12 +55,12 @@ dependencies:
|
|
59
55
|
segments:
|
60
56
|
- 0
|
61
57
|
version: "0"
|
62
|
-
|
63
|
-
|
64
|
-
type: :development
|
58
|
+
version_requirements: *id003
|
59
|
+
name: jeweler
|
65
60
|
prerelease: false
|
66
|
-
|
67
|
-
|
61
|
+
type: :development
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
68
64
|
none: false
|
69
65
|
requirements:
|
70
66
|
- - ">="
|
@@ -75,12 +71,12 @@ dependencies:
|
|
75
71
|
- 0
|
76
72
|
- 0
|
77
73
|
version: 2.0.0
|
78
|
-
|
79
|
-
|
80
|
-
type: :development
|
74
|
+
version_requirements: *id004
|
75
|
+
name: rspec
|
81
76
|
prerelease: false
|
82
|
-
|
83
|
-
|
77
|
+
type: :development
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
84
80
|
none: false
|
85
81
|
requirements:
|
86
82
|
- - ">="
|
@@ -89,12 +85,12 @@ dependencies:
|
|
89
85
|
segments:
|
90
86
|
- 0
|
91
87
|
version: "0"
|
92
|
-
|
93
|
-
|
94
|
-
type: :development
|
88
|
+
version_requirements: *id005
|
89
|
+
name: ruby-debug
|
95
90
|
prerelease: false
|
96
|
-
|
97
|
-
|
91
|
+
type: :development
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
98
94
|
none: false
|
99
95
|
requirements:
|
100
96
|
- - ">="
|
@@ -103,12 +99,12 @@ dependencies:
|
|
103
99
|
segments:
|
104
100
|
- 0
|
105
101
|
version: "0"
|
106
|
-
|
107
|
-
|
108
|
-
type: :development
|
102
|
+
version_requirements: *id006
|
103
|
+
name: cucumber
|
109
104
|
prerelease: false
|
110
|
-
|
111
|
-
|
105
|
+
type: :development
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
112
108
|
none: false
|
113
109
|
requirements:
|
114
110
|
- - ">="
|
@@ -117,12 +113,12 @@ dependencies:
|
|
117
113
|
segments:
|
118
114
|
- 0
|
119
115
|
version: "0"
|
120
|
-
|
121
|
-
|
122
|
-
type: :development
|
116
|
+
version_requirements: *id007
|
117
|
+
name: aruba
|
123
118
|
prerelease: false
|
124
|
-
|
125
|
-
|
119
|
+
type: :development
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
126
122
|
none: false
|
127
123
|
requirements:
|
128
124
|
- - ">="
|
@@ -131,12 +127,12 @@ dependencies:
|
|
131
127
|
segments:
|
132
128
|
- 0
|
133
129
|
version: "0"
|
134
|
-
|
135
|
-
|
136
|
-
type: :development
|
130
|
+
version_requirements: *id008
|
131
|
+
name: ruby-debug
|
137
132
|
prerelease: false
|
138
|
-
|
139
|
-
|
133
|
+
type: :development
|
134
|
+
- !ruby/object:Gem::Dependency
|
135
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
140
136
|
none: false
|
141
137
|
requirements:
|
142
138
|
- - ">="
|
@@ -145,12 +141,12 @@ dependencies:
|
|
145
141
|
segments:
|
146
142
|
- 0
|
147
143
|
version: "0"
|
148
|
-
|
149
|
-
|
150
|
-
type: :development
|
144
|
+
version_requirements: *id009
|
145
|
+
name: fakeweb
|
151
146
|
prerelease: false
|
152
|
-
|
153
|
-
|
147
|
+
type: :development
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
154
150
|
none: false
|
155
151
|
requirements:
|
156
152
|
- - ">="
|
@@ -159,12 +155,12 @@ dependencies:
|
|
159
155
|
segments:
|
160
156
|
- 0
|
161
157
|
version: "0"
|
162
|
-
|
163
|
-
|
164
|
-
type: :runtime
|
158
|
+
version_requirements: *id010
|
159
|
+
name: vcr
|
165
160
|
prerelease: false
|
166
|
-
|
167
|
-
|
161
|
+
type: :development
|
162
|
+
- !ruby/object:Gem::Dependency
|
163
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
168
164
|
none: false
|
169
165
|
requirements:
|
170
166
|
- - ">="
|
@@ -173,7 +169,10 @@ dependencies:
|
|
173
169
|
segments:
|
174
170
|
- 0
|
175
171
|
version: "0"
|
176
|
-
|
172
|
+
version_requirements: *id011
|
173
|
+
name: httparty
|
174
|
+
prerelease: false
|
175
|
+
type: :runtime
|
177
176
|
description: A ruby wrapper for the DNSimple API that also includes a command-line client.
|
178
177
|
email: anthony.eden@dnsimple.com
|
179
178
|
executables:
|
@@ -282,6 +281,7 @@ files:
|
|
282
281
|
- lib/dnsimple/transfer_order.rb
|
283
282
|
- lib/dnsimple/user.rb
|
284
283
|
- spec/README
|
284
|
+
- spec/certificate_spec.rb
|
285
285
|
- spec/contact_spec.rb
|
286
286
|
- spec/domain_spec.rb
|
287
287
|
- spec/extended_attributes_spec.rb
|
@@ -289,7 +289,6 @@ files:
|
|
289
289
|
- spec/spec_helper.rb
|
290
290
|
- spec/template_spec.rb
|
291
291
|
- spec/user_spec.rb
|
292
|
-
has_rdoc: true
|
293
292
|
homepage: http://github.com/aetrion/dnsimple-ruby
|
294
293
|
licenses: []
|
295
294
|
|
@@ -319,11 +318,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
319
318
|
requirements: []
|
320
319
|
|
321
320
|
rubyforge_project:
|
322
|
-
rubygems_version: 1.
|
321
|
+
rubygems_version: 1.8.10
|
323
322
|
signing_key:
|
324
323
|
specification_version: 3
|
325
324
|
summary: A ruby wrapper for the DNSimple API
|
326
325
|
test_files:
|
326
|
+
- spec/certificate_spec.rb
|
327
327
|
- spec/contact_spec.rb
|
328
328
|
- spec/domain_spec.rb
|
329
329
|
- spec/extended_attributes_spec.rb
|