dnsimple 10.0.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +5 -7
  3. data/.github/workflows/ci.yml +3 -3
  4. data/.github/workflows/release.yml +2 -2
  5. data/.github/workflows/sync-test-fixtures.yml +55 -0
  6. data/.markdownlint.yaml +15 -1
  7. data/.rubocop.yml +1 -1
  8. data/.rubocop_dnsimple.yml +15 -31
  9. data/CHANGELOG.md +9 -0
  10. data/Gemfile +7 -7
  11. data/lib/dnsimple/client/clients.rb +29 -31
  12. data/lib/dnsimple/client/domains_email_forwards.rb +1 -1
  13. data/lib/dnsimple/client/zones_records.rb +33 -0
  14. data/lib/dnsimple/client.rb +5 -5
  15. data/lib/dnsimple/default.rb +7 -7
  16. data/lib/dnsimple/response.rb +3 -3
  17. data/lib/dnsimple/struct/charge.rb +1 -1
  18. data/lib/dnsimple/struct/email_forward.rb +0 -8
  19. data/lib/dnsimple/struct/zone_record_id.rb +12 -0
  20. data/lib/dnsimple/struct/zone_records_batch_change.rb +18 -0
  21. data/lib/dnsimple/struct.rb +42 -40
  22. data/lib/dnsimple/version.rb +1 -1
  23. data/lib/dnsimple.rb +5 -5
  24. data/spec/dnsimple/client/accounts_spec.rb +2 -2
  25. data/spec/dnsimple/client/billing_spec.rb +3 -3
  26. data/spec/dnsimple/client/certificates_spec.rb +11 -11
  27. data/spec/dnsimple/client/client_service_spec.rb +1 -1
  28. data/spec/dnsimple/client/contacts_spec.rb +6 -6
  29. data/spec/dnsimple/client/dns_analytics_spec.rb +9 -9
  30. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +7 -7
  31. data/spec/dnsimple/client/domains_dnssec_spec.rb +4 -4
  32. data/spec/dnsimple/client/domains_email_forwards_spec.rb +8 -15
  33. data/spec/dnsimple/client/domains_pushes_spec.rb +5 -5
  34. data/spec/dnsimple/client/domains_spec.rb +6 -6
  35. data/spec/dnsimple/client/identity_spec.rb +2 -2
  36. data/spec/dnsimple/client/oauth_spec.rb +3 -3
  37. data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +3 -3
  38. data/spec/dnsimple/client/registrar_delegation_spec.rb +1 -1
  39. data/spec/dnsimple/client/registrar_spec.rb +1 -1
  40. data/spec/dnsimple/client/registrar_transfer_lock_spec.rb +4 -4
  41. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +1 -1
  42. data/spec/dnsimple/client/services_domains_spec.rb +4 -4
  43. data/spec/dnsimple/client/services_spec.rb +1 -1
  44. data/spec/dnsimple/client/templates_domains_spec.rb +2 -2
  45. data/spec/dnsimple/client/templates_records_spec.rb +4 -4
  46. data/spec/dnsimple/client/templates_spec.rb +2 -2
  47. data/spec/dnsimple/client/tlds_spec.rb +5 -5
  48. data/spec/dnsimple/client/vanity_name_servers_spec.rb +1 -1
  49. data/spec/dnsimple/client/webhooks_spec.rb +5 -5
  50. data/spec/dnsimple/client/zones_distributions_spec.rb +3 -3
  51. data/spec/dnsimple/client/zones_records_spec.rb +102 -7
  52. data/spec/dnsimple/client/zones_spec.rb +6 -6
  53. data/spec/dnsimple/client_spec.rb +10 -10
  54. data/spec/dnsimple/extra_spec.rb +1 -1
  55. data/spec/dnsimple/options/base_spec.rb +5 -5
  56. data/spec/dnsimple/options/list_options_spec.rb +21 -21
  57. data/spec/fixtures.http/accounts/success-user.http +2 -1
  58. data/spec/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +16 -0
  59. data/spec/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +15 -0
  60. data/spec/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +15 -0
  61. data/spec/fixtures.http/batchChangeZoneRecords/success.http +16 -0
  62. data/spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http +4 -4
  63. data/spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http +4 -4
  64. data/spec/fixtures.http/checkRegistrantChange/success.http +5 -5
  65. data/spec/fixtures.http/createContact/error-validation-errors.http +18 -0
  66. data/spec/fixtures.http/createEmailForward/created.http +1 -2
  67. data/spec/fixtures.http/createRegistrantChange/success.http +5 -5
  68. data/spec/fixtures.http/createWebhook/created.http +16 -16
  69. data/spec/fixtures.http/deleteRegistrantChange/success.http +4 -4
  70. data/spec/fixtures.http/deleteRegistrantChange/success_async.http +14 -0
  71. data/spec/fixtures.http/dnsAnalytics/success.http +1 -1
  72. data/spec/fixtures.http/getDomainPrices/failure.http +18 -18
  73. data/spec/fixtures.http/getDomainPrices/success.http +21 -21
  74. data/spec/fixtures.http/getDomainRestore/success.http +15 -13
  75. data/spec/fixtures.http/getEmailForward/success.http +1 -2
  76. data/spec/fixtures.http/getRegistrantChange/success.http +5 -5
  77. data/spec/fixtures.http/getTld/success.http +1 -1
  78. data/spec/fixtures.http/getWebhook/success.http +16 -16
  79. data/spec/fixtures.http/listAccounts/success-user.http +1 -1
  80. data/spec/fixtures.http/listCharges/fail-400-bad-filter.http +0 -2
  81. data/spec/fixtures.http/listCharges/fail-403.http +0 -2
  82. data/spec/fixtures.http/listCharges/success.http +0 -2
  83. data/spec/fixtures.http/listEmailForwards/success.http +1 -1
  84. data/spec/fixtures.http/listRegistrantChanges/success.http +5 -5
  85. data/spec/fixtures.http/listTlds/success.http +1 -1
  86. data/spec/fixtures.http/listWebhooks/success.http +16 -16
  87. data/spec/fixtures.http/registerDomain/error-extended-attributes.http +18 -0
  88. data/spec/fixtures.http/restoreDomain/success.http +14 -12
  89. data/spec/fixtures.http/updateZoneNsRecords/success.http +16 -0
  90. data/spec/fixtures.http/whoami/success-account.http +1 -1
  91. data/spec/fixtures.http/whoami/success.http +1 -1
  92. data/spec/spec_helper.rb +4 -4
  93. data/spec/support/webmock.rb +1 -1
  94. metadata +14 -12
  95. data/.github/CODEOWNERS +0 -1
  96. data/.github/workflows/auto-merge.yml +0 -32
  97. data/lib/dnsimple/client/domains_collaborators.rb +0 -87
  98. data/spec/dnsimple/client/domains_collaborators_spec.rb +0 -164
  99. data/spec/fixtures.http/addCollaborator/invite-success.http +0 -20
  100. data/spec/fixtures.http/addCollaborator/success.http +0 -20
  101. data/spec/fixtures.http/listCollaborators/success.http +0 -20
  102. data/spec/fixtures.http/notfound-collaborator.http +0 -15
  103. data/spec/fixtures.http/removeCollaborator/success.http +0 -17
  104. /data/spec/fixtures.http/{notfound-delegationsignerrecord.http → notfound-delegationSignerRecord.http} +0 -0
