dnsimple-ruby 1.4.1 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +0 -3
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +1 -0
  5. data/CHANGELOG.md +8 -0
  6. data/README.md +2 -4
  7. data/dnsimple-ruby.gemspec +3 -6
  8. data/features/README.md +9 -0
  9. data/lib/dnsimple/certificate.rb +37 -36
  10. data/lib/dnsimple/client.rb +7 -4
  11. data/lib/dnsimple/contact.rb +49 -48
  12. data/lib/dnsimple/domain.rb +79 -79
  13. data/lib/dnsimple/extended_attribute.rb +1 -1
  14. data/lib/dnsimple/record.rb +7 -12
  15. data/lib/dnsimple/service.rb +2 -2
  16. data/lib/dnsimple/template.rb +11 -17
  17. data/lib/dnsimple/template_record.rb +4 -4
  18. data/lib/dnsimple/transfer_order.rb +1 -1
  19. data/lib/dnsimple/user.rb +6 -14
  20. data/lib/dnsimple/version.rb +1 -1
  21. data/spec/ci/.dnsimple.test +1 -1
  22. data/spec/dnsimple/certificate_spec.rb +40 -30
  23. data/spec/dnsimple/client_spec.rb +9 -9
  24. data/spec/dnsimple/contact_spec.rb +34 -26
  25. data/spec/dnsimple/domain_spec.rb +21 -74
  26. data/spec/dnsimple/extended_attributes_spec.rb +42 -9
  27. data/spec/dnsimple/record_spec.rb +35 -43
  28. data/spec/dnsimple/template_spec.rb +27 -5
  29. data/spec/dnsimple/user_spec.rb +22 -14
  30. data/spec/files/certificates/index/success.http +19 -0
  31. data/spec/files/certificates/show/notfound.http +17 -0
  32. data/spec/files/certificates/show/success.http +19 -0
  33. data/spec/files/contacts/show/notfound.http +17 -0
  34. data/spec/files/contacts/show/success.http +19 -0
  35. data/spec/files/domains/show/notfound.http +17 -0
  36. data/spec/files/domains/show/success.http +19 -0
  37. data/spec/files/extended_attributes/ca.http +19 -0
  38. data/spec/files/extended_attributes/com.http +19 -0
  39. data/spec/files/extended_attributes/success.http +19 -0
  40. data/spec/files/records/index/success.http +19 -0
  41. data/spec/files/records/show/notfound.http +17 -0
  42. data/spec/files/records/show/success.http +19 -0
  43. data/spec/files/templates/show/notfound.http +17 -0
  44. data/spec/files/templates/show/success.http +19 -0
  45. data/spec/files/users/me/success.http +19 -0
  46. data/spec/spec_helper.rb +14 -17
  47. data/spec/support/helpers.rb +15 -0
  48. data/spec/support/webmock.rb +11 -0
  49. metadata +65 -84
  50. data/features/README +0 -12
  51. data/fixtures/vcr_cassettes/DNSimple_Certificate/_all.yml +0 -57
  52. data/fixtures/vcr_cassettes/DNSimple_Certificate/_purchase.yml +0 -57
  53. data/fixtures/vcr_cassettes/DNSimple_Certificate/_submit.yml +0 -57
  54. data/fixtures/vcr_cassettes/DNSimple_Contact/a_new_contact.yml +0 -50
  55. data/fixtures/vcr_cassettes/DNSimple_Contact/an_existing_contact.yml +0 -50
  56. data/fixtures/vcr_cassettes/DNSimple_Domain/_all.yml +0 -149
  57. data/fixtures/vcr_cassettes/DNSimple_Domain/applying_templates.yml +0 -246
  58. data/fixtures/vcr_cassettes/DNSimple_Domain/creating_a_new_domain.yml +0 -51
  59. data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_id.yml +0 -51
  60. data/fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_name.yml +0 -51
  61. data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_a_new_registrant_contact.yml +0 -52
  62. data/fixtures/vcr_cassettes/DNSimple_Domain/registration/with_an_existing_contact.yml +0 -52
  63. data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_ca.yml +0 -273
  64. data/fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_com.yml +0 -46
  65. data/fixtures/vcr_cassettes/DNSimple_Record/_all.yml +0 -195
  66. data/fixtures/vcr_cassettes/DNSimple_Record/creating_a_new_record.yml +0 -51
  67. data/fixtures/vcr_cassettes/DNSimple_Record/find_a_record.yml +0 -51
  68. data/fixtures/vcr_cassettes/DNSimple_Template/a_template.yml +0 -53
  69. data/fixtures/vcr_cassettes/DNSimple_User/_me.yml +0 -49
  70. data/spec/README +0 -10
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 404 Not Found
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 19:03:59 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 404 Not Found
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ Cache-Control: no-cache
14
+ X-Request-Id: ef98925c644549114ccc4cb17f3c8c75
15
+ X-Runtime: 0.029489
16
+
17
+ {"error":"Couldn't find Domain with name = test1383931357.com"}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 19:03:37 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "3f9496912d04f422c7f083b93bd6e9e3"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: eec6552de5a2aa5ae570139b388ffb9b
16
+ X-Runtime: 0.046892
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ {"domain":{"id":6,"user_id":2,"registrant_id":2,"name":"test-1383931357.com","unicode_name":"test-1383931357.com","token":"5b70de8be5cc783c77aa7d8359abd264","state":"registered","language":null,"lockable":true,"auto_renew":true,"whois_protected":false,"record_count":7,"service_count":0,"expires_on":"2015-11-08","created_at":"2013-11-08T17:22:48Z","updated_at":"2014-01-14T18:27:04Z","parsed_expiration_date":"2015-11-08T17:23:00Z","expires_at":"11/8/2015 5:23:00 PM","name_server_status":null,"private_whois?":false}}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:16:58 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "9d70235fec764f238bc14ef87c100a64"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: 16326ac884cfb59502a4511bf3092bf6
16
+ X-Runtime: 1.269543
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ [{"name":"cira_legal_type","description":"Legal type of registrant contact","required":true,"options":[{"title":"Corporation","value":"CCO","description":"A corporation under the laws of Canada or any province or territory of Canada, Charities, Cooperative, Council.<br/>Requirements: Registrant name must be the full legal name of the corporation and must be followed by the jurisdiction of incorporation (eg. Canada, Ontario, NWT...), unless it is obvious from the corporation's name. Canadian Internet Registration Authority (Canada). For Charities, the NFP should be included in the organization name. If this is a not-for-profit organization, you are also required to submit the registration number i.e.: 123456789 RR0001"},{"title":"Canadian Citizen","value":"CCT","description":"A Canadian citizen of the age of majority under the laws of the province or territory in Canada in which he or she resides or last resided.<br/>Requirements: The Registrant's name must be the full legal name of the Canadian Citizen who will hold the domain name registration as the name would appear on a passport, driver's license or other identification document issued by a government. The name can be followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant (eg. PhD.) Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark('), hyphen(-), period(.)."},{"title":"Canadian Resident","value":"RES","description":"A permanent resident as defined in the Immigration and Refugee Protection Act (Canada) S.C. 2001, c.27, as amended from time to time, who is "ordinarily resident" (as defined below) in Canada and of the age of majority under the laws of the province or territory in Canada in which he or she resides or last resided. "Ordinarily resident in Canada" means an individual who resides in Canada for more than 183 days in the twelve month period immediately preceding the date of the applicable request for registration of the .ca domain name or sub-domain name and in each twelve month period thereafter for the duration of the domain name registration.<br/>Requirements: The Registrant's name must be the full legal name of the Permanent Resident who will hold the domain name registration as the name would appear on a driver's license or other identification document issued by a government. The full legal name may be followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant by a recognized degree granting institution or a recognized professional designation which the registrant has the right to use (eg. PhD, MD, DDS.) Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark('), hyphen(-), period(.)."},{"title":"Government Entity","value":"GOV","description":"Her Majesty the Queen in right of Canada, a province or a territory; an agent of Her Majesty the Queen in right of Canada, of a province or of a territory; a federal, provincial or territorial Crown corporation, government agency or government entity; or a regional, municipal or local area government.<br />Requirements: The Registrant's name must be the complete official name of the entity that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the official name in parentheses). If the Registrant is not a government, the Registrant's name must be followed by the name of the jurisdiction (eg. Canada, province, territory, municipality, etc) to which the Registrant is related."},{"title":"Educational","value":"EDU","description":"(i) A university or college which is located in Canada and which is authorized or recognized as a university or college under an Act of the legislature of a province or territory of Canada; or<br />(ii) A college, post-secondary school, vocational school, secondary school, pre-school or other school or educational institution which is located in Canada and which is recognized by the educational authorities of a province or territory of Canada or licensed under or maintained by an Act of Parliament of Canada or of the legislature of a province or territory of Canada.<br />Requirements: The Registrant's name must be the complete official name of the institution that will hold the domain name registration, without any abbreviations. A common abbreviation may follow the official name in parentheses. The Registrant name must be followed by the jurisdiction (e.g. name of province, municipality) in which the institution is accredited if not obvious from the Registrant's name."},{"title":"Unincorporated Association","value":"ASS","description":"This Registrant Type is principally intended for religious congregations, social and sports clubs and community groups, council (not registered) or society (not registered) which are based and operating in Canada. An unincorporated organization, association or club:<br />(i) At least 80% of whose members: (A) are ordinarily resident in Canada (if such members are individuals); or (B) meet the requirements of any one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, Partnership Registered in Canada, Trust established in Canada, Legal Representative of a Canadian Citizen or Permanent Resident; and<br />(ii) At least 80% of whose directors, officers, employees, managers, administrators or other representatives are ordinarily resident in Canada.<br />Requirements: The Registrant's name must be the complete name of the association that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the complete name in parentheses)."},{"title":"Hospital","value":"HOP","description":"A hospital which is located in Canada and which is licensed, authorized or approved to operate as a hospital under an Act of the legislature of a province or territory of Canada<br />Requirements: The Registrant's name must be the complete official name of the hospital that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the complete name in parentheses.) The Registrant's name must be followed by the jurisdiction (eg. name of province) which accredited the hospital if not obvious from the Registrant's name."},{"title":"Partnership","value":"PRT","description":"A partnership, more than 66 2/3 per cent of whose partners meet the requirements of one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, Trust established in Canada or a Legal Representative of a Canadian Citizen or Permanent Resident, which is registered as a partnership under the laws of any province or territory of Canada.<br />Requirements: The Registrant's name must be the registered name of the partnership that will hold the domain name registration. The Registrant name must be followed by the jurisdiction of registration (eg. Alberta) and the registration number."},{"title":"Trade-mark","value":"TDM","description":"A Person which does not fall under any other registrant type, but which is the owner of a trade-mark which is the subject of a registration under the Trade-marks Act (Canada) R.S.C. 1985, c.T-13 as amended from time to time, but in this case such permission is limited to a request to register a .ca domain name consisting of or including the exact word component of that registered trade-mark.<br />This Registrant Type is only intended for Registrants which do not meet the requirements associated with any other registrant type but which have a trade-mark registered in Canada. (Trade-marks subject of trade-mark applications and trade-marks registered in other jurisdictions, such as the United States, do not qualify.)<br />The domain name to be registered must include the trade-mark. (eg. If the trade-mark is AVEA this type of registrant can register avea.ca or aveaisus.ca but not xyz.ca)."},{"title":"Trade Union","value":"TRD","description":"A trade union which is recognized by a labour board under the laws of Canada or any province or territory of Canada and which has its head office in Canada.<br />Requirements: The Registrant's name must be the complete official name of the trade union that will hold the domain name registration, without abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must be followed by the jurisdiction in Canada which recognizes it (if it is not obvious from the Registrant's name.)"},{"title":"Political Party","value":"PLT","description":"A political party registered under a relevant electoral law of Canada or any province or territory of Canada<br />Requirements: The Registrant's name must be the complete official name of the political party holding the domain name registration, without abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must also by followed by the jurisdiction in Canada in which it is registered (if it is not obvious from the official name)."},{"title":"Library, Archive or Museum","value":"LAM","description":"An institution, whether or not incorporated, that:<br />(i) is located in Canada; and<br />(ii) is not established or conducted for profit or does not form part of, or is not administered or directly or indirectly controlled by, a body that is established or conducted for profit in which is held and maintained a collection of documents and other materials that is open to the public or to researchers.<br />Requirements: The Registrant's name must be the complete legal name of the institution which will hold the domain name registration without abbreviations. (A common abbreviation may follow the complete name in parentheses.)"},{"title":"Trust","value":"TRS","description":"A trust established and subsisting under the laws of a province or territory of Canada, more than 66 2/3 % of whose trustees meet the requirements of one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, or a Legal Representative of a Canadian Citizen or Permanent Resident.<br />Requirements: The Registrant's name must be the complete official name of the trust, without any abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must also indicate the total percentage of the trustees that meet one or more of the following requirements: Canadian citizen, permanent resident, Canadian corporation, legal representative."},{"title":"Aboriginal Peoples","value":"ABO","description":"Any individual belonging to any Inuit, First Nation, Metis or other people indigenous to Canada.<br />Requirements: The Registrant's name must be the full legal name of the Aboriginal Person applying for the Registration as it would appear on a driver's license or other identification document issued by government.<br />The Registrant may enter its full legal name followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant by a recognized degree granting institution or a recognized professional designation which the registrant has the right to use (eg. PhD, MD, DDS.)<br />Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark(''), hyphen(-), period(.).<br/>Groups: Any Inuit, First Nation, Metis or other people indigenous to Canada, and any collectivity of such Aboriginal peoples.<br />Requirements: The Registrant's name must be the complete official name of the indigenous people a collectivity of Aboriginal Persons or, if there is no official name, the name by which the collectivity is commonly known."},{"title":"Indian Band","value":"INB","description":"Any Indian band as defined in the Indian Act, R.S.C. 1985, c. I-5, as amended from time to time, and any group of Indian bands;<br />Requirements: The name of Registrant must be the Indian Band Name as registered with the Department of Indian and Northern Affairs, Canada."},{"title":"Legal Representative","value":"LGR","description":"An executor, administrator or other legal representative of a Person listed as a Canadian Citizen or Permanent Resident of Canada.<br />Note: This registrant type is only available to a person or entity that has been appointed by legal process to represent an individual who is not competent to represent him or herself. It is not available to anyone who represents a Canadian or foreign corporation in any capacity.<br />Requirements: The Registrant's name must be the full legal name of the Canadian Citizen or Permanent Resident of Canada who is being represented as it would appear on a passport, driver's license or other government identification document. This must be followed by the full legal name and capacity of at least one of the official representatives. The representative should be identified as the administrative contact for these registrations."},{"title":"Official Mark","value":"OMK","description":"A Person which does not meet the requirements for any other Registrant Type, but which is a Person intended to be protected by Subsection 9(1) of the Trade-Marks Act (Canada) at whose request the Registrar of Trade-marks has published notice of adoption of any badge, crest, emblem, official mark or other mark pursuant to Subsection 9(1), but in this case such permission is limited to a request to register a .ca domain name consisting of or including the exact word component of such badge, crest, emblem, official mark or other mark in respect of which such Person requested publications.<br />Notes: This registrant type is only intended for Registrants which do not meet the requirements associated with any other registrant type but which have an Official Mark registered in Canada. The domain name must include the official mark (eg. If the official mark is WIPO, the registrant can register wipo.ca but not intellectual-property.ca)<br />Requirements: The Registrant's name must be the complete official name of the entity holding the domain name registration without any abbreviations. (A common abbreviation may follow the complete name in parentheses.) The registration number of the official mark must follow the Registrant Name."},{"title":"The Queen","value":"MAJ","description":"Her Majesty Queen Elizabeth the Second and her successors. Requirements: The Registrant's name must be that of Her Majesty the Queen or, after a succession, the name of her successor."}]},{"name":"cira_whois_display","description":"Hide registrant data in CIRA WHOIS","required":false,"options":[{"title":"No","value":"FULL","description":"Do not hide the registrant contact information in CIRA WHOIS."},{"title":"Yes","value":"PRIVATE","description":"Hide the registrant contact information in Cira WHOIS (only available to individuals)."}]},{"name":"cira_language","description":"The contact's preferred language for communication","required":true,"options":[{"title":"English","value":"en","description":"Use English for Registry to Registrant communication"},{"title":"French","value":"fr","description":"Use French for Registry to Registrant communication"}]},{"name":"cira_agreement_version","description":"Version of the CIRA Registrant Agreement displayed and agreed to by the Registrant on the Registrar website","required":true,"options":[{"title":"2.0","value":"2.0","description":"Current Version of Registrant Agreement"}]},{"name":"cira_agreement_value","description":"Registrant has agreed to CIRA's Registrant Agreement","required":true,"options":[{"title":"No","value":"N","description":""You have read, understood and agree to the terms and conditions of the Registrant\nAgreement, and that CIRA may, from time to time and at its discretion, amend any or all of\nthe terms and conditions of the Registrant Agreement, as CIRA deems appropriate, by\nposting a notice of the changes on the CIRA website and by sending a notice of any\nmaterial changes to Registrant."\n\n"You meet all the requirements of the Registrant Agreement to be a Registrant, to apply for\nthe registration of a Domain Name Registration, and to hold and maintain a Domain Name\nRegistration, including without limitation CIRA's Canadian Presence Requirements for\nRegistrants, at: www.cira.ca/assets/Documents/Legal/Registrants/CPR.pdf."\n\n"CIRA will collect, use and disclose your personal information, as set out in CIRA's\nPrivacy Policy, at: www.cira.ca/assets/Documents/Legal/Registrants/privacy.pdf.""},{"title":"Yes","value":"Y","description":""You have read, understood and agree to the terms and conditions of the Registrant\nAgreement, and that CIRA may, from time to time and at its discretion, amend any or all of\nthe terms and conditions of the Registrant Agreement, as CIRA deems appropriate, by\nposting a notice of the changes on the CIRA website and by sending a notice of any\nmaterial changes to Registrant."\n\n"You meet all the requirements of the Registrant Agreement to be a Registrant, to apply for\nthe registration of a Domain Name Registration, and to hold and maintain a Domain Name\nRegistration, including without limitation CIRA's Canadian Presence Requirements for\nRegistrants, at: www.cira.ca/assets/Documents/Legal/Registrants/CPR.pdf."\n\n"CIRA will collect, use and disclose your personal information, as set out in CIRA's\nPrivacy Policy, at: www.cira.ca/assets/Documents/Legal/Registrants/privacy.pdf.""}]}]
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:15:49 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "d751713988987e9331980363e24189ce"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: 62a995440fe468f93a58a38393bdd746
16
+ X-Runtime: 0.828757
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ []
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:16:58 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "9d70235fec764f238bc14ef87c100a64"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: 16326ac884cfb59502a4511bf3092bf6
16
+ X-Runtime: 1.269543
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ [{"name":"cira_legal_type","description":"Legal type of registrant contact","required":true,"options":[{"title":"Corporation","value":"CCO","description":"A corporation under the laws of Canada or any province or territory of Canada, Charities, Cooperative, Council.<br/>Requirements: Registrant name must be the full legal name of the corporation and must be followed by the jurisdiction of incorporation (eg. Canada, Ontario, NWT...), unless it is obvious from the corporation's name. Canadian Internet Registration Authority (Canada). For Charities, the NFP should be included in the organization name. If this is a not-for-profit organization, you are also required to submit the registration number i.e.: 123456789 RR0001"},{"title":"Canadian Citizen","value":"CCT","description":"A Canadian citizen of the age of majority under the laws of the province or territory in Canada in which he or she resides or last resided.<br/>Requirements: The Registrant's name must be the full legal name of the Canadian Citizen who will hold the domain name registration as the name would appear on a passport, driver's license or other identification document issued by a government. The name can be followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant (eg. PhD.) Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark('), hyphen(-), period(.)."},{"title":"Canadian Resident","value":"RES","description":"A permanent resident as defined in the Immigration and Refugee Protection Act (Canada) S.C. 2001, c.27, as amended from time to time, who is "ordinarily resident" (as defined below) in Canada and of the age of majority under the laws of the province or territory in Canada in which he or she resides or last resided. "Ordinarily resident in Canada" means an individual who resides in Canada for more than 183 days in the twelve month period immediately preceding the date of the applicable request for registration of the .ca domain name or sub-domain name and in each twelve month period thereafter for the duration of the domain name registration.<br/>Requirements: The Registrant's name must be the full legal name of the Permanent Resident who will hold the domain name registration as the name would appear on a driver's license or other identification document issued by a government. The full legal name may be followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant by a recognized degree granting institution or a recognized professional designation which the registrant has the right to use (eg. PhD, MD, DDS.) Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark('), hyphen(-), period(.)."},{"title":"Government Entity","value":"GOV","description":"Her Majesty the Queen in right of Canada, a province or a territory; an agent of Her Majesty the Queen in right of Canada, of a province or of a territory; a federal, provincial or territorial Crown corporation, government agency or government entity; or a regional, municipal or local area government.<br />Requirements: The Registrant's name must be the complete official name of the entity that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the official name in parentheses). If the Registrant is not a government, the Registrant's name must be followed by the name of the jurisdiction (eg. Canada, province, territory, municipality, etc) to which the Registrant is related."},{"title":"Educational","value":"EDU","description":"(i) A university or college which is located in Canada and which is authorized or recognized as a university or college under an Act of the legislature of a province or territory of Canada; or<br />(ii) A college, post-secondary school, vocational school, secondary school, pre-school or other school or educational institution which is located in Canada and which is recognized by the educational authorities of a province or territory of Canada or licensed under or maintained by an Act of Parliament of Canada or of the legislature of a province or territory of Canada.<br />Requirements: The Registrant's name must be the complete official name of the institution that will hold the domain name registration, without any abbreviations. A common abbreviation may follow the official name in parentheses. The Registrant name must be followed by the jurisdiction (e.g. name of province, municipality) in which the institution is accredited if not obvious from the Registrant's name."},{"title":"Unincorporated Association","value":"ASS","description":"This Registrant Type is principally intended for religious congregations, social and sports clubs and community groups, council (not registered) or society (not registered) which are based and operating in Canada. An unincorporated organization, association or club:<br />(i) At least 80% of whose members: (A) are ordinarily resident in Canada (if such members are individuals); or (B) meet the requirements of any one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, Partnership Registered in Canada, Trust established in Canada, Legal Representative of a Canadian Citizen or Permanent Resident; and<br />(ii) At least 80% of whose directors, officers, employees, managers, administrators or other representatives are ordinarily resident in Canada.<br />Requirements: The Registrant's name must be the complete name of the association that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the complete name in parentheses)."},{"title":"Hospital","value":"HOP","description":"A hospital which is located in Canada and which is licensed, authorized or approved to operate as a hospital under an Act of the legislature of a province or territory of Canada<br />Requirements: The Registrant's name must be the complete official name of the hospital that will hold the domain name registration, without any abbreviations. (A common abbreviation may follow the complete name in parentheses.) The Registrant's name must be followed by the jurisdiction (eg. name of province) which accredited the hospital if not obvious from the Registrant's name."},{"title":"Partnership","value":"PRT","description":"A partnership, more than 66 2/3 per cent of whose partners meet the requirements of one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, Trust established in Canada or a Legal Representative of a Canadian Citizen or Permanent Resident, which is registered as a partnership under the laws of any province or territory of Canada.<br />Requirements: The Registrant's name must be the registered name of the partnership that will hold the domain name registration. The Registrant name must be followed by the jurisdiction of registration (eg. Alberta) and the registration number."},{"title":"Trade-mark","value":"TDM","description":"A Person which does not fall under any other registrant type, but which is the owner of a trade-mark which is the subject of a registration under the Trade-marks Act (Canada) R.S.C. 1985, c.T-13 as amended from time to time, but in this case such permission is limited to a request to register a .ca domain name consisting of or including the exact word component of that registered trade-mark.<br />This Registrant Type is only intended for Registrants which do not meet the requirements associated with any other registrant type but which have a trade-mark registered in Canada. (Trade-marks subject of trade-mark applications and trade-marks registered in other jurisdictions, such as the United States, do not qualify.)<br />The domain name to be registered must include the trade-mark. (eg. If the trade-mark is AVEA this type of registrant can register avea.ca or aveaisus.ca but not xyz.ca)."},{"title":"Trade Union","value":"TRD","description":"A trade union which is recognized by a labour board under the laws of Canada or any province or territory of Canada and which has its head office in Canada.<br />Requirements: The Registrant's name must be the complete official name of the trade union that will hold the domain name registration, without abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must be followed by the jurisdiction in Canada which recognizes it (if it is not obvious from the Registrant's name.)"},{"title":"Political Party","value":"PLT","description":"A political party registered under a relevant electoral law of Canada or any province or territory of Canada<br />Requirements: The Registrant's name must be the complete official name of the political party holding the domain name registration, without abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must also by followed by the jurisdiction in Canada in which it is registered (if it is not obvious from the official name)."},{"title":"Library, Archive or Museum","value":"LAM","description":"An institution, whether or not incorporated, that:<br />(i) is located in Canada; and<br />(ii) is not established or conducted for profit or does not form part of, or is not administered or directly or indirectly controlled by, a body that is established or conducted for profit in which is held and maintained a collection of documents and other materials that is open to the public or to researchers.<br />Requirements: The Registrant's name must be the complete legal name of the institution which will hold the domain name registration without abbreviations. (A common abbreviation may follow the complete name in parentheses.)"},{"title":"Trust","value":"TRS","description":"A trust established and subsisting under the laws of a province or territory of Canada, more than 66 2/3 % of whose trustees meet the requirements of one of the following Registrant Types: Corporation (Canada or Canadian province or territory), Canadian citizen, Permanent Resident of Canada, or a Legal Representative of a Canadian Citizen or Permanent Resident.<br />Requirements: The Registrant's name must be the complete official name of the trust, without any abbreviations. (A common abbreviation may follow the official name in parentheses.) The Registrant name must also indicate the total percentage of the trustees that meet one or more of the following requirements: Canadian citizen, permanent resident, Canadian corporation, legal representative."},{"title":"Aboriginal Peoples","value":"ABO","description":"Any individual belonging to any Inuit, First Nation, Metis or other people indigenous to Canada.<br />Requirements: The Registrant's name must be the full legal name of the Aboriginal Person applying for the Registration as it would appear on a driver's license or other identification document issued by government.<br />The Registrant may enter its full legal name followed by a space and "o/a xxxx" where "o/a" stands for "Operating As" and "xxxx" can be any alpha-numeric string designated by the applicant and subject to applicable rules and length restrictions (e.g. "John Doe o/a Doe Consulting Group"). The name may also be followed by a space and a degree granted to the registrant by a recognized degree granting institution or a recognized professional designation which the registrant has the right to use (eg. PhD, MD, DDS.)<br />Full legal names of individuals may only consist of alphabetic characters and the special characters: single quote mark(''), hyphen(-), period(.).<br/>Groups: Any Inuit, First Nation, Metis or other people indigenous to Canada, and any collectivity of such Aboriginal peoples.<br />Requirements: The Registrant's name must be the complete official name of the indigenous people a collectivity of Aboriginal Persons or, if there is no official name, the name by which the collectivity is commonly known."},{"title":"Indian Band","value":"INB","description":"Any Indian band as defined in the Indian Act, R.S.C. 1985, c. I-5, as amended from time to time, and any group of Indian bands;<br />Requirements: The name of Registrant must be the Indian Band Name as registered with the Department of Indian and Northern Affairs, Canada."},{"title":"Legal Representative","value":"LGR","description":"An executor, administrator or other legal representative of a Person listed as a Canadian Citizen or Permanent Resident of Canada.<br />Note: This registrant type is only available to a person or entity that has been appointed by legal process to represent an individual who is not competent to represent him or herself. It is not available to anyone who represents a Canadian or foreign corporation in any capacity.<br />Requirements: The Registrant's name must be the full legal name of the Canadian Citizen or Permanent Resident of Canada who is being represented as it would appear on a passport, driver's license or other government identification document. This must be followed by the full legal name and capacity of at least one of the official representatives. The representative should be identified as the administrative contact for these registrations."},{"title":"Official Mark","value":"OMK","description":"A Person which does not meet the requirements for any other Registrant Type, but which is a Person intended to be protected by Subsection 9(1) of the Trade-Marks Act (Canada) at whose request the Registrar of Trade-marks has published notice of adoption of any badge, crest, emblem, official mark or other mark pursuant to Subsection 9(1), but in this case such permission is limited to a request to register a .ca domain name consisting of or including the exact word component of such badge, crest, emblem, official mark or other mark in respect of which such Person requested publications.<br />Notes: This registrant type is only intended for Registrants which do not meet the requirements associated with any other registrant type but which have an Official Mark registered in Canada. The domain name must include the official mark (eg. If the official mark is WIPO, the registrant can register wipo.ca but not intellectual-property.ca)<br />Requirements: The Registrant's name must be the complete official name of the entity holding the domain name registration without any abbreviations. (A common abbreviation may follow the complete name in parentheses.) The registration number of the official mark must follow the Registrant Name."},{"title":"The Queen","value":"MAJ","description":"Her Majesty Queen Elizabeth the Second and her successors. Requirements: The Registrant's name must be that of Her Majesty the Queen or, after a succession, the name of her successor."}]},{"name":"cira_whois_display","description":"Hide registrant data in CIRA WHOIS","required":false,"options":[{"title":"No","value":"FULL","description":"Do not hide the registrant contact information in CIRA WHOIS."},{"title":"Yes","value":"PRIVATE","description":"Hide the registrant contact information in Cira WHOIS (only available to individuals)."}]},{"name":"cira_language","description":"The contact's preferred language for communication","required":true,"options":[{"title":"English","value":"en","description":"Use English for Registry to Registrant communication"},{"title":"French","value":"fr","description":"Use French for Registry to Registrant communication"}]},{"name":"cira_agreement_version","description":"Version of the CIRA Registrant Agreement displayed and agreed to by the Registrant on the Registrar website","required":true,"options":[{"title":"2.0","value":"2.0","description":"Current Version of Registrant Agreement"}]},{"name":"cira_agreement_value","description":"Registrant has agreed to CIRA's Registrant Agreement","required":true,"options":[{"title":"No","value":"N","description":""You have read, understood and agree to the terms and conditions of the Registrant\nAgreement, and that CIRA may, from time to time and at its discretion, amend any or all of\nthe terms and conditions of the Registrant Agreement, as CIRA deems appropriate, by\nposting a notice of the changes on the CIRA website and by sending a notice of any\nmaterial changes to Registrant."\n\n"You meet all the requirements of the Registrant Agreement to be a Registrant, to apply for\nthe registration of a Domain Name Registration, and to hold and maintain a Domain Name\nRegistration, including without limitation CIRA's Canadian Presence Requirements for\nRegistrants, at: www.cira.ca/assets/Documents/Legal/Registrants/CPR.pdf."\n\n"CIRA will collect, use and disclose your personal information, as set out in CIRA's\nPrivacy Policy, at: www.cira.ca/assets/Documents/Legal/Registrants/privacy.pdf.""},{"title":"Yes","value":"Y","description":""You have read, understood and agree to the terms and conditions of the Registrant\nAgreement, and that CIRA may, from time to time and at its discretion, amend any or all of\nthe terms and conditions of the Registrant Agreement, as CIRA deems appropriate, by\nposting a notice of the changes on the CIRA website and by sending a notice of any\nmaterial changes to Registrant."\n\n"You meet all the requirements of the Registrant Agreement to be a Registrant, to apply for\nthe registration of a Domain Name Registration, and to hold and maintain a Domain Name\nRegistration, including without limitation CIRA's Canadian Presence Requirements for\nRegistrants, at: www.cira.ca/assets/Documents/Legal/Registrants/CPR.pdf."\n\n"CIRA will collect, use and disclose your personal information, as set out in CIRA's\nPrivacy Policy, at: www.cira.ca/assets/Documents/Legal/Registrants/privacy.pdf.""}]}]
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:28:28 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "daf44332ad1b854ea9aafb6d2345bf25"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: 77bcd47eda1ce40c083364cbbdd845bf
16
+ X-Runtime: 0.047482
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ [{"record":{"id":36,"domain_id":6,"parent_id":null,"name":"","content":"ns1.dnsimple.com admin.dnsimple.com 2013110801 86400 10800 604800 300","ttl":3600,"prio":null,"record_type":"SOA","system_record":true,"created_at":"2013-11-08T17:22:48Z","updated_at":"2013-11-08T17:22:58Z"}},{"record":{"id":37,"domain_id":6,"parent_id":null,"name":"","content":"ns1.dnsimple.com","ttl":3600,"prio":null,"record_type":"NS","system_record":true,"created_at":"2013-11-08T17:22:48Z","updated_at":"2013-11-08T17:22:58Z"}},{"record":{"id":38,"domain_id":6,"parent_id":null,"name":"","content":"ns2.dnsimple.com","ttl":3600,"prio":null,"record_type":"NS","system_record":true,"created_at":"2013-11-08T17:22:48Z","updated_at":"2013-11-08T17:22:59Z"}},{"record":{"id":39,"domain_id":6,"parent_id":null,"name":"","content":"ns3.dnsimple.com","ttl":3600,"prio":null,"record_type":"NS","system_record":true,"created_at":"2013-11-08T17:22:48Z","updated_at":"2013-11-08T17:23:00Z"}},{"record":{"id":40,"domain_id":6,"parent_id":null,"name":"","content":"ns4.dnsimple.com","ttl":3600,"prio":null,"record_type":"NS","system_record":true,"created_at":"2013-11-08T17:22:48Z","updated_at":"2013-11-08T17:23:00Z"}},{"record":{"id":1495,"domain_id":6,"parent_id":null,"name":"www","content":"1.2.3.4","ttl":3600,"prio":null,"record_type":"A","system_record":null,"created_at":"2014-01-14T18:25:56Z","updated_at":"2014-01-14T18:26:04Z"}},{"record":{"id":1496,"domain_id":6,"parent_id":null,"name":"","content":"1.2.3.5","ttl":3600,"prio":null,"record_type":"A","system_record":null,"created_at":"2014-01-14T18:27:04Z","updated_at":"2014-01-14T18:27:08Z"}}]
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 404 Not Found
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:28:07 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 404 Not Found
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ Cache-Control: no-cache
14
+ X-Request-Id: b7af596690cb83c7a7167f4d47aa50c3
15
+ X-Runtime: 0.044234
16
+
17
+ {"error":"Couldn't find Record with id=14395 [WHERE \"records\".\"domain_id\" = 6]"}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:27:45 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "67a9bfb8046724e79c7244d3c2458e65"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: bb7cbc5a32833ea4d59c185b0ab67915
16
+ X-Runtime: 0.205329
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ {"record":{"id":1495,"domain_id":6,"parent_id":null,"name":"www","content":"1.2.3.4","ttl":3600,"prio":null,"record_type":"A","system_record":null,"created_at":"2014-01-14T18:25:56Z","updated_at":"2014-01-14T18:26:04Z"}}
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 404 Not Found
2
+ Server: nginx/1.5.8
3
+ Date: Tue, 14 Jan 2014 17:53:49 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 404 Not Found
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ Cache-Control: no-cache
14
+ X-Request-Id: 787cb35a027da017afdcceca2c87bcf5
15
+ X-Runtime: 0.240254
16
+
17
+ {"error":"Couldn't find DnsTemplate with short_name = googleapps"}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.5.8
3
+ Date: Tue, 14 Jan 2014 17:53:21 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "10b0cf9b0739e857322f4a7fce8f66a8"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: b70969199a7f50224e1f5ed08f765692
16
+ X-Runtime: 0.032644
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ {"dns_template":{"id":63,"user_id":null,"name":"Google Apps","short_name":"google-apps","description":"The Google Mail Servers and Google Apps CNAME records in a single template.","created_at":"2010-12-15T08:08:02Z","updated_at":"2013-09-02T07:16:53Z"}}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 17:45:57 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "eaafff1bd6f4251411afaf624b31ba67"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: fea9cce456c8be69c4b0dec81452726b
16
+ X-Runtime: 0.034644
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ {"user":{"id":2,"email":"example@example.com","referral_token":"04b12390f6204e","single_access_token":"fCF0n6OTW5n4NtFh8W","default_contact_id":null,"phone":null,"country_code":null,"authy_identifier":null,"authy_verified_at":null,"domain_count":2,"domain_limit":50,"login_count":2,"failed_login_count":0,"unsubscribed_at":null,"created_at":"2013-11-08T17:20:58Z","updated_at":"2014-01-14T17:45:57Z","first_name":null,"last_name":null}}
data/spec/spec_helper.rb CHANGED
@@ -1,29 +1,25 @@
1
- require 'rubygems'
2
- require 'bundler/setup'
3
- require 'cgi'
4
- require 'vcr'
1
+ require 'rspec'
5
2
 
