sparqcode-dnsimple-ruby 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/.bundle/config +3 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +16 -0
  4. data/Gemfile.lock +71 -0
  5. data/LICENSE +22 -0
  6. data/README +125 -0
  7. data/README.rdoc +125 -0
  8. data/README.textile +161 -0
  9. data/Rakefile +33 -0
  10. data/VERSION +1 -0
  11. data/bin/dnsimple +4 -0
  12. data/bin/dnsimple.rb +153 -0
  13. data/dnsimple-ruby.gemspec +191 -0
  14. data/features/README +12 -0
  15. data/features/cli/certificates/purchase_certificate.feature +10 -0
  16. data/features/cli/contacts/create_contact.feature +10 -0
  17. data/features/cli/domains/check_domain.feature +10 -0
  18. data/features/cli/domains/create_domain.feature +10 -0
  19. data/features/cli/domains/delete_domain.feature +11 -0
  20. data/features/cli/domains/register_domain.feature +10 -0
  21. data/features/cli/records/create_ptr_record.feature +11 -0
  22. data/features/cli/records/create_record.feature +12 -0
  23. data/features/cli/records/delete_record.feature +14 -0
  24. data/features/cli/templates/apply_template.feature +11 -0
  25. data/features/step_definitions/certificate_steps.rb +3 -0
  26. data/features/step_definitions/cli_steps.rb +8 -0
  27. data/features/step_definitions/domain_steps.rb +32 -0
  28. data/features/step_definitions/record_steps.rb +38 -0
  29. data/features/step_definitions/template_steps.rb +9 -0
  30. data/features/support/env.rb +17 -0
  31. data/fixtures/vcr_cassettes/DNSimple_Certificate/_all.yml +44 -0
  32. data/fixtures/vcr_cassettes/DNSimple_Certificate/_purchase.yml +44 -0
  33. data/fixtures/vcr_cassettes/DNSimple_Certificate/_submit.yml +44 -0
  34. data/fixtures/vcr_cassettes/DNSimple_Contact/a_new_contact.yml +42 -0
  35. data/fixtures/vcr_cassettes/DNSimple_Contact/an_existing_contact.yml +42 -0
  36. data/fixtures/vcr_cassettes/DNSimple_Domain/_all.yml +130 -0
  37. data/fixtures/vcr_cassettes/DNSimple_Domain/applying_templates.yml +216 -0
  38. data/fixtures/vcr_cassettes/DNSimple_Domain/creating_a_new_domain.yml +44 -0
  39. data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_id.yml +44 -0
  40. data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_name.yml +44 -0
  41. data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_a_new_registrant_contact.yml +44 -0
  42. data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_an_existing_contact.yml +44 -0
  43. data/fixtures/vcr_cassettes/DNSimple_Domain/setting_name_servers.yml +30 -0
  44. data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_ca.yml +40 -0
  45. data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_com.yml +40 -0
  46. data/fixtures/vcr_cassettes/DNSimple_Record/_all.yml +173 -0
  47. data/fixtures/vcr_cassettes/DNSimple_Record/creating_a_new_record.yml +44 -0
  48. data/fixtures/vcr_cassettes/DNSimple_Record/find_a_record.yml +44 -0
  49. data/fixtures/vcr_cassettes/DNSimple_Template/a_template.yml +44 -0
  50. data/fixtures/vcr_cassettes/DNSimple_User/_me.yml +42 -0
  51. data/lib/dnsimple.rb +19 -0
  52. data/lib/dnsimple/certificate.rb +158 -0
  53. data/lib/dnsimple/cli.rb +122 -0
  54. data/lib/dnsimple/client.rb +74 -0
  55. data/lib/dnsimple/command.rb +10 -0
  56. data/lib/dnsimple/commands/add_service.rb +16 -0
  57. data/lib/dnsimple/commands/add_template_record.rb +18 -0
  58. data/lib/dnsimple/commands/apply_template.rb +15 -0
  59. data/lib/dnsimple/commands/check_domain.rb +11 -0
  60. data/lib/dnsimple/commands/clear_domain.rb +16 -0
  61. data/lib/dnsimple/commands/create_contact.rb +21 -0
  62. data/lib/dnsimple/commands/create_domain.rb +16 -0
  63. data/lib/dnsimple/commands/create_record.rb +20 -0
  64. data/lib/dnsimple/commands/create_template.rb +14 -0
  65. data/lib/dnsimple/commands/delete_contact.rb +14 -0
  66. data/lib/dnsimple/commands/delete_domain.rb +14 -0
  67. data/lib/dnsimple/commands/delete_record.rb +16 -0
  68. data/lib/dnsimple/commands/delete_template.rb +13 -0
  69. data/lib/dnsimple/commands/delete_template_record.rb +16 -0
  70. data/lib/dnsimple/commands/describe_certificate.rb +34 -0
  71. data/lib/dnsimple/commands/describe_contact.rb +25 -0
  72. data/lib/dnsimple/commands/describe_domain.rb +14 -0
  73. data/lib/dnsimple/commands/describe_record.rb +16 -0
  74. data/lib/dnsimple/commands/describe_service.rb +12 -0
  75. data/lib/dnsimple/commands/describe_user.rb +18 -0
  76. data/lib/dnsimple/commands/list_applied_services.rb +16 -0
  77. data/lib/dnsimple/commands/list_available_services.rb +16 -0
  78. data/lib/dnsimple/commands/list_certificates.rb +15 -0
  79. data/lib/dnsimple/commands/list_contacts.rb +13 -0
  80. data/lib/dnsimple/commands/list_domains.rb +13 -0
  81. data/lib/dnsimple/commands/list_extended_attributes.rb +25 -0
  82. data/lib/dnsimple/commands/list_records.rb +21 -0
  83. data/lib/dnsimple/commands/list_services.rb +14 -0
  84. data/lib/dnsimple/commands/list_template_records.rb +17 -0
  85. data/lib/dnsimple/commands/list_templates.rb +13 -0
  86. data/lib/dnsimple/commands/purchase_certificate.rb +19 -0
  87. data/lib/dnsimple/commands/register_domain.rb +33 -0
  88. data/lib/dnsimple/commands/remove_service.rb +14 -0
  89. data/lib/dnsimple/commands/submit_certificate.rb +19 -0
  90. data/lib/dnsimple/commands/transfer_domain.rb +21 -0
  91. data/lib/dnsimple/commands/update_contact.rb +25 -0
  92. data/lib/dnsimple/commands/update_record.rb +23 -0
  93. data/lib/dnsimple/contact.rb +181 -0
  94. data/lib/dnsimple/domain.rb +246 -0
  95. data/lib/dnsimple/error.rb +32 -0
  96. data/lib/dnsimple/extended_attribute.rb +73 -0
  97. data/lib/dnsimple/record.rb +128 -0
  98. data/lib/dnsimple/service.rb +58 -0
  99. data/lib/dnsimple/template.rb +91 -0
  100. data/lib/dnsimple/template_record.rb +103 -0
  101. data/lib/dnsimple/transfer_order.rb +45 -0
  102. data/lib/dnsimple/user.rb +44 -0
  103. data/spec/README +10 -0
  104. data/spec/certificate_spec.rb +46 -0
  105. data/spec/command_spec.rb +19 -0
  106. data/spec/commands/add_service_spec.rb +29 -0
  107. data/spec/commands/create_record_spec.rb +23 -0
  108. data/spec/commands/list_records_spec.rb +34 -0
  109. data/spec/commands/purchase_certificate_spec.rb +24 -0
  110. data/spec/commands/submit_certificate_spec.rb +19 -0
  111. data/spec/contact_spec.rb +35 -0
  112. data/spec/domain_spec.rb +97 -0
  113. data/spec/extended_attributes_spec.rb +19 -0
  114. data/spec/record_spec.rb +59 -0
  115. data/spec/spec_helper.rb +22 -0
  116. data/spec/template_spec.rb +11 -0
  117. data/spec/user_spec.rb +23 -0
  118. metadata +353 -0