@@ -1,10 +1,10 @@
1
- HTTP/1.1 200
1
+ HTTP/1.1 200
2
2
  server: nginx
3
3
  date: Tue, 22 Aug 2023 11:13:58 GMT
4
4
  content-type: application/json; charset=utf-8
5
- x-ratelimit-limit: 2400
6
- x-ratelimit-remaining: 2392
7
- x-ratelimit-reset: 1692705338
5
+ X-RateLimit-Limit: 2400
6
+ X-RateLimit-Remaining: 2392
7
+ X-RateLimit-Reset: 1692705338
8
8
  x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs
9
9
  etag: W/"76c5d4c7579b754b94a42ac7fa37a901"
10
10
  cache-control: max-age=0, private, must-revalidate
@@ -12,4 +12,4 @@ x-request-id: e910cd08-3f9c-4da4-9986-50dbe9c3bc55
12
12
  x-runtime: 0.022006
13
13
  strict-transport-security: max-age=63072000
14
14
 
15
- {"data":{"id":101,"account_id":101,"domain_id":101,"contact_id":101,"state":"new","extended_attributes":{},"registry_owner_change":true,"irt_lock_lifted_by":null,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}}
15
+ {"data":{"id":101,"account_id":101,"domain_id":101,"contact_id":101,"state":"new","extended_attributes":{},"registry_owner_change":true,"irt_lock_lifted_by":null,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}}
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
17
17
  X-XSS-Protection: 1; mode=block
18
18
  Strict-Transport-Security: max-age=31536000
19
19
 