6
3
  $:.unshift(File.dirname(__FILE__) + '/lib')
7
4
  require 'dnsimple'
8
5
 
9
- config = YAML.load_file(File.expand_path(ENV['DNSIMPLE_TEST_CONFIG'] || '~/.dnsimple.test'))
10
-
11
- DNSimple::Client.base_uri = config['site'] if config['site'] # Example: https://test.dnsimple.com/
12
- DNSimple::Client.base_uri = config['base_uri'] if config['base_uri'] # Example: https://test.dnsimple.com/
13
- DNSimple::Client.username = config['username'] # Example: testusername@example.com
14
- DNSimple::Client.password = config['password'] # Example: testpassword
15
- DNSimple::Client.api_token = config['api_token'] # Example: 1234567890
6
+ unless defined?(SPEC_ROOT)
7
+ SPEC_ROOT = File.expand_path("../", __FILE__)
8
+ end
16
9
 
17
- VCR.configure do |c|
18
- c.cassette_library_dir = 'fixtures/vcr_cassettes'
19
- c.hook_into :fakeweb
20
- c.filter_sensitive_data("<USERNAME>") { CGI::escape(DNSimple::Client.username) }
21
- c.filter_sensitive_data("<PASSWORD>") { CGI::escape(DNSimple::Client.password) }
10
+ if ENV['DNSIMPLE_TEST_CONFIG']
11
+ DNSimple::Client.load_credentials(ENV['DNSIMPLE_TEST_CONFIG'])
12
+ CONFIG = { 'username' => DNSimple::Client.username, 'password' => DNSimple::Client.password, 'base_uri' => DNSimple::Client.base_uri, 'host' => URI.parse(DNSimple::Client.base_uri).host }
13
+ else
14
+ CONFIG = { 'username' => 'username', 'password' => 'password', 'base_uri' => 'https://api.sandbox.dnsimple.com/', 'host' => 'api.sandbox.dnsimple.com' }
15
+ DNSimple::Client.base_uri = CONFIG['base_uri']
16
+ DNSimple::Client.username = CONFIG['username']
17
+ DNSimple::Client.password = CONFIG['password']
22
18
  end