@@ -0,0 +1,11 @@
1
+ Feature: delete a domain with the CLI
2
+ As a user
3
+ In order to remove a domain from my account
4
+ I should be able to use the CLI to delete domains
5
+
6
+ @announce-cmd @skip-delete
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple delete` with a domain I created
10
+ Then the output should show that the domain was deleted
11
+
@@ -0,0 +1,10 @@
1
+ Feature: register a domain with the CLI
2
+ As a user
3
+ In order to register a domain
4
+ I should be able to use the CLI for domain registration
5
+
6
+ @announce-cmd @announce-stdout
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple register` with a new domain
10
+ Then the output should show that the domain was registered
@@ -0,0 +1,11 @@
1
+ Feature: add a PTR record with the CLI
2
+ As a user
3
+ In order to add a PTR record to a domain in my account
4
+ I should be able to use the CLI to add the PTR record
5
+
6
+ @announce-cmd @announce-stdout
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple create` with a in-addr.arpa domain
10
+ And I run `dnsimple record:create` with the domain I added and the name "1" and the type "PTR" and the content "domain.com"
11
+ Then the output should show that the "PTR" record was created
@@ -0,0 +1,12 @@
1
+ Feature: add a record with the CLI
2
+ As a user
3
+ In order to add records to a domain in my account
4
+ I should be able to use the CLI to add records
5
+
6
+ @announce-cmd @announce-stdout
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple create` with a new domain
10
+ And I run `dnsimple record:create` with the domain I added and no name and the type "A" and the content "1.2.3.4"
11
+ Then the output should show that the "A" record was created
12
+ And the output should include the record id
@@ -0,0 +1,14 @@
1
+ Feature: delete a record with the CLI
2
+ As a user
3
+ In order to remove a record from a domain in my account
4
+ I should be able to use the CLI to delete a record
5
+
6
+ @announce-cmd @announce-stdout
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple create` with a new domain
10
+ And I run `dnsimple record:create` with the domain I added and no name and the type "A" and the content "1.2.3.4"
11
+ And I note the id of the record I added
12
+ And I run `dnsimple record:delete` with the id of the record
13
+ Then the output should show that the record was deleted
14
+
@@ -0,0 +1,11 @@
1
+ Feature: apply a template to a domain
2
+ As a user
3
+ In order to apply a set of records to a domain at once
4
+ I should be able to use the CLI to apply a template
5
+
6
+ Scenario:
7
+ Given I have set up my credentials
8
+ When I run `dnsimple create` with a new domain
9
+ And I run `dnsimple apply` with the domain and the template named "googleapps"
10
+ Then the output should show that the template was applied
11
+ And I the domain should have 13 records
@@ -0,0 +1,3 @@
1
+ Then /^the output should show that a certificate was purchased$/ do
2
+ steps %Q(Then the output should contain "Purchased certificate for #{@domain_name}")
3
+ end
@@ -0,0 +1,8 @@
1
+ Given /^I have set up my credentials$/ do
2
+ path = DNSimple::Client.config_path
3
+ File.exists?(File.expand_path(path)).should be_true, "Please set up your #{path} file to continue"
4
+ credentials = YAML.load(File.new(File.expand_path(path)))
5
+ credentials['username'].should_not be_nil, "You must specify a username in your #{path} file"
6
+ credentials['password'].should_not be_nil, "You must specify a password in your #{path} file"
7
+ credentials['site'].should_not be_nil, "For cucumber to run, you must specify a site in your #{path} file"
8
+ end
@@ -0,0 +1,32 @@
1
+ When /^I run `(.*)` with a new domain$/ do |cmd|
2
+ @domain_name = "cli-test-#{Time.now.to_i}.com"
3
+ steps %Q(When I run `#{cmd} #{@domain_name}`)
4
+ end
5
+
6
+ When /^I run `(.*)` with a in\-addr\.arpa domain$/ do |cmd|
7
+ @domain_name = '0.0.10.in-addr.arpa'
8
+ steps %Q(When I run `#{cmd} #{@domain_name}`)
9
+ end
10
+
11
+ When /^I run `(.*)` with a domain I created$/ do |cmd|
12
+ steps %Q(
13
+ When I run `dnsimple create` with a new domain
14
+ )
15
+ steps %Q(
16
+ And I run `#{cmd} #{@domain_name}`
17
+ )
18
+ end
19
+
20
+ Then /^the output should show that the domain was created$/ do
21
+ steps %Q(Then the output should contain "Created #{@domain_name}")
22
+ end
23
+
24
+ Then /^the output should show that the domain was deleted$/ do
25
+ steps %Q(Then the output should contain "Deleted #{@domain_name}")
26
+ end
27
+
28
+ Then /^the output should show that the domain was registered$/ do
29
+ steps %Q(Then the output should contain "Registered #{@domain_name}")
30
+ end
31
+
32
+
@@ -0,0 +1,38 @@
1
+ When /^I run `(.*)` with the domain I added and no name and the type "([^\"]*)" and the content "([^\"]*)"$/ do |cmd, type, content|
2
+ steps %Q(When I run `#{cmd} #{@domain_name} '' #{type} #{content}`)
3
+ end
4
+
5
+ When /^I run `(.*)` with the domain I added and the name "([^\"]*)" and the type "([^\"]*)" and the content "([^\"]*)"$/ do |cmd, name, type, content|
6
+ steps %Q(When I run `#{cmd} #{@domain_name} #{name} #{type} #{content}`)
7
+ end
8
+
9
+ When /^I run `(.*)` with the id of the record$/ do |cmd|
10
+ steps %Q(When I run `#{cmd} #{@domain_name} #{@record_id}`)
11
+ end
12
+
13
+ When /^I note the id of the record I added$/ do
14
+ ps = only_processes.last
15
+ fail "No last process" unless ps
16
+ m = ps.stdout.match(/id:(\d+)/)
17
+ fail "Unable to find ID of record" unless m
18
+ @record_id = m[1]
19
+ end
20
+
21
+ Then /^the output should show that the "([^\"]*)" record was created$/ do |type|
22
+ steps %Q(Then the output should contain "Created #{type} record for #{@domain_name}")
23
+ end
24
+
25
+ Then /^the output should include the record id$/ do
26
+ steps %Q(Then the output should match /id:(\\d+)/)
27
+ end
28
+
29
+ Then /^the output should show that the record was deleted$/ do
30
+ steps %Q(Then the output should contain "Deleted #{@record_id} from #{@domain_name}")
31
+ end
32
+
33
+ Then /^I the domain should have (\d+) records$/ do |n|
34
+ steps %Q(
35
+ When I run `dnsimple record:list #{@domain_name}`
36
+ Then the output should contain "Found #{n} records for #{@domain_name}"
37
+ )
38
+ end
@@ -0,0 +1,9 @@
1
+ When /^I run `(.*)` with the domain and the template named "([^\"]*)"$/ do |cmd, template|
2
+ @template_name = template
3
+ steps %Q(When I run `#{cmd} #{@domain_name} #{template}`)
4
+ end
5
+
6
+ Then /^the output should show that the template was applied$/ do
7
+ steps %Q(Then the output should contain "Applied template #{@template_name} to #{@domain_name}")
8
+ end
9
+
@@ -0,0 +1,17 @@
1
+ require 'aruba/cucumber'
2
+ $:.unshift('lib')
3
+ require 'dnsimple'
4
+
5
+ Before do
6
+ @aruba_timeout_seconds = 30
7
+ ENV['DNSIMPLE_CONFIG'] = '~/.dnsimple.test'
8
+ end
9
+
10
+ After do |scenario|
11
+ unless ENV['NODELETE'] || scenario.source_tag_names.include?('@skip-delete')
12
+ if @domain_name && (@domain_name =~ /^cli-/ || @domain_name =~ /in-addr\.arpa/)
13
+ steps %Q(When I run `dnsimple delete #{@domain_name}`)
14
+ end
15
+ end
16
+ end
17
+
@@ -0,0 +1,44 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/domains/example.com/certificates
6
+ body:
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ authorization:
11
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ua-compatible:
18
+ - IE=Edge
19
+ access-control-allow-headers:
20
+ - Authorization,Accepts,Content-Type
21
+ x-dnsimple-api-version:
22
+ - 1.0.0
23
+ etag:
24
+ - "\"ee7304ebee78ff7065676d9aff2e1967\""
25
+ access-control-allow-methods:
26
+ - OPTIONS
27
+ content-type:
28
+ - application/json; charset=utf-8
29
+ access-control-allow-origin:
30
+ - "*"
31
+ date:
32
+ - Fri, 11 Nov 2011 21:18:55 GMT
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
35
+ x-runtime:
36
+ - "8.864356"
37
+ content-length:
38
+ - "3936"
39
+ set-cookie:
40
+ - _dnsimple_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlYzE1ZDBhNDlhNmY1NzM4ZWU0MWM4ZGM5NWM2ODFlOWJJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYA1YzI0ZTYzOGYwNjFkZWRmN2Y5YTNiYjY3MTdiZjUxMjliZmUwYjdjODg5OGZkZTVhNmEzNGMxZDkwOWUyMmNlNmIzMTc4MzRlZTdmY2RkYjllYjQ3ODdhYjZlMDM1Y2E0ZmEyYmY0MWVkYzJiOWMxZGEwNzYwZDdjMzhmNzY1OAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkG--fadb5db75b3ab141668c6511771e2d22eeb07409; path=/; HttpOnly
41
+ cache-control:
42
+ - max-age=0, private, must-revalidate
43
+ body: "[{\"certificate\":{\"approver_email\":null,\"certificate_status\":\"Awaiting Configuration\",\"configured_at\":\"2011-11-11T20:56:36Z\",\"contact_id\":1,\"created_at\":\"2011-11-11T20:56:14Z\",\"csr\":\"-----BEGIN NEW CERTIFICATE REQUEST-----\\nMIIDMjCCAeoCAQAwXTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDEFudGhvbnkgRWRl\\nbjEQMA4GA1UEBxMHTWFsYWJhcjELMAkGA1UECBMCRkwxGDAWBgNVBAMTD3d3dy5l\\neGFtcGxlLmNvbTCCAVIw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Af5HYBghfJR8\\nx4UkFDK6cqZTYKdqs9HMbHs50Mc5geXaZVzSn034VD788Nuw1v06DSWkamDBqHBp\\nXYJnYdArUZGkwT7i1sdRPQKBmQDtqFU2gvTM6W7rwqxNbt90ZL+jJ/szduGsgPNO\\nQNXP4SKE41k3orqwpt7QYBGefGtPoI8294D0YV1K78yYOMkA83KbjAr5aUcCRLdL\\nXjk8E4esQAjWWYurdbwmrpD0WoKWgIlvM+s6aYjRzRYvamZa9bGk+a2n0zrM+HgX\\nBhQYSdpd1DiSvuV561UgmAiIRmNYdT7txRmVRwKBmGZUaogrvtTSQ+vk2tquEXci\\nNv8lmtI+DlYpQxNCpK9s0hg7hjFLihWz5HVYYaiDtFDYidX/cYasdBW2rgGJlEz6\\nYXMsiHXYOTWwD4nNzm5hJtQdX8V5RRAqMm/4G7BChRI4FLLtQrk3PTfDOe/FM6Wv\\nWnH4dY3KH8m4HnJ1wdh6NfHouo3uNB8Ylkaok6d7aTbK8rE6ItlJAoGZAJ6UHhf7\\nlgFNGdhy06nve2cc+sqRmQqkHr2OZcsndAP8A56MXTHEgbHyBucf02HfP3OofSd+\\nSyvF9AxWqjxAV88soqKr9X6rAti+pVfDDYnKtlL3f24X3hyQuPVOsiZ6ZnyqVApB\\nqIoXdVYY9N66roWvP9QHThqX1bqDaQ5j3fC/BthpDT7N5i1OHEVdbQQRg6S4xz68\\nr+9tAoGZAIyiHwn1QZqCUsIKiffm4g5sfVPcNqHhtKPCOTnNkNxAM7G4XB9WQyBA\\nzDnRRpwtFq+5R4XyJUyloSflZpltJ+T/aifq6lDn9sLf0ma6y+cCkTm06Lfx4MHw\\nMGvuTjj6oOeGj30kAe35j6e0xcNyhGFTRK+QROKkdMFMV2V9a9Jo3wTOr4PYr8Q6\\nt1BYovwF54fuQF/ceAFz\\n-----END RSA PRIVATE KEY-----\\n\",\"ssl_certificate\":null,\"updated_at\":\"2011-11-11T20:56:36Z\",\"available_approver_emails\":\"res-dom@iana.org,res-dom@iana.org,admin@example.com,administrator@example.com,hostmaster@example.com,root@example.com,webmaster@example.com,postmaster@example.com,admin@www.example.com,administrator@www.example.com,hostmaster@www.example.com,root@www.example.com,webmaster@www.example.com,postmaster@www.example.com\"}}]"
44
+ http_version: "1.1"
@@ -0,0 +1,44 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/domains/example.com/certificates
6
+ body: certificate[name]=www&certificate[contact_id]=1
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ authorization:
11
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ua-compatible:
18
+ - IE=Edge
19
+ access-control-allow-headers:
20
+ - Authorization,Accepts,Content-Type
21
+ x-dnsimple-api-version:
22
+ - 1.0.0
23
+ location:
24
+ - http://localhost:3000/domains/example.com/certificates/1
25
+ access-control-allow-methods:
26
+ - OPTIONS
27
+ content-type:
28
+ - application/json; charset=utf-8
29
+ access-control-allow-origin:
30
+ - "*"
31
+ date:
32
+ - Fri, 11 Nov 2011 20:56:40 GMT
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
35
+ x-runtime:
36
+ - "26.966412"
37
+ content-length:
38
+ - "3934"
39
+ set-cookie:
40
+ - _dnsimple_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlMDcwNmU3ZmFjYjkwNTNiZmMxZDYxNTg1NTlkOWJlMjFJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYA1YzI0ZTYzOGYwNjFkZWRmN2Y5YTNiYjY3MTdiZjUxMjliZmUwYjdjODg5OGZkZTVhNmEzNGMxZDkwOWUyMmNlNmIzMTc4MzRlZTdmY2RkYjllYjQ3ODdhYjZlMDM1Y2E0ZmEyYmY0MWVkYzJiOWMxZGEwNzYwZDdjMzhmNzY1OAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkG--532360b59a4ad0353247bd38617b4ede4dbe5e6c; path=/; HttpOnly
41
+ cache-control:
42
+ - no-cache
43
+ body: "{\"certificate\":{\"approver_email\":null,\"certificate_status\":\"Awaiting Configuration\",\"configured_at\":\"2011-11-11T20:56:36Z\",\"contact_id\":1,\"created_at\":\"2011-11-11T20:56:14Z\",\"csr\":\"-----BEGIN NEW CERTIFICATE REQUEST-----\\nMIIDMjCCAeoCAQAwXTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDEFudGhvbnkgRWRl\\nbjEQMA4GA1UEBxMHTWFsYWJhcjELMAkGA1UECBMCRkwxGDAWBgNVBAMTD3d3dy5l\\neGFtcGxlLmNvbTCCAVIwDQYJKoZIhvcNAQEBBQADggE/ADCCAToCggExALVqxT38\\nVYrafdjtqrYGCn1/HOYnOTJ0r8aYR71cW/AN50H6t0NOwLdrKstQ11uxGxkqFotl\\ndHklfJUh5gJyrisIZNP/YZ55s+rjcbuFeiAyouEs12YwYOK2GzsHB6t3OBJC2+Nm\\nZirDUUbhA4VDkf7DqiIRVSKcC0BKJyr69fnGewpAW9xiECryYqq884vD1/MoxuPQ\\nYWKSWXB4G/iD5vXamBNqF5TCJV8U8/53mKClWBTsMQxO2eCjPEqO6Yf1LViu4vZx\\nOmB093Iet8h+DI93FYGRQFmYy8SKBb/jOnr83gXEKIbKSGccYNHy8QGlYMguX+Yb\\nNbUGqKgr2LL2sk9rtLv8rCu/fSkJMhOw7Rz9N1TAVccZYLqGm+gNDDlI3TcKUQ6o\\n1R4uE7TOX3OFCOsCAwEAAaAwMC4GCSqGSIb3DQEJDjEhMB8wDAYDVR0TAQH/BAIw\\nADAPBgNVHQ8BAf8EBQMDB4AAMA0GCSqGSIb3DQEBBQUAA4IBMQAFJ9nGFHx5Mcg6\\n/TnT3kvT8qaux6SwfCw35XepT9rJ7YppaMgeOanEGJdvjtZtYxIWzxq2E+lFcNGd\\nAsJoNk1jnmvbFLARjTAfN9JSvxfkT6x+rcR8rSbpzYb19NV2QTUivrDuur5BvLI3\\nCUHunT7bQaWuxbZK/GgZ4KiRIvplsUz09Ir6HDcLS2TNeswSRwqNYs1v1uY1TWeS\\nUGbW391e7EsmesnHi8QdzqafwIjWqUoz55V8TMN0xJF7Dlwfw09NZ7rhh3hmC9aT\\nk/s8jl+Cfaz9aumrTHex2RkBfBpfLNnTbkCrBuYSp2lkV7XSn6GRXL84QVIrVwZo\\nRgQisMWQ0HWKVVGpAhh8u1PcRBHpJiCsK1AoN+TsQ/7N/cbGpyllS5IBAzRCDM9V\\nUNT4A6BR\\n-----END NEW CERTIFICATE REQUEST-----\\n\",\"domain_id\":39,\"expiration_date\":\"11/11/2012 12:56:14 PM\",\"id\":1,\"name\":\"www\",\"order_date\":\"11/11/2011 12:56:14 PM\",\"private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nMIIFewIBAAKCATEAtWrFPfxVitp92O2qtgYKfX8c5ic5MnSvxphHvVxb8A3nQfq3\\nQ07At2sqy1DXW7EbGSoWi2V0eSV8lSHmAnKuKwhk0/9hnnmz6uNxu4V6IDKi4SzX\\nZjBg4rYbOwcHq3c4EkLb42ZmKsNRRuEDhUOR/sOqIhFVIpwLQEonKvr1+cZ7CkBb\\n3GIQKvJiqrzzi8PX8yjG49BhYpJZcHgb+IPm9dqYE2oXlMIlXxTz/neYoKVYFOwx\\nDE7Z4KM8So7ph/UtWK7i9nE6YHT3ch63yH4Mj3cVgZFAWZjLxIoFv+M6evzeBcQo\\nhspIZxxg0fLxAaVgyC5f5hs1tQaoqCvYsvayT2u0u/ysK799KQkyE7DtHP03VMBV\\nxxlguoab6A0MOUjdNwpRDqjVHi4TtM5fc4UI6wIDAQABAoIBLxQcLxiT1s62Kzbj\\n6W+O9zCUf5x6UnXLnwG5BSgUoWEQv1aUJjMhB7jD+ZmpFKbBF0MHJcnK4pHo/OmL\\nL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WqjxAV88soqKr9X6rAti+pVfDDYnKtlL3f24X3hyQuPVOsiZ6ZnyqVApB\\nqIoXdVYY9N66roWvP9QHThqX1bqDaQ5j3fC/BthpDT7N5i1OHEVdbQQRg6S4xz68\\nr+9tAoGZAIyiHwn1QZqCUsIKiffm4g5sfVPcNqHhtKPCOTnNkNxAM7G4XB9WQyBA\\nzDnRRpwtFq+5R4XyJUyloSflZpltJ+T/aifq6lDn9sLf0ma6y+cCkTm06Lfx4MHw\\nMGvuTjj6oOeGj30kAe35j6e0xcNyhGFTRK+QROKkdMFMV2V9a9Jo3wTOr4PYr8Q6\\nt1BYovwF54fuQF/ceAFz\\n-----END RSA PRIVATE KEY-----\\n\",\"ssl_certificate\":null,\"updated_at\":\"2011-11-11T20:56:36Z\",\"available_approver_emails\":\"res-dom@iana.org,res-dom@iana.org,admin@example.com,administrator@example.com,hostmaster@example.com,root@example.com,webmaster@example.com,postmaster@example.com,admin@www.example.com,administrator@www.example.com,hostmaster@www.example.com,root@www.example.com,webmaster@www.example.com,postmaster@www.example.com\"}}"
44
+ http_version: "1.1"
@@ -0,0 +1,44 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :put
5
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/domains/example.com/certificates/1/submit
6
+ body: certificate[approver_email]=admin%40example.com
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ authorization:
11
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-ua-compatible:
18
+ - IE=Edge
19
+ access-control-allow-headers:
20
+ - Authorization,Accepts,Content-Type
21
+ x-dnsimple-api-version:
22
+ - 1.0.0
23
+ etag:
24
+ - "\"8f2d8c456cd7fe85919f3a532762385d\""
25
+ access-control-allow-methods:
26
+ - OPTIONS
27
+ content-type:
28
+ - application/json; charset=utf-8
29
+ access-control-allow-origin:
30
+ - "*"
31
+ date:
32
+ - Sat, 12 Nov 2011 13:01:04 GMT
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
35
+ x-runtime:
36
+ - "9.576010"
37
+ content-length:
38
+ - "3949"
39
+ set-cookie:
40
+ - _dnsimple_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlNjk3MjQ4OTU0NTYzMjliNWMwNDFhYzEyN2IwMmNhMzNJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYA1YzI0ZTYzOGYwNjFkZWRmN2Y5YTNiYjY3MTdiZjUxMjliZmUwYjdjODg5OGZkZTVhNmEzNGMxZDkwOWUyMmNlNmIzMTc4MzRlZTdmY2RkYjllYjQ3ODdhYjZlMDM1Y2E0ZmEyYmY0MWVkYzJiOWMxZGEwNzYwZDdjMzhmNzY1OAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkG--3f528e10ce8d7fcd773ecf939cb846d7f5da1d6c; path=/; HttpOnly
41
+ cache-control:
42
+ - max-age=0, private, must-revalidate
43
+ body: "{\"certificate\":{\"approver_email\":\"admin@example.com\",\"certificate_status\":\"Awaiting Configuration\",\"configured_at\":\"2011-11-12T12:19:26Z\",\"contact_id\":1,\"created_at\":\"2011-11-11T20:56:14Z\",\"csr\":\"-----BEGIN NEW CERTIFICATE REQUEST-----\\nMIIDMjCCAeoCAQAwXTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDEFudGhvbnkgRWRl\\nbjEQMA4GA1UEBxMHTWFsYWJhcjELMAkGA1UECBMCRkwxGDAWBgNVBAMTD3d3dy5l\\neGFtcGxlLmNvbTCCAVIwDQYJKoZIhvcNAQEBBQADggE/ADCCAToCggExALVqxT38\\nVYrafdjtqrYGCn1/HOYnOTJ0r8aYR71cW/AN50H6t0NOwLdrKstQ11uxGxkqFotl\\ndHklfJUh5gJyrisIZNP/YZ55s+rjcbuFeiAyouEs12YwYOK2GzsHB6t3OBJC2+Nm\\nZirDUUbhA4VDkf7DqiIRVSKcC0BKJyr69fnGewpAW9xiECryYqq884vD1/MoxuPQ\\nYWKSWXB4G/iD5vXamBNqF5TCJV8U8/53mKClWBTsMQxO2eCjPEqO6Yf1LViu4vZx\\nOmB093Iet8h+DI93FYGRQFmYy8SKBb/jOnr83gXEKIbKSGccYNHy8QGlYMguX+Yb\\nNbUGqKgr2LL2sk9rtLv8rCu/fSkJMhOw7Rz9N1TAVccZYLqGm+gNDDlI3TcKUQ6o\\n1R4uE7TOX3OFCOsCAwEAAaAwMC4GCSqGSIb3DQEJDjEhMB8wDAYDVR0TAQH/BAIw\\nADAPBgNVHQ8BAf8EBQMDB4AAMA0GCSqGSIb3DQEBBQUAA4IBMQAFJ9nGFHx5Mcg6\\n/TnT3kvT8qaux6SwfCw35XepT9rJ7YppaMgeOanEGJdvjtZtYxIWzxq2E+lFcNGd\\nAsJoNk1jnmvbFLARjTAfN9JSvxfkT6x+rcR8rSbpzYb19NV2QTUivrDuur5BvLI3\\nCUHunT7bQaWuxbZK/GgZ4KiRIvplsUz09Ir6HDcLS2TNeswSRwqNYs1v1uY1TWeS\\nUGbW391e7EsmesnHi8QdzqafwIjWqUoz55V8TMN0xJF7Dlwfw09NZ7rhh3hmC9aT\\nk/s8jl+Cfaz9aumrTHex2RkBfBpfLNnTbkCrBuYSp2lkV7XSn6GRXL84QVIrVwZo\\nRgQisMWQ0HWKVVGpAhh8u1PcRBHpJiCsK1AoN+TsQ/7N/cbGpyllS5IBAzRCDM9V\\nUNT4A6BR\\n-----END NEW CERTIFICATE REQUEST-----\\n\",\"domain_id\":39,\"expiration_date\":\"11/11/2012 12:56:14 PM\",\"id\":1,\"name\":\"www\",\"order_date\":\"11/11/2011 12:56:14 PM\",\"private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nMIIFewIBAAKCATEAtWrFPfxVitp92O2qtgYKfX8c5ic5MnSvxphHvVxb8A3nQfq3\\n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gPNO\\nQNXP4SKE41k3orqwpt7QYBGefGtPoI8294D0YV1K78yYOMkA83KbjAr5aUcCRLdL\\nXjk8E4esQAjWWYurdbwmrpD0WoKWgIlvM+s6aYjRzRYvamZa9bGk+a2n0zrM+HgX\\nBhQYSdpd1DiSvuV561UgmAiIRmNYdT7txRmVRwKBmGZUaogrvtTSQ+vk2tquEXci\\nNv8lmtI+DlYpQxNCpK9s0hg7hjFLihWz5HVYYaiDtFDYidX/cYasdBW2rgGJlEz6\\nYXMsiHXYOTWwD4nNzm5hJtQdX8V5RRAqMm/4G7BChRI4FLLtQrk3PTfDOe/FM6Wv\\nWnH4dY3KH8m4HnJ1wdh6NfHouo3uNB8Ylkaok6d7aTbK8rE6ItlJAoGZAJ6UHhf7\\nlgFNGdhy06nve2cc+sqRmQqkHr2OZcsndAP8A56MXTHEgbHyBucf02HfP3OofSd+\\nSyvF9AxWqjxAV88soqKr9X6rAti+pVfDDYnKtlL3f24X3hyQuPVOsiZ6ZnyqVApB\\nqIoXdVYY9N66roWvP9QHThqX1bqDaQ5j3fC/BthpDT7N5i1OHEVdbQQRg6S4xz68\\nr+9tAoGZAIyiHwn1QZqCUsIKiffm4g5sfVPcNqHhtKPCOTnNkNxAM7G4XB9WQyBA\\nzDnRRpwtFq+5R4XyJUyloSflZpltJ+T/aifq6lDn9sLf0ma6y+cCkTm06Lfx4MHw\\nMGvuTjj6oOeGj30kAe35j6e0xcNyhGFTRK+QROKkdMFMV2V9a9Jo3wTOr4PYr8Q6\\nt1BYovwF54fuQF/ceAFz\\n-----END RSA PRIVATE KEY-----\\n\",\"ssl_certificate\":null,\"updated_at\":\"2011-11-12T12:19:26Z\",\"available_approver_emails\":\"res-dom@iana.org,res-dom@iana.org,admin@example.com,administrator@example.com,hostmaster@example.com,root@example.com,webmaster@example.com,postmaster@example.com,admin@www.example.com,administrator@www.example.com,hostmaster@www.example.com,root@www.example.com,webmaster@www.example.com,postmaster@www.example.com\"}}"
44
+ http_version: "1.1"
@@ -0,0 +1,42 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/contacts.json
6
+ body: contact[phone]=305%20111%202222&contact[city]=Miami&contact[first_name]=John&contact[state_province]=FL&contact[last_name]=Doe&contact[postal_code]=33143&contact[country]=US&contact[address1]=1%20SW%201st%20Street&contact[email_address]=john.doe%40example.com
7
+ headers:
8
+ authorization:
9
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 201
13
+ message: Created
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ access-control-allow-headers:
18
+ - Authorization,Accepts,Content-Type
19
+ x-dnsimple-api-version:
20
+ - 1.0.0
21
+ location:
22
+ - http://localhost:3000/contacts/4
23
+ access-control-allow-methods:
24
+ - OPTIONS
25
+ content-type:
26
+ - application/json; charset=utf-8
27
+ access-control-allow-origin:
28
+ - "*"
29
+ date:
30
+ - Fri, 11 Nov 2011 20:33:54 GMT
31
+ server:
32
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
33
+ x-runtime:
34
+ - "0.326136"
35
+ content-length:
36
+ - "406"
37
+ set-cookie:
38
+ - _dnsimple_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlOTBjZWJmZjc2YmJkODEwODhkNzBmNmI3YWM2NWEwNjZJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYA1YzI0ZTYzOGYwNjFkZWRmN2Y5YTNiYjY3MTdiZjUxMjliZmUwYjdjODg5OGZkZTVhNmEzNGMxZDkwOWUyMmNlNmIzMTc4MzRlZTdmY2RkYjllYjQ3ODdhYjZlMDM1Y2E0ZmEyYmY0MWVkYzJiOWMxZGEwNzYwZDdjMzhmNzY1OAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkG--3be5473018837faded15ad4b1e10c8a95c74edb1; path=/; HttpOnly
39
+ cache-control:
40
+ - no-cache
41
+ body: "{\"contact\":{\"address1\":\"1 SW 1st Street\",\"address2\":null,\"city\":\"Miami\",\"country\":\"US\",\"created_at\":\"2011-11-11T20:33:54Z\",\"email_address\":\"john.doe@example.com\",\"fax\":null,\"first_name\":\"John\",\"id\":4,\"job_title\":null,\"label\":null,\"last_name\":\"Doe\",\"organization_name\":null,\"phone\":\"305 111 2222\",\"phone_ext\":null,\"postal_code\":\"33143\",\"state_province\":\"FL\",\"updated_at\":\"2011-11-11T20:33:54Z\",\"user_id\":1}}"
42
+ http_version: "1.1"
@@ -0,0 +1,42 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/contacts/1.json
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ x-ua-compatible:
16
+ - IE=Edge
17
+ access-control-allow-headers:
18
+ - Authorization,Accepts,Content-Type
19
+ x-dnsimple-api-version:
20
+ - 1.0.0
21
+ etag:
22
+ - "\"e311cdfc85cf816f955c96e6777b2960\""
23
+ access-control-allow-methods:
24
+ - OPTIONS
25
+ content-type:
26
+ - application/json; charset=utf-8
27
+ access-control-allow-origin:
28
+ - "*"
29
+ date:
30
+ - Fri, 11 Nov 2011 20:34:48 GMT
31
+ server:
32
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
33
+ x-runtime:
34
+ - "0.435917"
35
+ content-length:
36
+ - "401"
37
+ set-cookie:
38
+ - _dnsimple_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlNjI1ZTcwODA3NzhjMzY2NDBmMzA4YzExOTQzZWZlYjNJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYA1YzI0ZTYzOGYwNjFkZWRmN2Y5YTNiYjY3MTdiZjUxMjliZmUwYjdjODg5OGZkZTVhNmEzNGMxZDkwOWUyMmNlNmIzMTc4MzRlZTdmY2RkYjllYjQ3ODdhYjZlMDM1Y2E0ZmEyYmY0MWVkYzJiOWMxZGEwNzYwZDdjMzhmNzY1OAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkG--62ec9088d88ee5b5446a9e75637b33ef10ec8aed; path=/; HttpOnly
39
+ cache-control:
40
+ - max-age=0, private, must-revalidate
41
+ body: "{\"contact\":{\"address1\":\"2045 Corey Rd\",\"address2\":\"\",\"city\":\"Malabar\",\"country\":\"US\",\"created_at\":\"2011-10-16T16:46:55Z\",\"email_address\":\"anthonyeden@gmail.com\",\"fax\":\"\",\"first_name\":\"Anthony\",\"id\":1,\"job_title\":\"\",\"label\":\"\",\"last_name\":\"Eden\",\"organization_name\":\"\",\"phone\":\"321 505 0025\",\"phone_ext\":null,\"postal_code\":\"32950\",\"state_province\":\"FL\",\"updated_at\":\"2011-10-16T16:46:55Z\",\"user_id\":1}}"
42
+ http_version: "1.1"
@@ -0,0 +1,130 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/domains
6
+ body: domain[name]=example0.com
7
+ headers:
8
+ accept:
9
+ - application/json
10
+ authorization:
11
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 201
15
+ message: Created
16
+ headers:
17
+ x-ua-compatible:
18
+ - IE=Edge
19
+ access-control-allow-headers:
20
+ - Authorization,Accepts,Content-Type
21
+ x-dnsimple-api-version:
22
+ - 1.0.0
23
+ location:
24
+ - http://localhost:3000/domains/example0.com
25
+ access-control-allow-methods:
26
+ - OPTIONS
27
+ content-type:
28
+ - application/json; charset=utf-8
29
+ access-control-allow-origin:
30
+ - "*"
31
+ date:
32
+ - Fri, 11 Nov 2011 20:13:05 GMT
33
+ server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
35
+ x-runtime:
36
+ - "5.103398"
37
+ content-length:
38
+ - "413"
39
+ set-cookie:
40
+ - _dnsimple_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlMWJiOTg2ZWU2ZTdkYTkzMDFmOTRhODAwOGY2MzIxMjRJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYA1YzI0ZTYzOGYwNjFkZWRmN2Y5YTNiYjY3MTdiZjUxMjliZmUwYjdjODg5OGZkZTVhNmEzNGMxZDkwOWUyMmNlNmIzMTc4MzRlZTdmY2RkYjllYjQ3ODdhYjZlMDM1Y2E0ZmEyYmY0MWVkYzJiOWMxZGEwNzYwZDdjMzhmNzY1OAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkG--f054d6190541c9e7551cf14f746ac29150a64a5a; path=/; HttpOnly
41
+ cache-control:
42
+ - no-cache
43
+ body: "{\"domain\":{\"auto_renew\":null,\"created_at\":\"2011-11-11T20:13:01Z\",\"expires_at\":null,\"id\":42,\"last_name_server_status_check\":null,\"lockable\":true,\"name\":\"example0.com\",\"name_server_status\":\"unknown\",\"parsed_expiration_date\":null,\"real_time\":true,\"registrant_id\":null,\"registration_status\":\"hosted\",\"state\":\"hosted\",\"updated_at\":\"2011-11-11T20:13:01Z\",\"user_id\":1,\"uses_external_name_servers\":null,\"record_count\":0}}"
44
+ http_version: "1.1"
45
+ - !ruby/struct:VCR::HTTPInteraction
46
+ request: !ruby/struct:VCR::Request
47
+ method: :post
48
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/domains
49
+ body: domain[name]=example1.com
50
+ headers:
51
+ accept:
52
+ - application/json
53
+ authorization:
54
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
55
+ response: !ruby/struct:VCR::Response
56
+ status: !ruby/struct:VCR::ResponseStatus
57
+ code: 201
58
+ message: Created
59
+ headers:
60
+ x-ua-compatible:
61
+ - IE=Edge
62
+ access-control-allow-headers:
63
+ - Authorization,Accepts,Content-Type
64
+ x-dnsimple-api-version:
65
+ - 1.0.0
66
+ location:
67
+ - http://localhost:3000/domains/example1.com
68
+ access-control-allow-methods:
69
+ - OPTIONS
70
+ content-type:
71
+ - application/json; charset=utf-8
72
+ access-control-allow-origin:
73
+ - "*"
74
+ date:
75
+ - Fri, 11 Nov 2011 20:13:11 GMT
76
+ server:
77
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
78
+ x-runtime:
79
+ - "6.008554"
80
+ content-length:
81
+ - "413"
82
+ set-cookie:
83
+ - _dnsimple_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlOTA1OTE0NTdjNTQ0OTMwYTZkZmNhYzc2YjVmNzRlOWRJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYA1YzI0ZTYzOGYwNjFkZWRmN2Y5YTNiYjY3MTdiZjUxMjliZmUwYjdjODg5OGZkZTVhNmEzNGMxZDkwOWUyMmNlNmIzMTc4MzRlZTdmY2RkYjllYjQ3ODdhYjZlMDM1Y2E0ZmEyYmY0MWVkYzJiOWMxZGEwNzYwZDdjMzhmNzY1OAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkG--a0b803488b056619e9c9a90b7d3d94d63d3bd27b; path=/; HttpOnly
84
+ cache-control:
85
+ - no-cache
86
+ body: "{\"domain\":{\"auto_renew\":null,\"created_at\":\"2011-11-11T20:13:06Z\",\"expires_at\":null,\"id\":43,\"last_name_server_status_check\":null,\"lockable\":true,\"name\":\"example1.com\",\"name_server_status\":\"unknown\",\"parsed_expiration_date\":null,\"real_time\":true,\"registrant_id\":null,\"registration_status\":\"hosted\",\"state\":\"hosted\",\"updated_at\":\"2011-11-11T20:13:06Z\",\"user_id\":1,\"uses_external_name_servers\":null,\"record_count\":0}}"
87
+ http_version: "1.1"
88
+ - !ruby/struct:VCR::HTTPInteraction
89
+ request: !ruby/struct:VCR::Request
90
+ method: :get
91
+ uri: http://<USERNAME>:<PASSWORD>@localhost:3000/domains
92
+ body:
93
+ headers:
94
+ accept:
95
+ - application/json
96
+ authorization:
97
+ - Basic YW50aG9ueWVkZW5AZ21haWwuY29tOmxldG1laW4=
98
+ response: !ruby/struct:VCR::Response
99
+ status: !ruby/struct:VCR::ResponseStatus
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ x-ua-compatible:
104
+ - IE=Edge
105
+ access-control-allow-headers:
106
+ - Authorization,Accepts,Content-Type
107
+ x-dnsimple-api-version:
108
+ - 1.0.0
109
+ etag:
110
+ - "\"e20ab09f44139d8c9a7cb836af8412de\""
111
+ access-control-allow-methods:
112
+ - OPTIONS
113
+ content-type:
114
+ - application/json; charset=utf-8
115
+ access-control-allow-origin:
116
+ - "*"
117
+ date:
118
+ - Fri, 11 Nov 2011 20:13:12 GMT
119
+ server:
120
+ - WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09)
121
+ x-runtime:
122
+ - "0.710570"
123
+ content-length:
124
+ - "2194"
125
+ set-cookie:
126
+ - _dnsimple_session=BAh7CUkiD3Nlc3Npb25faWQGOgZFRiIlZTQ3NTM4OWMyZTI2NTYyY2Q3YzIyYzk1ZjRkMDYyYjJJIg5yZXR1cm5fdG8GOwBGSSINL2RvbWFpbnMGOwBGSSIVdXNlcl9jcmVkZW50aWFscwY7AEZJIgGANWMyNGU2MzhmMDYxZGVkZjdmOWEzYmI2NzE3YmY1MTI5YmZlMGI3Yzg4OThmZGU1YTZhMzRjMWQ5MDllMjJjZTZiMzE3ODM0ZWU3ZmNkZGI5ZWI0Nzg3YWI2ZTAzNWNhNGZhMmJmNDFlZGMyYjljMWRhMDc2MGQ3YzM4Zjc2NTgGOwBUSSIYdXNlcl9jcmVkZW50aWFsc19pZAY7AEZpBg%3D%3D--bc44fcfe069cfcad0aa4bdee121f273b6ba6fd25; path=/; HttpOnly
127
+ cache-control:
128
+ - max-age=0, private, must-revalidate
129
+ body: "[{\"domain\":{\"auto_renew\":null,\"created_at\":\"2011-11-11T20:10:46Z\",\"expires_at\":\"11/11/2012 12:10:00 PM\",\"id\":40,\"last_name_server_status_check\":null,\"lockable\":true,\"name\":\"dnsimple-example-1321042237.com\",\"name_server_status\":\"unknown\",\"parsed_expiration_date\":\"2012-11-11T12:10:00Z\",\"real_time\":true,\"registrant_id\":1,\"registration_status\":\"registered\",\"state\":\"registered\",\"updated_at\":\"2011-11-11T20:11:09Z\",\"user_id\":1,\"uses_external_name_servers\":null,\"record_count\":0}},{\"domain\":{\"auto_renew\":null,\"created_at\":\"2011-11-11T20:11:34Z\",\"expires_at\":\"11/11/2012 12:11:00 PM\",\"id\":41,\"last_name_server_status_check\":null,\"lockable\":true,\"name\":\"dnsimple-example-1321042288.com\",\"name_server_status\":\"unknown\",\"parsed_expiration_date\":\"2012-11-11T12:11:00Z\",\"real_time\":true,\"registrant_id\":3,\"registration_status\":\"registered\",\"state\":\"registered\",\"updated_at\":\"2011-11-11T20:12:00Z\",\"user_id\":1,\"uses_external_name_servers\":null,\"record_count\":0}},{\"domain\":{\"auto_renew\":null,\"created_at\":\"2011-11-11T20:05:07Z\",\"expires_at\":null,\"id\":39,\"last_name_server_status_check\":null,\"lockable\":true,\"name\":\"example.com\",\"name_server_status\":\"unknown\",\"parsed_expiration_date\":null,\"real_time\":true,\"registrant_id\":null,\"registration_status\":\"hosted\",\"state\":\"hosted\",\"updated_at\":\"2011-11-11T20:05:07Z\",\"user_id\":1,\"uses_external_name_servers\":null,\"record_count\":0}},{\"domain\":{\"auto_renew\":null,\"created_at\":\"2011-11-11T20:13:01Z\",\"expires_at\":null,\"id\":42,\"last_name_server_status_check\":null,\"lockable\":true,\"name\":\"example0.com\",\"name_server_status\":\"unknown\",\"parsed_expiration_date\":null,\"real_time\":true,\"registrant_id\":null,\"registration_status\":\"hosted\",\"state\":\"hosted\",\"updated_at\":\"2011-11-11T20:13:01Z\",\"user_id\":1,\"uses_external_name_servers\":null,\"record_count\":0}},{\"domain\":{\"auto_renew\":null,\"created_at\":\"2011-11-11T20:13:06Z\",\"expires_at\":null,\"id\":43,\"last_name_server_status_check\":null,\"lockable\":true,\"name\":\"example1.com\",\"name_server_status\":\"unknown\",\"parsed_expiration_date\":null,\"real_time\":true,\"registrant_id\":null,\"registration_status\":\"hosted\",\"state\":\"hosted\",\"updated_at\":\"2011-11-11T20:13:06Z\",\"user_id\":1,\"uses_external_name_servers\":null,\"record_count\":0}}]"
130
+ http_version: "1.1"