dnsimple-ruby 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +9 -2
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +20 -0
- data/Gemfile +0 -2
- data/LICENSE +2 -2
- data/README.md +121 -0
- data/Rakefile +30 -14
- data/bin/dnsimple.rb +1 -1
- data/dnsimple-ruby.gemspec +9 -8
- data/features/README +1 -1
- data/features/step_definitions/cli_steps.rb +1 -1
- data/features/support/env.rb +4 -4
- data/fixtures/vcr_cassettes/DNSimple_Certificate/_all.yml +45 -32
- data/fixtures/vcr_cassettes/DNSimple_Certificate/_purchase.yml +45 -32
- data/fixtures/vcr_cassettes/DNSimple_Certificate/_submit.yml +45 -32
- data/fixtures/vcr_cassettes/DNSimple_Contact/a_new_contact.yml +39 -31
- data/fixtures/vcr_cassettes/DNSimple_Contact/an_existing_contact.yml +39 -31
- data/fixtures/vcr_cassettes/DNSimple_Domain/_all.yml +113 -94
- data/fixtures/vcr_cassettes/DNSimple_Domain/applying_templates.yml +186 -156
- data/fixtures/vcr_cassettes/DNSimple_Domain/creating_a_new_domain.yml +39 -32
- data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_id.yml +39 -32
- data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_name.yml +39 -32
- data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_a_new_registrant_contact.yml +40 -32
- data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_an_existing_contact.yml +40 -32
- data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_ca.yml +262 -29
- data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_com.yml +35 -29
- data/fixtures/vcr_cassettes/DNSimple_Record/_all.yml +147 -125
- data/fixtures/vcr_cassettes/DNSimple_Record/creating_a_new_record.yml +39 -32
- data/fixtures/vcr_cassettes/DNSimple_Record/find_a_record.yml +39 -32
- data/fixtures/vcr_cassettes/DNSimple_Template/a_template.yml +41 -32
- data/fixtures/vcr_cassettes/DNSimple_User/_me.yml +38 -31
- data/lib/dnsimple.rb +14 -1
- data/lib/dnsimple/base.rb +7 -5
- data/lib/dnsimple/certificate.rb +100 -95
- data/lib/dnsimple/cli.rb +92 -93
- data/lib/dnsimple/client.rb +109 -99
- data/lib/dnsimple/commands/{describe_certificate.rb → certificate_describe.rb} +2 -2
- data/lib/dnsimple/commands/{list_certificates.rb → certificate_list.rb} +2 -2
- data/lib/dnsimple/commands/{purchase_certificate.rb → certificate_purchase.rb} +3 -5
- data/lib/dnsimple/commands/{submit_certificate.rb → certificate_submit.rb} +3 -5
- data/lib/dnsimple/commands/{create_contact.rb → contact_create.rb} +8 -6
- data/lib/dnsimple/commands/{delete_contact.rb → contact_delete.rb} +2 -2
- data/lib/dnsimple/commands/{describe_contact.rb → contact_describe.rb} +2 -2
- data/lib/dnsimple/commands/{list_contacts.rb → contact_list.rb} +2 -2
- data/lib/dnsimple/commands/{update_contact.rb → contact_update.rb} +2 -2
- data/lib/dnsimple/commands/{apply_template.rb → domain_apply_template.rb} +2 -2
- data/lib/dnsimple/commands/{check_domain.rb → domain_check.rb} +2 -2
- data/lib/dnsimple/commands/{clear_domain.rb → domain_clear.rb} +2 -2
- data/lib/dnsimple/commands/{create_domain.rb → domain_create.rb} +2 -2
- data/lib/dnsimple/commands/{delete_domain.rb → domain_delete.rb} +2 -2
- data/lib/dnsimple/commands/{describe_domain.rb → domain_describe.rb} +2 -2
- data/lib/dnsimple/commands/{list_domains.rb → domain_list.rb} +2 -2
- data/lib/dnsimple/commands/{register_domain.rb → domain_register.rb} +2 -2
- data/lib/dnsimple/commands/{transfer_domain.rb → domain_transfer.rb} +2 -2
- data/lib/dnsimple/commands/{list_extended_attributes.rb → extended_attribute_list.rb} +2 -2
- data/lib/dnsimple/commands/{describe_user.rb → me.rb} +2 -2
- data/lib/dnsimple/commands/{create_record.rb → record_create.rb} +5 -7
- data/lib/dnsimple/commands/{delete_record.rb → record_delete.rb} +2 -2
- data/lib/dnsimple/commands/{describe_record.rb → record_describe.rb} +2 -2
- data/lib/dnsimple/commands/{list_records.rb → record_list.rb} +4 -6
- data/lib/dnsimple/commands/{update_record.rb → record_update.rb} +2 -2
- data/lib/dnsimple/commands/{add_service.rb → service_add.rb} +3 -5
- data/lib/dnsimple/commands/{describe_service.rb → service_describe.rb} +2 -2
- data/lib/dnsimple/commands/{list_services.rb → service_list.rb} +2 -2
- data/lib/dnsimple/commands/{list_applied_services.rb → service_list_applied.rb} +2 -2
- data/lib/dnsimple/commands/{list_available_services.rb → service_list_available.rb} +2 -2
- data/lib/dnsimple/commands/{remove_service.rb → service_remove.rb} +2 -2
- data/lib/dnsimple/commands/{create_template.rb → template_create.rb} +2 -2
- data/lib/dnsimple/commands/{delete_template.rb → template_delete.rb} +2 -2
- data/lib/dnsimple/commands/{add_template_record.rb → template_record_create.rb} +2 -2
- data/lib/dnsimple/commands/{delete_template_record.rb → template_record_delete.rb} +2 -2
- data/lib/dnsimple/commands/{list_template_records.rb → template_record_list.rb} +2 -2
- data/lib/dnsimple/commands/{list_templates.rb → templates_list.rb} +2 -2
- data/lib/dnsimple/contact.rb +115 -110
- data/lib/dnsimple/domain.rb +134 -132
- data/lib/dnsimple/error.rb +8 -19
- data/lib/dnsimple/extended_attribute.rb +39 -33
- data/lib/dnsimple/record.rb +71 -67
- data/lib/dnsimple/service.rb +31 -24
- data/lib/dnsimple/template.rb +52 -46
- data/lib/dnsimple/template_record.rb +61 -53
- data/lib/dnsimple/transfer_order.rb +24 -18
- data/lib/dnsimple/user.rb +22 -18
- data/lib/dnsimple/version.rb +1 -1
- data/spec/README +1 -1
- data/spec/ci/.dnsimple.test +3 -0
- data/spec/commands/{purchase_certificate_spec.rb → certificate_purchase_spec.rb} +3 -4
- data/spec/commands/{submit_certificate_spec.rb → certificate_submit_spec.rb} +3 -4
- data/spec/commands/{create_record_spec.rb → record_create_spec.rb} +4 -4
- data/spec/commands/{list_records_spec.rb → records_list_spec.rb} +2 -13
- data/spec/commands/{add_service_spec.rb → service_add_spec.rb} +3 -12
- data/spec/{certificate_spec.rb → dnsimple/certificate_spec.rb} +0 -0
- data/spec/dnsimple/client_spec.rb +45 -18
- data/spec/{contact_spec.rb → dnsimple/contact_spec.rb} +3 -1
- data/spec/{domain_spec.rb → dnsimple/domain_spec.rb} +2 -0
- data/spec/{extended_attributes_spec.rb → dnsimple/extended_attributes_spec.rb} +4 -0
- data/spec/{record_spec.rb → dnsimple/record_spec.rb} +2 -0
- data/spec/{template_spec.rb → dnsimple/template_spec.rb} +0 -0
- data/spec/{user_spec.rb → dnsimple/user_spec.rb} +2 -0
- data/spec/spec_helper.rb +24 -10
- metadata +96 -99
- data/Gemfile.lock +0 -71
- data/README +0 -108
- data/README.rdoc +0 -108
- data/README.textile +0 -138
- data/lib/dnsimple/command.rb +0 -10
- data/spec/command_spec.rb +0 -19
data/Gemfile.lock
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
dnsimple-ruby (1.3.0)
|
5
|
-
httparty
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
aruba (0.4.7)
|
11
|
-
childprocess (>= 0.2.2)
|
12
|
-
cucumber (>= 1.1.1)
|
13
|
-
ffi (= 1.0.9)
|
14
|
-
rspec (>= 2.7.0)
|
15
|
-
builder (3.0.0)
|
16
|
-
childprocess (0.2.2)
|
17
|
-
ffi (~> 1.0.6)
|
18
|
-
columnize (0.3.4)
|
19
|
-
cucumber (1.1.2)
|
20
|
-
builder (>= 2.1.2)
|
21
|
-
diff-lcs (>= 1.1.2)
|
22
|
-
gherkin (~> 2.6.2)
|
23
|
-
json (>= 1.4.6)
|
24
|
-
term-ansicolor (>= 1.0.6)
|
25
|
-
diff-lcs (1.1.3)
|
26
|
-
fakeweb (1.3.0)
|
27
|
-
ffi (1.0.9)
|
28
|
-
gherkin (2.6.3)
|
29
|
-
json (>= 1.4.6)
|
30
|
-
httparty (0.8.1)
|
31
|
-
multi_json
|
32
|
-
multi_xml
|
33
|
-
json (1.6.1)
|
34
|
-
linecache (0.46)
|
35
|
-
rbx-require-relative (> 0.0.4)
|
36
|
-
metaclass (0.0.1)
|
37
|
-
mocha (0.10.0)
|
38
|
-
metaclass (~> 0.0.1)
|
39
|
-
multi_json (1.0.3)
|
40
|
-
multi_xml (0.4.1)
|
41
|
-
rake (0.9.2.2)
|
42
|
-
rbx-require-relative (0.0.5)
|
43
|
-
rspec (2.7.0)
|
44
|
-
rspec-core (~> 2.7.0)
|
45
|
-
rspec-expectations (~> 2.7.0)
|
46
|
-
rspec-mocks (~> 2.7.0)
|
47
|
-
rspec-core (2.7.1)
|
48
|
-
rspec-expectations (2.7.0)
|
49
|
-
diff-lcs (~> 1.1.2)
|
50
|
-
rspec-mocks (2.7.0)
|
51
|
-
ruby-debug (0.10.4)
|
52
|
-
columnize (>= 0.1)
|
53
|
-
ruby-debug-base (~> 0.10.4.0)
|
54
|
-
ruby-debug-base (0.10.4)
|
55
|
-
linecache (>= 0.3)
|
56
|
-
term-ansicolor (1.0.7)
|
57
|
-
vcr (1.11.3)
|
58
|
-
|
59
|
-
PLATFORMS
|
60
|
-
ruby
|
61
|
-
|
62
|
-
DEPENDENCIES
|
63
|
-
aruba
|
64
|
-
cucumber
|
65
|
-
dnsimple-ruby!
|
66
|
-
fakeweb
|
67
|
-
mocha
|
68
|
-
rake
|
69
|
-
rspec (>= 2.0.0)
|
70
|
-
ruby-debug
|
71
|
-
vcr
|
data/README
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
A Ruby command line utility and wrapper for the DNSimple API.
|
2
|
-
|
3
|
-
DNSimple is a hosted DNS service that can be found at http://dnsimple.com/
|
4
|
-
|
5
|
-
== Credentials
|
6
|
-
|
7
|
-
Create a file in your home directory called .dnsimple
|
8
|
-
|
9
|
-
In this file add the following:
|
10
|
-
|
11
|
-
username: YOUR_USERNAME
|
12
|
-
password: YOUR_PASSWORD
|
13
|
-
|
14
|
-
== Commands
|
15
|
-
|
16
|
-
There are two ways to interact with the DNSimple Ruby wrapper. The first is
|
17
|
-
to use the command line utility that is included. The commands available
|
18
|
-
are as follows:
|
19
|
-
|
20
|
-
For help:
|
21
|
-
|
22
|
-
* dnsimple help
|
23
|
-
|
24
|
-
The following commands are available for domains:
|
25
|
-
|
26
|
-
* dnsimple list
|
27
|
-
* dnsimple describe domain.com
|
28
|
-
* dnsimple create domain.com
|
29
|
-
* dnsimple register domain.com registrant_id
|
30
|
-
* dnsimple transfer domain.com registrant_id [authinfo]
|
31
|
-
* dnsimple delete domain.com
|
32
|
-
* dnsimple apply domain.com template_short_name
|
33
|
-
|
34
|
-
Please note that domain registration and transfer can only be done through the API for domains that do not require extended attributes. A future version of the API will add support for extended attributes.
|
35
|
-
|
36
|
-
The following commands are available for records:
|
37
|
-
|
38
|
-
* dnsimple record:create [--prio=priority] domain.com name type content [ttl]
|
39
|
-
* dnsimple record:list domain.com
|
40
|
-
* dnsimple record:delete domain.com record_id
|
41
|
-
|
42
|
-
The following commands are available for custom templates:
|
43
|
-
|
44
|
-
* dnsimple template:list
|
45
|
-
* dnsimple template:create name short_name [description]
|
46
|
-
* dnsimple template:delete short_name
|
47
|
-
* dnsimple template:list_records short_name
|
48
|
-
* dnsimple template:add_record short_name name type content [ttl] [prio]
|
49
|
-
* dnsimple template:delete_record short_name template_record_id
|
50
|
-
|
51
|
-
The following commands are available for managing contacts:
|
52
|
-
|
53
|
-
* dnsimple contact:list
|
54
|
-
* dnsimple contact:describe id
|
55
|
-
* dnsimple contact:create [name:value name:value ...]
|
56
|
-
* dnsimple contact:update id [name:value name:value ...]
|
57
|
-
* dnsimple contact:delete id
|
58
|
-
|
59
|
-
The following commands are available for purchasing certificates:
|
60
|
-
|
61
|
-
* dnsimple certificate:purchase domain.com name contact_id
|
62
|
-
* dnsimple certificate:submit id
|
63
|
-
|
64
|
-
The contact name/value pairs are:
|
65
|
-
|
66
|
-
* first_name
|
67
|
-
* last_name
|
68
|
-
* organization_name (optional)
|
69
|
-
* job_title (required if organization name is specified)
|
70
|
-
* address1
|
71
|
-
* address2 (optional)
|
72
|
-
* city
|
73
|
-
* state_province (also aliased as state)
|
74
|
-
* postal_code
|
75
|
-
* country
|
76
|
-
* email
|
77
|
-
* phone
|
78
|
-
* phone_ext (optional)
|
79
|
-
* fax (optional)
|
80
|
-
|
81
|
-
== Wrapper Classes
|
82
|
-
|
83
|
-
In addition to the command line utility you may also use the included Ruby
|
84
|
-
classes directly in your Ruby applications.
|
85
|
-
|
86
|
-
Sample:
|
87
|
-
|
88
|
-
require 'rubygems'
|
89
|
-
require 'dnsimple'
|
90
|
-
|
91
|
-
DNSimple::Client.username = 'YOUR_USERNAME'
|
92
|
-
DNSimple::Client.password = 'YOUR_PASSWORD'
|
93
|
-
|
94
|
-
puts "Domains..."
|
95
|
-
Domain.all.each do |domain|
|
96
|
-
puts " #{domain.name}"
|
97
|
-
end
|
98
|
-
|
99
|
-
domain = Domain.find("example.com")
|
100
|
-
domain.apply("template") # applies a standard or custom template to the domain
|
101
|
-
|
102
|
-
domain = Domain.create("newdomain.com")
|
103
|
-
puts "Added #{domain.name}"
|
104
|
-
domain.delete # removes from DNSimple
|
105
|
-
|
106
|
-
The complete RDoc for the wrapper classes can be found here:
|
107
|
-
|
108
|
-
http://rubydoc.info/gems/dnsimple-ruby/1.2.6/
|
data/README.rdoc
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
A Ruby wrapper for the DNSimple API.
|
2
|
-
|
3
|
-
== Credentials
|
4
|
-
|
5
|
-
Create a file in your home directory called .dnsimple
|
6
|
-
|
7
|
-
In this file add the following:
|
8
|
-
|
9
|
-
username: YOUR_USERNAME
|
10
|
-
password: YOUR_PASSWORD
|
11
|
-
|
12
|
-
Alternatively you can pass the credentials via command-line arguments, as in:
|
13
|
-
|
14
|
-
dnsimple -u username -p password command
|
15
|
-
|
16
|
-
|
17
|
-
== Commands
|
18
|
-
|
19
|
-
The following commands are available for domains:
|
20
|
-
|
21
|
-
* dnsimple list
|
22
|
-
* dnsimple describe domain.com
|
23
|
-
* dnsimple create domain.com
|
24
|
-
* dnsimple register domain.com registrant_id
|
25
|
-
* dnsimple transfer domain.com registrant_id [authinfo]
|
26
|
-
* dnsimple delete domain.com
|
27
|
-
* dnsimple apply domain.com template_short_name
|
28
|
-
|
29
|
-
Please note that domain registration and transfer can only be done through the API for domains that do not require extended attributes. A future version of the API will add support for extended attributes.
|
30
|
-
|
31
|
-
The following commands are available for records:
|
32
|
-
|
33
|
-
* dnsimple record:create [--prio=priority] domain.com name type content [ttl]
|
34
|
-
* dnsimple record:list domain.com
|
35
|
-
* dnsimple record:delete domain.com record_id
|
36
|
-
|
37
|
-
The following commands are available for custom templates:
|
38
|
-
|
39
|
-
* dnsimple template:list
|
40
|
-
* dnsimple template:create name short_name [description]
|
41
|
-
* dnsimple template:delete short_name
|
42
|
-
* dnsimple template:list_records short_name
|
43
|
-
* dnsimple template:add_record short_name name type content [ttl] [prio]
|
44
|
-
* dnsimple template:delete_record short_name template_record_id
|
45
|
-
|
46
|
-
The following commands are available for managing contacts:
|
47
|
-
|
48
|
-
* dnsimple contact:list
|
49
|
-
* dnsimple contact:describe id
|
50
|
-
* dnsimple contact:create [name:value name:value ...]
|
51
|
-
* dnsimple contact:update id [name:value name:value ...]
|
52
|
-
* dnsimple contact:delete id
|
53
|
-
|
54
|
-
The following commands are available for purchasing certificates:
|
55
|
-
|
56
|
-
* dnsimple certificate:purchase domain.com name
|
57
|
-
* dnsimple certificate:submit id
|
58
|
-
|
59
|
-
=== Contact Attributes
|
60
|
-
|
61
|
-
The contact attributes that can be used in the name:value pairs are:
|
62
|
-
|
63
|
-
* first_name
|
64
|
-
* last_name
|
65
|
-
* organization_name (optional)
|
66
|
-
* job_title (required if organization name is specified)
|
67
|
-
* address1
|
68
|
-
* address2 (optional)
|
69
|
-
* city
|
70
|
-
* state_province (also aliased as state)
|
71
|
-
* postal_code
|
72
|
-
* country
|
73
|
-
* email
|
74
|
-
* phone
|
75
|
-
* phone_ext (optional)
|
76
|
-
* fax (optional)
|
77
|
-
|
78
|
-
== Wrapper Classes
|
79
|
-
|
80
|
-
In addition to the command line utility you may also use the included Ruby
|
81
|
-
classes directly in your Ruby applications.
|
82
|
-
|
83
|
-
Sample:
|
84
|
-
|
85
|
-
require 'rubygems'
|
86
|
-
require 'dnsimple'
|
87
|
-
|
88
|
-
DNSimple::Client.username = 'YOUR_USERNAME'
|
89
|
-
DNSimple::Client.password = 'YOUR_PASSWORD'
|
90
|
-
|
91
|
-
user = User.me
|
92
|
-
puts "#{user.domain_count} domains"
|
93
|
-
|
94
|
-
puts "Domains..."
|
95
|
-
Domain.all.each do |domain|
|
96
|
-
puts " #{domain.name}"
|
97
|
-
end
|
98
|
-
|
99
|
-
domain = Domain.find("example.com")
|
100
|
-
domain.apply("template") # applies a standard or custom template to the domain
|
101
|
-
|
102
|
-
domain = Domain.create("newdomain.com")
|
103
|
-
puts "Added #{domain.name}"
|
104
|
-
domain.delete # removes from DNSimple
|
105
|
-
|
106
|
-
The complete RDoc for the wrapper classes can be found here:
|
107
|
-
|
108
|
-
http://rubydoc.info/gems/dnsimple-ruby/1.2.6/
|
data/README.textile
DELETED
@@ -1,138 +0,0 @@
|
|
1
|
-
A Ruby command line utility and wrapper for the DNSimple API.
|
2
|
-
|
3
|
-
DNSimple is a hosted DNS service that can be found at "http://dnsimple.com/":http://dnsimple.com/
|
4
|
-
|
5
|
-
h2. Installation
|
6
|
-
|
7
|
-
<pre><code>[sudo] gem install dnsimple-ruby</code></pre>
|
8
|
-
|
9
|
-
h2. Credentials
|
10
|
-
|
11
|
-
Create a file in your home directory called .dnsimple
|
12
|
-
|
13
|
-
In this file add the following:
|
14
|
-
|
15
|
-
<pre><code>username: YOUR_USERNAME
|
16
|
-
password: YOUR_PASSWORD
|
17
|
-
</code></pre>
|
18
|
-
|
19
|
-
Alternatively you can pass the credentials via command-line arguments, as in:
|
20
|
-
|
21
|
-
<pre><code>dnsimple -u username -p password list</code></pre>
|
22
|
-
|
23
|
-
h2. Commands
|
24
|
-
|
25
|
-
There are two ways to interact with the DNSimple Ruby wrapper. The first is
|
26
|
-
to use the command line utility that is included.
|
27
|
-
|
28
|
-
The commands available are as follows:
|
29
|
-
|
30
|
-
For help:
|
31
|
-
|
32
|
-
* dnsimple help
|
33
|
-
|
34
|
-
The following commands are available for domains:
|
35
|
-
|
36
|
-
* dnsimple list
|
37
|
-
* dnsimple describe domain.com
|
38
|
-
* dnsimple create domain.com
|
39
|
-
* dnsimple register domain.com registrant_id
|
40
|
-
* dnsimple transfer domain.com registrant_id [authinfo]
|
41
|
-
* dnsimple delete domain.com
|
42
|
-
* dnsimple apply domain.com template_short_name
|
43
|
-
|
44
|
-
Please note that domain registration and transfer can only be done through the API for domains that do not require extended attributes. A future version of the API will add support for extended attributes.
|
45
|
-
|
46
|
-
The following commands are available for records:
|
47
|
-
|
48
|
-
* dnsimple record:create [--prio=priority] domain.com name type content [ttl]
|
49
|
-
* dnsimple record:list domain.com
|
50
|
-
* dnsimple record:delete domain.com record_id
|
51
|
-
|
52
|
-
The following commands are available for custom templates:
|
53
|
-
|
54
|
-
* dnsimple template:list
|
55
|
-
* dnsimple template:create name short_name [description]
|
56
|
-
* dnsimple template:delete short_name
|
57
|
-
* dnsimple template:list_records short_name
|
58
|
-
* dnsimple template:add_record short_name name type content [ttl] [prio]
|
59
|
-
* dnsimple template:delete_record short_name template_record_id
|
60
|
-
|
61
|
-
The following commands are available for managing contacts:
|
62
|
-
|
63
|
-
* dnsimple contact:list
|
64
|
-
* dnsimple contact:describe id
|
65
|
-
* dnsimple contact:create [name:value name:value ...]
|
66
|
-
* dnsimple contact:update id [name:value name:value ...]
|
67
|
-
* dnsimple contact:delete id
|
68
|
-
|
69
|
-
To list all extended attributes for a given TLD:
|
70
|
-
|
71
|
-
* dnsimple extended-attributes:list tld
|
72
|
-
|
73
|
-
The following commands are available for listing services and adding and removing them from domains
|
74
|
-
|
75
|
-
* service:list
|
76
|
-
* service:describe short_name
|
77
|
-
* service:applied domain.com
|
78
|
-
* service:available domain.com
|
79
|
-
* service:add domain.com short_name
|
80
|
-
* service:remove domain.com short_name
|
81
|
-
|
82
|
-
The following commands are available for purchasing certificates:
|
83
|
-
|
84
|
-
* dnsimple certificate:purchase domain.com name
|
85
|
-
* dnsimple certificate:submit domain.com id approver_email
|
86
|
-
|
87
|
-
h3. Contact Attributes
|
88
|
-
|
89
|
-
The contact attributes that can be used in the name:value pairs are:
|
90
|
-
|
91
|
-
* first_name
|
92
|
-
* last_name
|
93
|
-
* organization_name (optional)
|
94
|
-
* job_title (required if organization name is specified)
|
95
|
-
* address1
|
96
|
-
* address2 (optional)
|
97
|
-
* city
|
98
|
-
* state_province (also aliased as state)
|
99
|
-
* postal_code
|
100
|
-
* country
|
101
|
-
* email
|
102
|
-
* phone
|
103
|
-
* phone_ext (optional)
|
104
|
-
* fax (optional)
|
105
|
-
|
106
|
-
h2. Wrapper Classes
|
107
|
-
|
108
|
-
In addition to the command line utility you may also use the included Ruby
|
109
|
-
classes directly in your Ruby applications.
|
110
|
-
|
111
|
-
Sample:
|
112
|
-
|
113
|
-
<pre><code>
|
114
|
-
require 'rubygems'
|
115
|
-
require 'dnsimple'
|
116
|
-
|
117
|
-
DNSimple::Client.username = 'YOUR_USERNAME'
|
118
|
-
DNSimple::Client.password = 'YOUR_PASSWORD'
|
119
|
-
|
120
|
-
user = User.me
|
121
|
-
puts "#{user.domain_count} domains"
|
122
|
-
|
123
|
-
puts "Domains..."
|
124
|
-
Domain.all.each do |domain|
|
125
|
-
puts " #{domain.name}"
|
126
|
-
end
|
127
|
-
|
128
|
-
domain = Domain.find("example.com")
|
129
|
-
domain.apply("template") # applies a standard or custom template to the domain
|
130
|
-
|
131
|
-
domain = Domain.create("newdomain.com")
|
132
|
-
puts "Added #{domain.name}"
|
133
|
-
domain.delete # removes from DNSimple
|
134
|
-
</pre></code>
|
135
|
-
|
136
|
-
The complete RDoc for the wrapper classes can be found here:
|
137
|
-
|
138
|
-
"http://rubydoc.info/gems/dnsimple-ruby/1.2.6/":http://rubydoc.info/gems/dnsimple-ruby/1.2.6/
|
data/lib/dnsimple/command.rb
DELETED
data/spec/command_spec.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'dnsimple/command'
|
3
|
-
|
4
|
-
class FakeCommand < DNSimple::Command
|
5
|
-
def execute
|
6
|
-
say "done"
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
describe DNSimple::Command do
|
11
|
-
describe "#say" do
|
12
|
-
it "writes to the output" do
|
13
|
-
s = StringIO.new
|
14
|
-
command = FakeCommand.new(s)
|
15
|
-
command.execute
|
16
|
-
s.string.should eq("done\n")
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|