23
19
 
20
+
24
21
  RSpec.configure do |c|
25
22
  c.mock_framework = :mocha
26
- c.extend VCR::RSpec::Macros
27
23
 
28
24
  # Silent the puts call in the commands
29
25
  c.before do
@@ -35,3 +31,4 @@ RSpec.configure do |c|
35
31
  end
36
32
  end
37
33
 
34
+ Dir[File.join(SPEC_ROOT, "support/**/*.rb")].each { |f| require f }
@@ -0,0 +1,15 @@
1
+ module RSpecSupportHelpers
2
+
3
+ def fixture(*names)
4
+ File.join(SPEC_ROOT, "files", *names)
5
+ end
6
+
7
+ def read_fixture(*names)
8
+ File.read(fixture(*names))
9
+ end
10
+
11
+ end
12
+
13
+ RSpec.configure do |config|
14
+ config.include RSpecSupportHelpers
15
+ end
@@ -0,0 +1,11 @@
1
+ require 'webmock/rspec'
2
+
3
+ RSpec.configure do |config|
4
+ config.before(:suite) do
5
+ WebMock.disable_net_connect!
6
+ end
7
+
8
+ config.after(:suite) do
9
+ WebMock.allow_net_connect!
10
+ end
11
+ end
metadata CHANGED
@@ -1,158 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsimple-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
5
- prerelease:
4
+ version: 1.5.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Anthony Eden
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-17 00:00:00.000000000 Z
11
+ date: 2014-01-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httparty
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: '0.12'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: '0'
26
+ version: '0.12'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: aruba
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: cucumber
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: fakeweb
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
66
+ - - '>='
92
67
  - !ruby/object:Gem::Version