20
- {"data":{"tld":"com","tld_type":1,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"ds"}}
20
+ {"data":{"tld":"com","tld_type":1,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"ds","name_server_min":"2","name_server_max":"13"}}
@@ -1,16 +1,16 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx
3
- Date: Mon, 15 Feb 2016 17:06:09 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Connection: keep-alive
6
- Status: 200 OK
7
- X-RateLimit-Limit: 4000
8
- X-RateLimit-Remaining: 3992
9
- X-RateLimit-Reset: 1455559348
10
- ETag: W/"cbb707ff6fc185d71f5a8df3110f1379"
11
- Cache-Control: max-age=0, private, must-revalidate
12
- X-Request-Id: 0109ea48-b7f0-4f78-a970-6866653b83eb
13
- X-Runtime: 0.087618
14
- Strict-Transport-Security: max-age=31536000
15
-
16
- {"data":{"id":1,"url":"https://webhook.test"}}
1
+ HTTP/1.1 200 OK
2
+ Server: nginx
3
+ Date: Mon, 15 Feb 2016 17:06:09 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Connection: keep-alive
6
+ Status: 200 OK
7
+ X-RateLimit-Limit: 4000
8
+ X-RateLimit-Remaining: 3992
9
+ X-RateLimit-Reset: 1455559348
10
+ ETag: W/"cbb707ff6fc185d71f5a8df3110f1379"
11
+ Cache-Control: max-age=0, private, must-revalidate
12
+ X-Request-Id: 0109ea48-b7f0-4f78-a970-6866653b83eb
13
+ X-Runtime: 0.087618
14
+ Strict-Transport-Security: max-age=31536000
15
+
16
+ {"data":{"id":1,"url":"https://webhook.test","suppressed_at":null}}
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
17
17
  X-XSS-Protection: 1; mode=block
18
18
  Strict-Transport-Security: max-age=31536000
19
19
 
20
- {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","plan_identifier":"dnsimple-professional","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]}
20
+ {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","plan_identifier":"teams-v1-monthly","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]}
@@ -1,6 +1,5 @@
1
1
  HTTP/1.1 400 Bad Request
2
2
  Date: Tue, 24 Oct 2023 08:13:01 GMT
3
- Connection: close
4
3
  X-RateLimit-Limit: 2400
5
4
  X-RateLimit-Remaining: 2392
6
5
  X-RateLimit-Reset: 1698136677
@@ -9,6 +8,5 @@ X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs
9
8
  Cache-Control: no-cache
10
9
  X-Request-Id: bdfbf3a7-d9dc-4018-9732-61502be989a3
11
10
  X-Runtime: 0.455303
12
- Transfer-Encoding: chunked
13
11
 
14
12
  {"message":"Invalid date format must be ISO8601 (YYYY-MM-DD)"}
@@ -1,6 +1,5 @@
1
1
  HTTP/1.1 403 Forbidden
2
2
  Date: Tue, 24 Oct 2023 09:49:29 GMT
3
- Connection: close
4
3
  X-RateLimit-Limit: 2400
5
4
  X-RateLimit-Remaining: 2398
6
5
  X-RateLimit-Reset: 1698143967
@@ -9,6 +8,5 @@ X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs
9
8
  Cache-Control: no-cache
10
9
  X-Request-Id: 5554e2d3-2652-4ca7-8c5e-92b4c35f28d6
11
10
  X-Runtime: 0.035309
12
- Transfer-Encoding: chunked
13
11
 
14
12
  {"message":"Permission Denied. Required Scope: billing:*:read"}
@@ -1,6 +1,5 @@
1
1
  HTTP/1.1 200 OK
2
2
  Date: Tue, 24 Oct 2023 09:52:55 GMT
3
- Connection: close
4
3
  X-RateLimit-Limit: 2400
5
4
  X-RateLimit-Remaining: 2397
6
5
  X-RateLimit-Reset: 1698143967
@@ -9,6 +8,5 @@ X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs
9
8
  Cache-Control: no-store, must-revalidate, private, max-age=0
10
9
  X-Request-Id: a57a87c8-626a-4361-9fb8-b55ca9be8e5d
11
10
  X-Runtime: 0.060526
12
- Transfer-Encoding: chunked
13
11
 
14
12
  {"data":[{"invoiced_at":"2023-08-17T05:53:36Z","total_amount":"14.50","balance_amount":"0.00","reference":"1-2","state":"collected","items":[{"description":"Register bubble-registered.com","amount":"14.50","product_id":1,"product_type":"domain-registration","product_reference":"bubble-registered.com"}]},{"invoiced_at":"2023-08-17T05:57:53Z","total_amount":"14.50","balance_amount":"0.00","reference":"2-2","state":"refunded","items":[{"description":"Register example.com","amount":"14.50","product_id":2,"product_type":"domain-registration","product_reference":"example.com"}]},{"invoiced_at":"2023-10-24T07:49:05Z","total_amount":"1099999.99","balance_amount":"0.00","reference":"4-2","state":"collected","items":[{"description":"Test Line Item 1","amount":"99999.99","product_id":null,"product_type":"manual","product_reference":null},{"description":"Test Line Item 2","amount":"1000000.00","product_id":null,"product_type":"manual","product_reference":null}]}],"pagination":{"current_page":1,"per_page":30,"total_entries":3,"total_pages":1}}