93
68
  version: '0'
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: mocha
96
71
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
72
  requirements:
99
- - - ! '>='
73
+ - - '>='
100
74
  - !ruby/object:Gem::Version
101
75
  version: '0'
102
76
  type: :development
103
77
  prerelease: false
104
78
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
79
  requirements:
107
- - - ! '>='
80
+ - - '>='
108
81
  - !ruby/object:Gem::Version
109
82
  version: '0'
110
83
  - !ruby/object:Gem::Dependency
111
84
  name: rspec
112
85
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
86
  requirements:
115
- - - ! '>='
87
+ - - '>='
116
88
  - !ruby/object:Gem::Version
117
89
  version: '0'
118
90
  type: :development
119
91
  prerelease: false
120
92
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
93
  requirements:
123
- - - ! '>='
94
+ - - '>='
124
95
  - !ruby/object:Gem::Version
125
96
  version: '0'
126
97
  - !ruby/object:Gem::Dependency
127
- name: vcr
98
+ name: yard
128
99
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
100
  requirements:
131
- - - ! '>='
101
+ - - '>='
132
102
  - !ruby/object:Gem::Version
133
103
  version: '0'
134
104
  type: :development
135
105
  prerelease: false
136
106
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
107
  requirements:
139
- - - ! '>='
108
+ - - '>='
140
109
  - !ruby/object:Gem::Version
141
110
  version: '0'
142
111
  - !ruby/object:Gem::Dependency
143
- name: yard
112
+ name: webmock
144
113
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
114
  requirements:
147
- - - ! '>='
115
+ - - '>='
148
116
  - !ruby/object:Gem::Version
149
117
  version: '0'
150
118
  type: :development
151
119
  prerelease: false
152
120
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
121
  requirements:
155
- - - ! '>='
122
+ - - '>='
156
123
  - !ruby/object:Gem::Version
157
124
  version: '0'
158
125
  description: A ruby wrapper for the DNSimple API that also includes a command-line
@@ -181,7 +148,7 @@ files:
181
148
  - bin/dnsimple
182
149
  - bin/dnsimple.rb
183
150
  - dnsimple-ruby.gemspec
184
- - features/README
151
+ - features/README.md
185
152
  - features/cli/certificates/purchase_certificate.feature
186
153
  - features/cli/contacts/create_contact.feature
187
154
  - features/cli/domains/check_domain.feature
@@ -198,25 +165,6 @@ files:
198
165
  - features/step_definitions/record_steps.rb
199
166
  - features/step_definitions/template_steps.rb
200
167
  - features/support/env.rb
201
- - fixtures/vcr_cassettes/DNSimple_Certificate/_all.yml
202
- - fixtures/vcr_cassettes/DNSimple_Certificate/_purchase.yml
203
- - fixtures/vcr_cassettes/DNSimple_Certificate/_submit.yml
204
- - fixtures/vcr_cassettes/DNSimple_Contact/a_new_contact.yml
205
- - fixtures/vcr_cassettes/DNSimple_Contact/an_existing_contact.yml
206
- - fixtures/vcr_cassettes/DNSimple_Domain/_all.yml
207
- - fixtures/vcr_cassettes/DNSimple_Domain/applying_templates.yml
208
- - fixtures/vcr_cassettes/DNSimple_Domain/creating_a_new_domain.yml
209
- - fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_id.yml
210
- - fixtures/vcr_cassettes/DNSimple_Domain/finding_an_existing_domain/by_name.yml
211
- - fixtures/vcr_cassettes/DNSimple_Domain/registration/with_a_new_registrant_contact.yml
212
- - fixtures/vcr_cassettes/DNSimple_Domain/registration/with_an_existing_contact.yml
213
- - fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_ca.yml
214
- - fixtures/vcr_cassettes/DNSimple_ExtendedAttribute/list_extended_attributes/for_com.yml
215
- - fixtures/vcr_cassettes/DNSimple_Record/_all.yml
216
- - fixtures/vcr_cassettes/DNSimple_Record/creating_a_new_record.yml
217
- - fixtures/vcr_cassettes/DNSimple_Record/find_a_record.yml
218
- - fixtures/vcr_cassettes/DNSimple_Template/a_template.yml
219
- - fixtures/vcr_cassettes/DNSimple_User/_me.yml
220
168
  - lib/dnsimple-ruby.rb