@@ -13,4 +13,4 @@ X-Request-Id: e42df983-a8a5-4123-8c74-fb89ab934aba
13
13
  X-Runtime: 0.025456
14
14
  Strict-Transport-Security: max-age=63072000
15
15
 
16
- {"data":[{"id":24809,"domain_id":235146,"alias_email":"foo@a-domain.com","destination_email":"jane.smith@example.com","active":true,"created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":"foo@a-domain.com","to":"jane.smith@example.com"},{"id":24810,"domain_id":235146,"alias_email":"bar@a-domain.com","destination_email":"john.doe@example.com","active":false,"created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":"bar@a-domain.com","to":"john.doe@example.com"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
16
+ {"data":[{"id":24809,"domain_id":235146,"alias_email":".*@a-domain.com","destination_email":"jane.smith@example.com","created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":".*@a-domain.com","to":"jane.smith@example.com","active":true}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
@@ -1,10 +1,10 @@
1
- HTTP/1.1 200
1
+ HTTP/1.1 200
2
2
  server: nginx
3
3
  date: Tue, 22 Aug 2023 11:12:49 GMT
4
4
  content-type: application/json; charset=utf-8
5
- x-ratelimit-limit: 2400
6
- x-ratelimit-remaining: 2393
7
- x-ratelimit-reset: 1692705338
5
+ X-RateLimit-Limit: 2400
6
+ X-RateLimit-Remaining: 2393
7
+ X-RateLimit-Reset: 1692705338
8
8
  x-work-with-us: Love automation? So do we! https://dnsimple.com/jobs
9
9
  etag: W/"0049703ea058b06346df4c0e169eac29"
10
10
  cache-control: max-age=0, private, must-revalidate
@@ -12,4 +12,4 @@ x-request-id: fd0334ce-414a-4872-8889-e548e0b1410c
12
12
  x-runtime: 0.030759
13
13
  strict-transport-security: max-age=63072000
14
14
 
15
- {"data":[{"id":101,"account_id":101,"domain_id":101,"contact_id":101,"state":"new","extended_attributes":{},"registry_owner_change":true,"irt_lock_lifted_by":null,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
15
+ {"data":[{"id":101,"account_id":101,"domain_id":101,"contact_id":101,"state":"new","extended_attributes":{},"registry_owner_change":true,"irt_lock_lifted_by":null,"created_at":"2017-02-03T17:43:22Z","updated_at":"2017-02-03T17:43:22Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
17
17
  X-XSS-Protection: 1; mode=block
18
18
  Strict-Transport-Security: max-age=31536000
19
19
 
20
- {"data":[{"tld":"ac","tld_type":2,"whois_privacy":false,"auto_renew_only":true,"idn":false,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":false,"dnssec_interface_type":"ds"},{"tld":"academy","tld_type":3,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"key"}],"pagination":{"current_page":1,"per_page":2,"total_entries":195,"total_pages":98}}
20
+ {"data":[{"tld":"ac","tld_type":2,"whois_privacy":false,"auto_renew_only":true,"idn":false,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":false,"dnssec_interface_type":"ds","name_server_min":"2","name_server_max":"13"},{"tld":"academy","tld_type":3,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"key","name_server_min":"2","name_server_max":"13"}],"pagination":{"current_page":1,"per_page":2,"total_entries":195,"total_pages":98}}
@@ -1,16 +1,16 @@
1
- HTTP/1.1 200 OK
2
- Server: nginx
3
- Date: Mon, 15 Feb 2016 17:06:21 GMT
4
- Content-Type: application/json; charset=utf-8
5
- Connection: keep-alive
6
- Status: 200 OK
7
- X-RateLimit-Limit: 4000
8
- X-RateLimit-Remaining: 3991
9
- X-RateLimit-Reset: 1455559348
10
- ETag: W/"01f1ea26e8e06d8d969bf06678bf7d12"
11
- Cache-Control: max-age=0, private, must-revalidate
12
- X-Request-Id: bc611cd0-d1a9-48d0-b450-c9c86f0d0dcf
13
- X-Runtime: 0.104174
14
- Strict-Transport-Security: max-age=31536000
15
-
16
- {"data":[{"id":1,"url":"https://webhook.test"},{"id":2,"url":"https://another.test"}]}
1
+ HTTP/1.1 200 OK
2
+ Server: nginx
3
+ Date: Mon, 15 Feb 2016 17:06:21 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Connection: keep-alive
6
+ Status: 200 OK
7
+ X-RateLimit-Limit: 4000
8
+ X-RateLimit-Remaining: 3991
9
+ X-RateLimit-Reset: 1455559348
10
+ ETag: W/"01f1ea26e8e06d8d969bf06678bf7d12"
11
+ Cache-Control: max-age=0, private, must-revalidate
12
+ X-Request-Id: bc611cd0-d1a9-48d0-b450-c9c86f0d0dcf
13
+ X-Runtime: 0.104174
14
+ Strict-Transport-Security: max-age=31536000
15
+
16
+ {"data":[{"id":1,"url":"https://webhook.test","suppressed_at":null},{"id":2,"url":"https://another.test","suppressed_at":null}]}
@@ -0,0 +1,18 @@
1
+ HTTP/1.1 400 Bad Request
2
+ Server: nginx
3
+ Date: Wed, 23 Nov 2016 08:12:57 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Connection: keep-alive
6
+ X-RateLimit-Limit: 2400
7
+ X-RateLimit-Remaining: 2396
8
+ X-RateLimit-Reset: 1479892333
9
+ Cache-Control: no-cache
10
+ X-Request-Id: 91dcf81b-5df4-4d45-b37e-446f0c422a27
11
+ X-Runtime: 0.062556
12
+ X-Content-Type-Options: nosniff
13
+ X-Download-Options: noopen
14
+ X-Frame-Options: DENY
15
+ X-Permitted-Cross-Domain-Policies: none
16
+ X-XSS-Protection: 1; mode=block
17
+
18
+ {"message":"Invalid extended attributes","errors":{"x-accept-ssl-requirement": "it's required", "x-id-number": "invalid number"}}
@@ -1,20 +1,22 @@
1
1
  HTTP/1.1 201 Created
2
2
  Server: nginx
3
- Date: Fri, 09 Dec 2016 19:46:57 GMT
4
- Content-Type: application/json; charset=utf-8
3
+ Date: Sun, 18 Feb 2024 10:46:17 GMT
4
+ Content-Type: application/json
5
+ Content-Length: 120
5
6
  Connection: keep-alive
6
7
  X-RateLimit-Limit: 2400
7
- X-RateLimit-Remaining: 2394
8
- X-RateLimit-Reset: 1481315245
9
- ETag: W/"179d85ea8a26a3d5dc76e42de2d7918e"
10
- Cache-Control: max-age=0, private, must-revalidate
11
- X-Request-Id: ba6f2707-5df0-4ffa-b91b-51d4460bab8e
12
- X-Runtime: 13.571302
8
+ X-RateLimit-Remaining: 2398
9
+ X-RateLimit-Reset: 1547125899
10
+ X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs
11
+ Cache-Control: no-cache
12
+ X-Request-Id: 3bf33ae7-22f2-473c-8e39-8738d2bcce89
13
+ X-Runtime: 0.006332
14
+ X-Frame-Options: DENY
13
15
  X-Content-Type-Options: nosniff
16
+ X-XSS-Protection: 1; mode=block
14
17
  X-Download-Options: noopen
15
- X-Frame-Options: DENY
16
18
  X-Permitted-Cross-Domain-Policies: none
17
- X-XSS-Protection: 1; mode=block
18
- Strict-Transport-Security: max-age=31536000
19
+ Content-Security-Policy: frame-ancestors 'none'
20
+ Strict-Transport-Security: max-age=63072000
19
21
 
20
- {"data":{"id":1,"domain_id":999,"state":"new","created_at":"2016-12-09T19:46:45Z","updated_at":"2016-12-09T19:46:45Z"}}
22
+ {"data":{"id":43,"domain_id":214,"state":"new","created_at":"2024-02-14T14:40:42Z","updated_at":"2024-02-14T14:40:42Z"}}
@@ -0,0 +1,16 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx
3
+ Date: Wed, 23 Nov 2022 18:05:39 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Connection: keep-alive
6
+ Status: 200 OK
7
+ X-RateLimit-Limit: 2400
8
+ X-RateLimit-Remaining: 2391
9
+ X-RateLimit-Reset: 1458821048
10
+ ETag: W/"cb540984f806b12ac437cc1f76092f90"
11
+ Cache-Control: max-age=0, private, must-revalidate
12
+ X-Request-Id: e53ac7b5-0d26-45bc-9226-09c2d34be293
13
+ X-Runtime: 0.192986
14
+ Strict-Transport-Security: max-age=31536000
15
+
16
+ {"data":[{"id":1927,"zone_id":"example.com","parent_id":null,"name":"","content":"ns1.example.com","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2022-11-23T18:05:39Z","updated_at":"2022-11-23T18:05:39Z"},{"id":1928,"zone_id":"example.com","parent_id":null,"name":"","content":"ns2.example.com","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2022-11-23T18:05:39Z","updated_at":"2022-11-23T18:05:39Z"},{"id":1929,"zone_id":"example.com","parent_id":null,"name":"","content":"ns1.foo.bar","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2022-11-23T18:05:39Z","updated_at":"2022-11-23T18:05:39Z"},{"id":1930,"zone_id":"example.com","parent_id":null,"name":"","content":"ns2.foo.bar","ttl":3600,"priority":null,"type":"NS","regions":["global"],"system_record":true,"created_at":"2022-11-23T18:05:39Z","updated_at":"2022-11-23T18:05:39Z"}]}
@@ -12,4 +12,4 @@ X-Request-Id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd
12
12
  X-Runtime: 0.141588
13
13
  Strict-Transport-Security: max-age=31536000
14
14
 
15
- {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"dnsimple-professional","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
15
+ {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"teams-v1-monthly","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
@@ -12,4 +12,4 @@ X-Request-Id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd
12
12
  X-Runtime: 0.141588
13
13
  Strict-Transport-Security: max-age=31536000
14
14
 
15
- {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"dnsimple-professional","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
15
+ {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"teams-v1-monthly","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
data/spec/spec_helper.rb CHANGED
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rspec'
3
+ require "rspec"
4
4
 
5
- if ENV['COVERALL']
6
- require 'coveralls'
5
+ if ENV["COVERALL"]
6
+ require "coveralls"
7
7
  Coveralls.wear!
8
8
  end
9
9
 
10
10
  $:.unshift("#{File.dirname(__FILE__)}/lib")
11
- require 'dnsimple'
11
+ require "dnsimple"
12
12
 
13
13
  unless defined?(SPEC_ROOT)
14
14
  SPEC_ROOT = File.expand_path(__dir__)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'webmock/rspec'
3
+ require "webmock/rspec"
4
4
 
5
5
  RSpec.configure do |config|
6
6
  config.before(:suite) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0
4
+ version: 11.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DNSimple
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-02 00:00:00.000000000 Z
11
+ date: 2025-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -88,11 +88,10 @@ extensions: []
88
88
  extra_rdoc_files:
89
89
  - LICENSE.txt
90
90
  files:
91
- - ".github/CODEOWNERS"
92
91
  - ".github/dependabot.yml"
93
- - ".github/workflows/auto-merge.yml"
94
92
  - ".github/workflows/ci.yml"
95
93
  - ".github/workflows/release.yml"
94
+ - ".github/workflows/sync-test-fixtures.yml"
96
95
  - ".gitignore"
97
96
  - ".markdownlint.yaml"
98
97
  - ".rspec"
@@ -116,7 +115,6 @@ files:
116
115
  - lib/dnsimple/client/contacts.rb
117
116
  - lib/dnsimple/client/dns_analytics.rb
118
117
  - lib/dnsimple/client/domains.rb
119
- - lib/dnsimple/client/domains_collaborators.rb
120
118
  - lib/dnsimple/client/domains_delegation_signer_records.rb
121
119
  - lib/dnsimple/client/domains_dnssec.rb
122
120
  - lib/dnsimple/client/domains_email_forwards.rb
@@ -186,6 +184,8 @@ files:
186
184
  - lib/dnsimple/struct/zone_distribution.rb
187
185
  - lib/dnsimple/struct/zone_file.rb
188
186
  - lib/dnsimple/struct/zone_record.rb
187
+ - lib/dnsimple/struct/zone_record_id.rb
188
+ - lib/dnsimple/struct/zone_records_batch_change.rb
189
189
  - lib/dnsimple/version.rb
190
190
  - spec/dnsimple/client/accounts_spec.rb
191
191
  - spec/dnsimple/client/billing_spec.rb
@@ -193,7 +193,6 @@ files:
193
193
  - spec/dnsimple/client/client_service_spec.rb
194
194
  - spec/dnsimple/client/contacts_spec.rb
195
195
  - spec/dnsimple/client/dns_analytics_spec.rb
196
- - spec/dnsimple/client/domains_collaborators_spec.rb
197
196
  - spec/dnsimple/client/domains_delegation_signer_records_spec.rb
198
197
  - spec/dnsimple/client/domains_dnssec_spec.rb
199
198
  - spec/dnsimple/client/domains_email_forwards_spec.rb
@@ -225,13 +224,15 @@ files:
225
224
  - spec/fixtures.http/accounts/success-account.http
226
225
  - spec/fixtures.http/accounts/success-user.http
227
226
  - spec/fixtures.http/activateZoneService/success.http
228
- - spec/fixtures.http/addCollaborator/invite-success.http
229
- - spec/fixtures.http/addCollaborator/success.http
230
227
  - spec/fixtures.http/appliedServices/success.http
231
228
  - spec/fixtures.http/applyService/success.http
232
229
  - spec/fixtures.http/applyTemplate/success.http
233
230
  - spec/fixtures.http/authorizeDomainTransferOut/success.http
234
231
  - spec/fixtures.http/badgateway.http
232
+ - spec/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http
233
+ - spec/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http
234
+ - spec/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http
235
+ - spec/fixtures.http/batchChangeZoneRecords/success.http
235
236
  - spec/fixtures.http/cancelDomainTransfer/success.http
236
237
  - spec/fixtures.http/changeDomainDelegation/success.http
237
238
  - spec/fixtures.http/changeDomainDelegationFromVanity/success.http
@@ -250,6 +251,7 @@ files:
250
251
  - spec/fixtures.http/checkZoneRecordDistribution/failure.http
251
252
  - spec/fixtures.http/checkZoneRecordDistribution/success.http
252
253
  - spec/fixtures.http/createContact/created.http
254
+ - spec/fixtures.http/createContact/error-validation-errors.http
253
255
  - spec/fixtures.http/createDelegationSignerRecord/created.http
254
256
  - spec/fixtures.http/createDelegationSignerRecord/validation-error.http
255
257
  - spec/fixtures.http/createDomain/created.http
@@ -269,6 +271,7 @@ files:
269
271
  - spec/fixtures.http/deleteDomain/success.http
270
272
  - spec/fixtures.http/deleteEmailForward/success.http
271
273
  - spec/fixtures.http/deleteRegistrantChange/success.http
274
+ - spec/fixtures.http/deleteRegistrantChange/success_async.http
272
275
  - spec/fixtures.http/deleteTemplate/success.http
273
276
  - spec/fixtures.http/deleteTemplateRecord/success.http
274
277
  - spec/fixtures.http/deleteWebhook/success.http
@@ -329,7 +332,6 @@ files:
329
332
  - spec/fixtures.http/listCharges/fail-400-bad-filter.http
330
333
  - spec/fixtures.http/listCharges/fail-403.http
331
334
  - spec/fixtures.http/listCharges/success.http
332
- - spec/fixtures.http/listCollaborators/success.http
333
335
  - spec/fixtures.http/listContacts/success.http
334
336
  - spec/fixtures.http/listDelegationSignerRecords/success.http
335
337
  - spec/fixtures.http/listDomains/success.http
@@ -346,9 +348,8 @@ files:
346
348
  - spec/fixtures.http/listZones/success.http
347
349
  - spec/fixtures.http/method-not-allowed.http
348
350
  - spec/fixtures.http/notfound-certificate.http
349
- - spec/fixtures.http/notfound-collaborator.http
350
351
  - spec/fixtures.http/notfound-contact.http
351
- - spec/fixtures.http/notfound-delegationsignerrecord.http
352
+ - spec/fixtures.http/notfound-delegationSignerRecord.http
352
353
  - spec/fixtures.http/notfound-domain.http
353
354
  - spec/fixtures.http/notfound-domainpush.http
354
355
  - spec/fixtures.http/notfound-emailforward.http
@@ -364,9 +365,9 @@ files:
364
365
  - spec/fixtures.http/pages-3of3.http
365
366
  - spec/fixtures.http/purchaseLetsencryptCertificate/success.http
366
367
  - spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http
368
+ - spec/fixtures.http/registerDomain/error-extended-attributes.http
367
369
  - spec/fixtures.http/registerDomain/success.http
368
370
  - spec/fixtures.http/rejectPush/success.http
369
- - spec/fixtures.http/removeCollaborator/success.http
370
371
  - spec/fixtures.http/renewDomain/error-tooearly.http
371
372
  - spec/fixtures.http/renewDomain/success.http
372
373
  - spec/fixtures.http/renewWhoisPrivacy/success.http
@@ -382,6 +383,7 @@ files:
382
383
  - spec/fixtures.http/unlinkPrimaryServer/success.http
383
384
  - spec/fixtures.http/updateContact/success.http
384
385
  - spec/fixtures.http/updateTemplate/success.http
386
+ - spec/fixtures.http/updateZoneNsRecords/success.http
385
387
  - spec/fixtures.http/updateZoneRecord/success.http
386
388
  - spec/fixtures.http/validation-error.http
387
389
  - spec/fixtures.http/whoami/success-account.http
data/.github/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * @dnsimple/external-integrations
@@ -1,32 +0,0 @@
1
- name: Auto-merge
2
-
3
- on:
4
- pull_request:
5
- types:
6
- - labeled
7
- - synchronize
8
- - opened
9
-
10
- jobs:
11
- auto-merge:
12
- name: 'Auto-merge'
13
- runs-on: ubuntu-latest
14
- permissions: write-all
15
-
16
- if: github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'automerge')
17
- steps:
18
- - name: Wait for tests to succeed
19
- uses: lewagon/wait-on-check-action@v1.3.4
20
- timeout-minutes: 15
21
- with:
22
- ref: ${{ github.ref }}
23
- running-workflow-name: 'Auto-merge'
24
- repo-token: ${{ secrets.GITHUB_TOKEN }}
25
- wait-interval: 10
26
- allowed-conclusions: success
27
- - uses: juliangruber/merge-pull-request-action@v1
28
- with:
29
- github-token: "${{ secrets.GITHUB_TOKEN }}"
30
- number: ${{ github.event.number }}
31
- method: squash
32
- repo: dnsimple/dnsimple-ruby
@@ -1,87 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dnsimple
4
- class Client
5
- module DomainsCollaborators
6
-
7
- # Lists the collaborators for a domain.
8
- #
9
- # @see https://developer.dnsimple.com/v2/domains/collaborators/#list
10
- #
11
- # @example List collaborators in the first page
12
- # client.domains.collaborators(1010, "example.com")
13
- #
14
- # @example List collaborators, provide a specific page
15
- # client.domains.collaborators(1010, "example.com", page: 2)
16
- #
17
- # @param [Integer] account_id the account ID
18
- # @param [#to_s] domain_id the domain ID or name
19
- # @param [Hash] options request options
20
- # @option options [Integer] :page current page (pagination)
21
- # @option options [Integer] :per_page number of entries to return (pagination)
22
- # @return [Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>]
23
- # @deprecated `DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
24
- #
25
- # @raise [Dnsimple::RequestError]
26
- def collaborators(account_id, domain_id, options = {})
27
- Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.')
28
-
29
- response = client.get(Client.versioned("/%s/domains/%s/collaborators" % [account_id, domain_id]), Options::ListOptions.new(options))
30
-
31
- Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Collaborator.new(r) })
32
- end
33
-
34
- # Add a collaborator to the domain.
35
- #
36
- # @see https://developer.dnsimple.com/v2/domains/collaborators/#add
37
- #
38
- # @example Add collaborator
39
- # client.domains.add_collaborator(1010, "example.com", email: "user@example.com")
40
- #
41
- # @param [Integer] account_id the account ID
42
- # @param [#to_s] domain_id the domain ID or name
43
- # @param [Hash] attributes user attributes
44
- # @option attributes [String] :email user email (mandatory)
45
- # @param [Hash] options request options
46
- # @return [Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>]
47
- # @deprecated `DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
48
- #
49
- # @raise [Dnsimple::RequestError]
50
- def add_collaborator(account_id, domain_id, attributes, options = {})
51
- Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.')
52
-
53
- Extra.validate_mandatory_attributes(attributes, [:email])
54
- response = client.post(Client.versioned("/%s/domains/%s/collaborators" % [account_id, domain_id]), attributes, options)
55
-
56
- Dnsimple::Response.new(response, Struct::Collaborator.new(response["data"]))
57
- end
58
-
59
- # Removes a collaborator from the domain.
60
- #
61
- # WARNING: this cannot be undone.
62
- #
63
- # @see https://developer.dnsimple.com/v2/domains/collaborators/#remove
64
- #
65
- # @example Remove collaborator
66
- # client.domains.remove_collaborator(1010, "example.com", 999)
67
- #
68
- # @param [Integer] account_id the account ID
69
- # @param [#to_s] domain_id the domain ID or name
70
- # @param [#to_s] contact_id the contact ID
71
- # @param [Hash] options request options
72
- # @return [Dnsimple::Response<nil>]
73
- #
74
- # @deprecated `DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
75
- # @raise [Dnsimple::NotFoundError]
76
- # @raise [Dnsimple::RequestError]
77
- def remove_collaborator(account_id, domain_id, contact_id, options = {})
78
- Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.')
79
-
80
- response = client.delete(Client.versioned("/%s/domains/%s/collaborators/%s" % [account_id, domain_id, contact_id]), options)
81
-
82
- Dnsimple::Response.new(response, nil)
83
- end
84
-
85
- end
86
- end
87
- end