221
169
  - lib/dnsimple.rb
222
170
  - lib/dnsimple/base.rb
@@ -271,7 +219,6 @@ files:
271
219
  - lib/dnsimple/transfer_order.rb
272
220
  - lib/dnsimple/user.rb
273
221
  - lib/dnsimple/version.rb
274
- - spec/README
275
222
  - spec/ci/.dnsimple.test
276
223
  - spec/commands/certificate_purchase_spec.rb
277
224
  - spec/commands/certificate_submit_spec.rb
@@ -286,33 +233,50 @@ files:
286
233
  - spec/dnsimple/record_spec.rb
287
234
  - spec/dnsimple/template_spec.rb
288
235
  - spec/dnsimple/user_spec.rb
236
+ - spec/files/certificates/index/success.http
237
+ - spec/files/certificates/show/notfound.http
238
+ - spec/files/certificates/show/success.http
239
+ - spec/files/contacts/show/notfound.http
240
+ - spec/files/contacts/show/success.http
241
+ - spec/files/domains/show/notfound.http
242
+ - spec/files/domains/show/success.http
243
+ - spec/files/extended_attributes/ca.http
244
+ - spec/files/extended_attributes/com.http
245
+ - spec/files/extended_attributes/success.http
246
+ - spec/files/records/index/success.http
247
+ - spec/files/records/show/notfound.http
248
+ - spec/files/records/show/success.http
249
+ - spec/files/templates/show/notfound.http
250
+ - spec/files/templates/show/success.http
251
+ - spec/files/users/me/success.http
289
252
  - spec/spec_helper.rb
253
+ - spec/support/helpers.rb
254
+ - spec/support/webmock.rb
290
255
  homepage: http://github.com/aetrion/dnsimple-ruby
291
256
  licenses: []
257
+ metadata: {}
292
258
  post_install_message:
293
259
  rdoc_options: []
294
260
  require_paths:
295
261
  - lib
296
262
  required_ruby_version: !ruby/object:Gem::Requirement
297
- none: false
298
263
  requirements:
299
- - - ! '>='
264
+ - - '>='
300
265
  - !ruby/object:Gem::Version
301
266
  version: '0'
302
267
  required_rubygems_version: !ruby/object:Gem::Requirement
303
- none: false
304
268
  requirements:
305
- - - ! '>='
269
+ - - '>='
306
270
  - !ruby/object:Gem::Version
307
271
  version: '0'
308
272
  requirements: []
309
273
  rubyforge_project:
310
- rubygems_version: 1.8.23
274
+ rubygems_version: 2.0.14
311
275
  signing_key:
312
- specification_version: 3
276
+ specification_version: 4
313
277
  summary: A ruby wrapper for the DNSimple API
314
278
  test_files:
315
- - features/README
279
+ - features/README.md
316
280
  - features/cli/certificates/purchase_certificate.feature
317
281
  - features/cli/contacts/create_contact.feature
318
282
  - features/cli/domains/check_domain.feature
@@ -329,7 +293,6 @@ test_files:
329
293
  - features/step_definitions/record_steps.rb
330
294
  - features/step_definitions/template_steps.rb
331
295
  - features/support/env.rb
332
- - spec/README
333
296
  - spec/ci/.dnsimple.test
334
297
  - spec/commands/certificate_purchase_spec.rb
335
298
  - spec/commands/certificate_submit_spec.rb
@@ -344,5 +307,23 @@ test_files:
344
307
  - spec/dnsimple/record_spec.rb
345
308
  - spec/dnsimple/template_spec.rb
346
309
  - spec/dnsimple/user_spec.rb
310
+ - spec/files/certificates/index/success.http
311
+ - spec/files/certificates/show/notfound.http
312
+ - spec/files/certificates/show/success.http
313
+ - spec/files/contacts/show/notfound.http
314
+ - spec/files/contacts/show/success.http
315
+ - spec/files/domains/show/notfound.http
316
+ - spec/files/domains/show/success.http
317
+ - spec/files/extended_attributes/ca.http
318
+ - spec/files/extended_attributes/com.http
319
+ - spec/files/extended_attributes/success.http
320
+ - spec/files/records/index/success.http
321
+ - spec/files/records/show/notfound.http
322
+ - spec/files/records/show/success.http
323
+ - spec/files/templates/show/notfound.http
324
+ - spec/files/templates/show/success.http
325
+ - spec/files/users/me/success.http
347
326
  - spec/spec_helper.rb
327
+ - spec/support/helpers.rb
328
+ - spec/support/webmock.rb
348
329
  has_rdoc: