dnsimple 12.1.0 → 12.2.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 (253) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -3
  3. data/.github/workflows/release.yml +14 -41
  4. data/.github/workflows/sync-test-fixtures.yml +17 -38
  5. data/.rubocop.yml +1 -1
  6. data/.rubocop_todo.yml +3 -41
  7. data/CHANGELOG.md +13 -1
  8. data/Gemfile +1 -1
  9. data/Rakefile +5 -3
  10. data/dnsimple.gemspec +2 -1
  11. data/lib/dnsimple/struct/domain.rb +3 -0
  12. data/lib/dnsimple/struct/domain_price.rb +3 -0
  13. data/lib/dnsimple/struct/domain_registration.rb +3 -0
  14. data/lib/dnsimple/struct/tld.rb +6 -0
  15. data/lib/dnsimple/version.rb +1 -1
  16. data/test/dnsimple/client/accounts_test.rb +33 -0
  17. data/test/dnsimple/client/billing_test.rb +106 -0
  18. data/test/dnsimple/client/certificates_test.rb +506 -0
  19. data/test/dnsimple/client/client_service_test.rb +32 -0
  20. data/test/dnsimple/client/contacts_test.rb +231 -0
  21. data/test/dnsimple/client/dns_analytics_test.rb +102 -0
  22. data/test/dnsimple/client/domains_delegation_signer_records_test.rb +213 -0
  23. data/test/dnsimple/client/domains_dnssec_test.rb +109 -0
  24. data/test/dnsimple/client/domains_email_forwards_test.rb +209 -0
  25. data/test/dnsimple/client/domains_pushes_test.rb +180 -0
  26. data/test/dnsimple/client/domains_research_test.rb +40 -0
  27. data/test/dnsimple/client/domains_test.rb +222 -0
  28. data/test/dnsimple/client/identity_test.rb +52 -0
  29. data/test/dnsimple/client/oauth_test.rb +71 -0
  30. data/test/dnsimple/client/registrar_auto_renewal_test.rb +77 -0
  31. data/test/dnsimple/client/registrar_delegation_test.rb +109 -0
  32. data/test/dnsimple/client/registrar_test.rb +622 -0
  33. data/test/dnsimple/client/registrar_transfer_lock_test.rb +113 -0
  34. data/test/dnsimple/client/registrar_whois_privacy_test.rb +92 -0
  35. data/test/dnsimple/client/services_domains_test.rb +119 -0
  36. data/test/dnsimple/client/services_test.rb +126 -0
  37. data/test/dnsimple/client/templates_domains_test.rb +32 -0
  38. data/test/dnsimple/client/templates_records_test.rb +239 -0
  39. data/test/dnsimple/client/templates_test.rb +224 -0
  40. data/test/dnsimple/client/tlds_test.rb +184 -0
  41. data/test/dnsimple/client/vanity_name_servers_test.rb +58 -0
  42. data/test/dnsimple/client/webhooks_test.rb +149 -0
  43. data/test/dnsimple/client/zones_distributions_test.rb +136 -0
  44. data/test/dnsimple/client/zones_records_test.rb +403 -0
  45. data/test/dnsimple/client/zones_test.rb +271 -0
  46. data/test/dnsimple/client_test.rb +210 -0
  47. data/test/dnsimple/extra_test.rb +38 -0
  48. data/test/dnsimple/options/base_test.rb +23 -0
  49. data/test/dnsimple/options/list_options_test.rb +95 -0
  50. data/{spec → test}/fixtures.http/checkDomain/success.http +1 -1
  51. data/{spec → test}/fixtures.http/getDomain/success.http +1 -1
  52. data/{spec → test}/fixtures.http/getDomainPrices/success.http +1 -1
  53. data/{spec → test}/fixtures.http/getDomainRegistration/success.http +1 -1
  54. data/{spec → test}/fixtures.http/getTld/success.http +1 -1
  55. data/{spec → test}/fixtures.http/listTlds/success.http +1 -1
  56. data/{spec → test}/fixtures.http/registerDomain/success.http +1 -1
  57. data/test/test_helper.rb +35 -0
  58. metadata +216 -205
  59. data/.rspec +0 -1
  60. data/spec/dnsimple/client/accounts_spec.rb +0 -33
  61. data/spec/dnsimple/client/billing_spec.rb +0 -101
  62. data/spec/dnsimple/client/certificates_spec.rb +0 -452
  63. data/spec/dnsimple/client/client_service_spec.rb +0 -41
  64. data/spec/dnsimple/client/contacts_spec.rb +0 -228
  65. data/spec/dnsimple/client/dns_analytics_spec.rb +0 -84
  66. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +0 -212
  67. data/spec/dnsimple/client/domains_dnssec_spec.rb +0 -124
  68. data/spec/dnsimple/client/domains_email_forwards_spec.rb +0 -210
  69. data/spec/dnsimple/client/domains_pushes_spec.rb +0 -164
  70. data/spec/dnsimple/client/domains_research_spec.rb +0 -38
  71. data/spec/dnsimple/client/domains_spec.rb +0 -206
  72. data/spec/dnsimple/client/identity_spec.rb +0 -58
  73. data/spec/dnsimple/client/oauth_spec.rb +0 -82
  74. data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +0 -82
  75. data/spec/dnsimple/client/registrar_delegation_spec.rb +0 -109
  76. data/spec/dnsimple/client/registrar_spec.rb +0 -627
  77. data/spec/dnsimple/client/registrar_transfer_lock_spec.rb +0 -118
  78. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +0 -94
  79. data/spec/dnsimple/client/services_domains_spec.rb +0 -115
  80. data/spec/dnsimple/client/services_spec.rb +0 -111
  81. data/spec/dnsimple/client/templates_domains_spec.rb +0 -34
  82. data/spec/dnsimple/client/templates_records_spec.rb +0 -228
  83. data/spec/dnsimple/client/templates_spec.rb +0 -218
  84. data/spec/dnsimple/client/tlds_spec.rb +0 -163
  85. data/spec/dnsimple/client/vanity_name_servers_spec.rb +0 -56
  86. data/spec/dnsimple/client/webhooks_spec.rb +0 -150
  87. data/spec/dnsimple/client/zones_distributions_spec.rb +0 -137
  88. data/spec/dnsimple/client/zones_records_spec.rb +0 -414
  89. data/spec/dnsimple/client/zones_spec.rb +0 -261
  90. data/spec/dnsimple/client_spec.rb +0 -225
  91. data/spec/dnsimple/extra_spec.rb +0 -48
  92. data/spec/dnsimple/options/base_spec.rb +0 -24
  93. data/spec/dnsimple/options/list_options_spec.rb +0 -102
  94. data/spec/spec_helper.rb +0 -17
  95. data/spec/support/helpers.rb +0 -15
  96. data/spec/support/webmock.rb +0 -13
  97. /data/{spec → test}/fixtures.http/acceptPush/success.http +0 -0
  98. /data/{spec → test}/fixtures.http/accounts/success-account.http +0 -0
  99. /data/{spec → test}/fixtures.http/accounts/success-user.http +0 -0
  100. /data/{spec → test}/fixtures.http/activateZoneService/success.http +0 -0
  101. /data/{spec → test}/fixtures.http/appliedServices/success.http +0 -0
  102. /data/{spec → test}/fixtures.http/applyService/success.http +0 -0
  103. /data/{spec → test}/fixtures.http/applyTemplate/success.http +0 -0
  104. /data/{spec → test}/fixtures.http/authorizeDomainTransferOut/success.http +0 -0
  105. /data/{spec → test}/fixtures.http/badgateway.http +0 -0
  106. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +0 -0
  107. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +0 -0
  108. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +0 -0
  109. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/success.http +0 -0
  110. /data/{spec → test}/fixtures.http/cancelDomainTransfer/success.http +0 -0
  111. /data/{spec → test}/fixtures.http/changeDomainDelegation/success.http +0 -0
  112. /data/{spec → test}/fixtures.http/changeDomainDelegationFromVanity/success.http +0 -0
  113. /data/{spec → test}/fixtures.http/changeDomainDelegationToVanity/success.http +0 -0
  114. /data/{spec → test}/fixtures.http/checkRegistrantChange/error-contactnotfound.http +0 -0
  115. /data/{spec → test}/fixtures.http/checkRegistrantChange/error-domainnotfound.http +0 -0
  116. /data/{spec → test}/fixtures.http/checkRegistrantChange/success.http +0 -0
  117. /data/{spec → test}/fixtures.http/checkZoneDistribution/error.http +0 -0
  118. /data/{spec → test}/fixtures.http/checkZoneDistribution/failure.http +0 -0
  119. /data/{spec → test}/fixtures.http/checkZoneDistribution/success.http +0 -0
  120. /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/error.http +0 -0
  121. /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/failure.http +0 -0
  122. /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/success.http +0 -0
  123. /data/{spec → test}/fixtures.http/createContact/created.http +0 -0
  124. /data/{spec → test}/fixtures.http/createContact/error-validation-errors.http +0 -0
  125. /data/{spec → test}/fixtures.http/createDelegationSignerRecord/created.http +0 -0
  126. /data/{spec → test}/fixtures.http/createDelegationSignerRecord/validation-error.http +0 -0
  127. /data/{spec → test}/fixtures.http/createDomain/created.http +0 -0
  128. /data/{spec → test}/fixtures.http/createEmailForward/created.http +0 -0
  129. /data/{spec → test}/fixtures.http/createPrimaryServer/created.http +0 -0
  130. /data/{spec → test}/fixtures.http/createRegistrantChange/success.http +0 -0
  131. /data/{spec → test}/fixtures.http/createSecondaryZone/created.http +0 -0
  132. /data/{spec → test}/fixtures.http/createTemplate/created.http +0 -0
  133. /data/{spec → test}/fixtures.http/createTemplateRecord/created.http +0 -0
  134. /data/{spec → test}/fixtures.http/createWebhook/created.http +0 -0
  135. /data/{spec → test}/fixtures.http/createZoneRecord/created-apex.http +0 -0
  136. /data/{spec → test}/fixtures.http/createZoneRecord/created.http +0 -0
  137. /data/{spec → test}/fixtures.http/deactivateZoneService/success.http +0 -0
  138. /data/{spec → test}/fixtures.http/deleteContact/error-contact-in-use.http +0 -0
  139. /data/{spec → test}/fixtures.http/deleteContact/success.http +0 -0
  140. /data/{spec → test}/fixtures.http/deleteDelegationSignerRecord/success.http +0 -0
  141. /data/{spec → test}/fixtures.http/deleteDomain/success.http +0 -0
  142. /data/{spec → test}/fixtures.http/deleteEmailForward/success.http +0 -0
  143. /data/{spec → test}/fixtures.http/deleteRegistrantChange/success.http +0 -0
  144. /data/{spec → test}/fixtures.http/deleteRegistrantChange/success_async.http +0 -0
  145. /data/{spec → test}/fixtures.http/deleteTemplate/success.http +0 -0
  146. /data/{spec → test}/fixtures.http/deleteTemplateRecord/success.http +0 -0
  147. /data/{spec → test}/fixtures.http/deleteWebhook/success.http +0 -0
  148. /data/{spec → test}/fixtures.http/deleteZoneRecord/success.http +0 -0
  149. /data/{spec → test}/fixtures.http/disableDnssec/not-enabled.http +0 -0
  150. /data/{spec → test}/fixtures.http/disableDnssec/success.http +0 -0
  151. /data/{spec → test}/fixtures.http/disableDomainAutoRenewal/success.http +0 -0
  152. /data/{spec → test}/fixtures.http/disableDomainTransferLock/success.http +0 -0
  153. /data/{spec → test}/fixtures.http/disableVanityNameServers/success.http +0 -0
  154. /data/{spec → test}/fixtures.http/disableWhoisPrivacy/success.http +0 -0
  155. /data/{spec → test}/fixtures.http/dnsAnalytics/success.http +0 -0
  156. /data/{spec → test}/fixtures.http/downloadCertificate/success.http +0 -0
  157. /data/{spec → test}/fixtures.http/enableDnssec/success.http +0 -0
  158. /data/{spec → test}/fixtures.http/enableDomainAutoRenewal/success.http +0 -0
  159. /data/{spec → test}/fixtures.http/enableDomainTransferLock/success.http +0 -0
  160. /data/{spec → test}/fixtures.http/enableVanityNameServers/success.http +0 -0
  161. /data/{spec → test}/fixtures.http/enableWhoisPrivacy/created.http +0 -0
  162. /data/{spec → test}/fixtures.http/enableWhoisPrivacy/success.http +0 -0
  163. /data/{spec → test}/fixtures.http/getCertificate/success.http +0 -0
  164. /data/{spec → test}/fixtures.http/getCertificatePrivateKey/success.http +0 -0
  165. /data/{spec → test}/fixtures.http/getContact/success.http +0 -0
  166. /data/{spec → test}/fixtures.http/getDelegationSignerRecord/success.http +0 -0
  167. /data/{spec → test}/fixtures.http/getDnssec/success.http +0 -0
  168. /data/{spec → test}/fixtures.http/getDomainDelegation/success-empty.http +0 -0
  169. /data/{spec → test}/fixtures.http/getDomainDelegation/success.http +0 -0
  170. /data/{spec → test}/fixtures.http/getDomainPrices/failure.http +0 -0
  171. /data/{spec → test}/fixtures.http/getDomainRenewal/success.http +0 -0
  172. /data/{spec → test}/fixtures.http/getDomainRestore/success.http +0 -0
  173. /data/{spec → test}/fixtures.http/getDomainTransfer/success.http +0 -0
  174. /data/{spec → test}/fixtures.http/getDomainTransferLock/success.http +0 -0
  175. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/error-validation.http +0 -0
  176. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-available.http +0 -0
  177. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-unavailable.http +0 -0
  178. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-unsupported-tld.http +0 -0
  179. /data/{spec → test}/fixtures.http/getEmailForward/success.http +0 -0
  180. /data/{spec → test}/fixtures.http/getPrimaryServer/success.http +0 -0
  181. /data/{spec → test}/fixtures.http/getRegistrantChange/success.http +0 -0
  182. /data/{spec → test}/fixtures.http/getService/success.http +0 -0
  183. /data/{spec → test}/fixtures.http/getTemplate/success.http +0 -0
  184. /data/{spec → test}/fixtures.http/getTemplateRecord/success.http +0 -0
  185. /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success-attributes.http +0 -0
  186. /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success-noattributes.http +0 -0
  187. /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success.http +0 -0
  188. /data/{spec → test}/fixtures.http/getWebhook/success.http +0 -0
  189. /data/{spec → test}/fixtures.http/getZone/success.http +0 -0
  190. /data/{spec → test}/fixtures.http/getZoneFile/success.http +0 -0
  191. /data/{spec → test}/fixtures.http/getZoneRecord/success.http +0 -0
  192. /data/{spec → test}/fixtures.http/initiatePush/success.http +0 -0
  193. /data/{spec → test}/fixtures.http/issueLetsencryptCertificate/success.http +0 -0
  194. /data/{spec → test}/fixtures.http/issueRenewalLetsencryptCertificate/success.http +0 -0
  195. /data/{spec → test}/fixtures.http/linkPrimaryServer/success.http +0 -0
  196. /data/{spec → test}/fixtures.http/listAccounts/success-account.http +0 -0
  197. /data/{spec → test}/fixtures.http/listAccounts/success-user.http +0 -0
  198. /data/{spec → test}/fixtures.http/listCertificates/success.http +0 -0
  199. /data/{spec → test}/fixtures.http/listCharges/fail-400-bad-filter.http +0 -0
  200. /data/{spec → test}/fixtures.http/listCharges/fail-403.http +0 -0
  201. /data/{spec → test}/fixtures.http/listCharges/success.http +0 -0
  202. /data/{spec → test}/fixtures.http/listContacts/success.http +0 -0
  203. /data/{spec → test}/fixtures.http/listDelegationSignerRecords/success.http +0 -0
  204. /data/{spec → test}/fixtures.http/listDomains/success.http +0 -0
  205. /data/{spec → test}/fixtures.http/listEmailForwards/success.http +0 -0
  206. /data/{spec → test}/fixtures.http/listPrimaryServers/success.http +0 -0
  207. /data/{spec → test}/fixtures.http/listPushes/success.http +0 -0
  208. /data/{spec → test}/fixtures.http/listRegistrantChanges/success.http +0 -0
  209. /data/{spec → test}/fixtures.http/listServices/success.http +0 -0
  210. /data/{spec → test}/fixtures.http/listTemplateRecords/success.http +0 -0
  211. /data/{spec → test}/fixtures.http/listTemplates/success.http +0 -0
  212. /data/{spec → test}/fixtures.http/listWebhooks/success.http +0 -0
  213. /data/{spec → test}/fixtures.http/listZoneRecords/success.http +0 -0
  214. /data/{spec → test}/fixtures.http/listZones/success.http +0 -0
  215. /data/{spec → test}/fixtures.http/method-not-allowed.http +0 -0
  216. /data/{spec → test}/fixtures.http/notfound-certificate.http +0 -0
  217. /data/{spec → test}/fixtures.http/notfound-contact.http +0 -0
  218. /data/{spec → test}/fixtures.http/notfound-delegationSignerRecord.http +0 -0
  219. /data/{spec → test}/fixtures.http/notfound-domain.http +0 -0
  220. /data/{spec → test}/fixtures.http/notfound-domainpush.http +0 -0
  221. /data/{spec → test}/fixtures.http/notfound-emailforward.http +0 -0
  222. /data/{spec → test}/fixtures.http/notfound-record.http +0 -0
  223. /data/{spec → test}/fixtures.http/notfound-template.http +0 -0
  224. /data/{spec → test}/fixtures.http/notfound-webhook.http +0 -0
  225. /data/{spec → test}/fixtures.http/notfound-whoisprivacy.http +0 -0
  226. /data/{spec → test}/fixtures.http/notfound-zone.http +0 -0
  227. /data/{spec → test}/fixtures.http/oauthAccessToken/error-invalid-request.http +0 -0
  228. /data/{spec → test}/fixtures.http/oauthAccessToken/success.http +0 -0
  229. /data/{spec → test}/fixtures.http/pages-1of3.http +0 -0
  230. /data/{spec → test}/fixtures.http/pages-2of3.http +0 -0
  231. /data/{spec → test}/fixtures.http/pages-3of3.http +0 -0
  232. /data/{spec → test}/fixtures.http/purchaseLetsencryptCertificate/success.http +0 -0
  233. /data/{spec → test}/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +0 -0
  234. /data/{spec → test}/fixtures.http/registerDomain/error-extended-attributes.http +0 -0
  235. /data/{spec → test}/fixtures.http/rejectPush/success.http +0 -0
  236. /data/{spec → test}/fixtures.http/renewDomain/error-tooearly.http +0 -0
  237. /data/{spec → test}/fixtures.http/renewDomain/success.http +0 -0
  238. /data/{spec → test}/fixtures.http/response.http +0 -0
  239. /data/{spec → test}/fixtures.http/restoreDomain/success.http +0 -0
  240. /data/{spec → test}/fixtures.http/success-with-malformed-json.http +0 -0
  241. /data/{spec → test}/fixtures.http/transferDomain/error-indnsimple.http +0 -0
  242. /data/{spec → test}/fixtures.http/transferDomain/error-missing-authcode.http +0 -0
  243. /data/{spec → test}/fixtures.http/transferDomain/success.http +0 -0
  244. /data/{spec → test}/fixtures.http/unapplyService/success.http +0 -0
  245. /data/{spec → test}/fixtures.http/unlinkPrimaryServer/success.http +0 -0
  246. /data/{spec → test}/fixtures.http/updateContact/success.http +0 -0
  247. /data/{spec → test}/fixtures.http/updateTemplate/success.http +0 -0
  248. /data/{spec → test}/fixtures.http/updateZoneNsRecords/success.http +0 -0
  249. /data/{spec → test}/fixtures.http/updateZoneRecord/success.http +0 -0
  250. /data/{spec → test}/fixtures.http/validation-error.http +0 -0
  251. /data/{spec → test}/fixtures.http/whoami/success-account.http +0 -0
  252. /data/{spec → test}/fixtures.http/whoami/success-user.http +0 -0
  253. /data/{spec → test}/fixtures.http/whoami/success.http +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 371112dc13ce900d770aa434d297b19f75892d3a90a3b2f4292ddffb88574c3f
4
- data.tar.gz: c312bc89ea319f11c94bf3ed157c663264d206480033076c9b122a5d31dee2a2
3
+ metadata.gz: 7f407171557923f494c7021338188386bc8960ce0f4b5d8d054a599370e1c9bb
4
+ data.tar.gz: 9770d96251d504107ce14afcedf3cade478902ac1533f1836103fca8cf4fe584
5
5
  SHA512:
6
- metadata.gz: 40334df4d23d15a5a70fde859aacfaffe0407f71fb8cde5524a03b4be98b4df710d71b8eaa7fb3c8484c38fb7845b3b54c95326c84328d44524d771700a39f39
7
- data.tar.gz: 190c114666115887b7724778e72ad511a204a084f06d30494fed5cc47f8a4ca76a4465e1e8d3b44773b71b55105bdfcfca00c38aaf50a20beb714926e2fd2b5f
6
+ metadata.gz: 519a34dc4c836058cb9edae0c185abb3c270f1ebac1b5b22202a1b198e148736aff3cc4e002082901656621e71e26a78e0fe5012df6d9421f7129e876e30c6d5
7
+ data.tar.gz: d5fad291abd99d373d66158a954780f2b278ccc3d95d01f7552f9689ae8bd5d7f9a91816b127818fc38c1c53f44680c9cce9542cd073f5f4ab8c0c2443543453
@@ -15,7 +15,6 @@ concurrency:
15
15
 
16
16
  jobs:
17
17
  markdown-lint:
18
- name: Lint markdown
19
18
  runs-on: ubuntu-latest
20
19
  steps:
21
20
  - name: Checkout Code
@@ -27,10 +26,10 @@ jobs:
27
26
  config_file: ".markdownlint.yaml"
28
27
 
29
28
  test:
29
+ name: Ruby ${{ matrix.ruby-version }}
30
+ runs-on: ubuntu-latest
30
31
  needs:
31
32
  - markdown-lint
32
- runs-on: ubuntu-latest
33
- name: Ruby ${{ matrix.ruby-version }}
34
33
  strategy:
35
34
  matrix:
36
35
  ruby-version:
@@ -1,54 +1,27 @@
1
1
  name: Release
2
2
 
3
3
  on:
4
- workflow_run:
5
- workflows:
6
- - "CI"
7
- types:
8
- - completed
4
+ push:
5
+ tags:
6
+ - v*.*.*
7
+
9
8
  jobs:
10
- validate-tag:
11
- name: Check tag
9
+ wait-for-ci:
10
+ name: Wait for CI
12
11
  runs-on: ubuntu-latest
13
- outputs:
14
- valid_tag: ${{ steps.validation.outputs.valid_tag }}
15
- if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && startsWith(github.event.workflow_run.head_branch, 'v') }}
16
12
  steps:
17
- - name: Check out the repository including tags
18
- uses: actions/checkout@v6
13
+ - name: Wait for CI to pass
14
+ uses: lewagon/wait-on-check-action@v1.5.0
19
15
  with:
20
- ref: ${{ github.event.workflow_run.head_sha }}
21
- fetch-depth: 0
22
- fetch-tags: true
23
- - name: Validate tag
24
- id: validation
25
- run: |
26
- # Validation is necessary in the unlikely case that a branch matching the tag naming pattern is pushed
27
- # and the CI workflow in that branch is modified to run upon a push to that branch
28
- REF='${{ github.event.workflow_run.head_branch }}' # This can be a branch or tag name
29
- if [[ "$REF" != v*.*.* ]]; then
30
- echo "valid_tag=false" >> "$GITHUB_OUTPUT"; exit 0
31
- fi
32
- # Validate that the tag exists
33
- if ! git rev-parse -q --verify "refs/tags/$REF" >/dev/null; then
34
- echo "There is no tag matching $REF - $REF is a branch"
35
- echo "valid_tag=false" >> "$GITHUB_OUTPUT"; exit 0
36
- fi
37
- # Validate that the tag is for the same commit that was pushed
38
- TAG_SHA="$(git rev-parse "$REF^{commit}")"
39
- COMMIT_SHA="${{ github.event.workflow_run.head_sha }}"
40
- if [ "$TAG_SHA" != "$COMMIT_SHA" ]; then
41
- echo "Tag SHA $TAG_SHA does not match pushed commit SHA $COMMIT_SHA"
42
- echo "valid_tag=false" >> "$GITHUB_OUTPUT"; exit 0
43
- fi
44
- echo "Tag $REF exists and is valid. Tag $TAG_SHA matches the pushed commit $COMMIT_SHA."
45
- echo "valid_tag=true" >> "$GITHUB_OUTPUT"
16
+ ref: ${{ github.sha }}
17
+ running-workflow-name: Wait for CI
18
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
19
+ wait-interval: 10
20
+
46
21
  publish:
47
22
  name: Release to RubyGems
48
- needs: validate-tag
23
+ needs: wait-for-ci
49
24
  runs-on: ubuntu-latest
50
- if: ${{ needs.validate-tag.outputs.valid_tag == 'true' && github.event.workflow_run.conclusion == 'success' }}
51
-
52
25
  steps:
53
26
  - uses: actions/checkout@v6
54
27
 
@@ -11,45 +11,24 @@ jobs:
11
11
  - name: Checkout repository
12
12
  uses: actions/checkout@v6
13
13
  - name: Sync fixtures
14
+ id: sync
14
15
  run: |
15
16
  TMP_DIR=$(mktemp -d)
16
17
  curl -fsSL "https://codeload.github.com/dnsimple/dnsimple-developer/tar.gz/refs/heads/main" \
17
18
  | tar -xz -C "$TMP_DIR"
18
- rsync -a --delete "$TMP_DIR/dnsimple-developer-main/fixtures/v2/api/" spec/fixtures.http/
19
- - name: Create a PR to sync fixtures if there are changes
20
- run: |
21
- cat <<'MD' > pr_body.md
22
- This PR replaces the fixtures in this repository with those from https://github.com/dnsimple/dnsimple-developer/
23
-
24
- ## Checklist
25
- - [ ] Close and re-open this PR to trigger the CI workflow (it does not run automatically)
26
- - [ ] Ensure the CI workflow passes before merging
27
- MD
28
-
29
- # Configure Git identity for the workflow
30
- git config --global user.name "github-actions"
31
- git config --global user.email "github-actions@github.com"
32
-
33
- # Create and switch to a new branch
34
- BRANCH="chore/sync-fixtures-${GITHUB_RUN_ID}"
35
- NOW="$(date +'%Y-%m-%d %H:%M:%S')"
36
- git checkout -b "$BRANCH"
37
-
38
- # Stage changes
39
- git add spec/fixtures.http
40
-
41
- # Commit if there are staged changes
42
- if ! git diff --cached --quiet; then
43
- git commit -m "chore: sync test fixtures as of $NOW"
44
- git push -u origin "$BRANCH"
45
-
46
- gh pr create \
47
- --title "chore: Sync fixtures as of $NOW" \
48
- --body-file pr_body.md \
49
- --base main \
50
- --head "$BRANCH"
51
- else
52
- echo "No fixture detected; nothing to do"
53
- fi
54
- env:
55
- GITHUB_TOKEN: ${{ github.token }}
19
+ rsync -a --delete "$TMP_DIR/dnsimple-developer-main/fixtures/v2/api/" test/fixtures.http/
20
+ echo "now=$(date +'%Y-%m-%d %H:%M:%S')" >> "$GITHUB_OUTPUT"
21
+ - name: Create PR with synced fixtures
22
+ uses: peter-evans/create-pull-request@v7
23
+ with:
24
+ sign-commits: true
25
+ add-paths: test/fixtures.http
26
+ commit-message: "chore: sync test fixtures as of ${{ steps.sync.outputs.now }}"
27
+ branch: "chore/sync-fixtures-${{ github.run_id }}"
28
+ title: "chore: Sync fixtures as of ${{ steps.sync.outputs.now }}"
29
+ body: |
30
+ This PR replaces the fixtures in this repository with those from https://github.com/dnsimple/dnsimple-developer/
31
+
32
+ ## Checklist
33
+ - [ ] Close and re-open this PR to trigger the CI workflow (it does not run automatically)
34
+ - [ ] Ensure the CI workflow passes before merging
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ inherit_from:
6
6
  plugins:
7
7
  - rubocop-performance
8
8
  - rubocop-rake
9
- - rubocop-rspec
9
+ - rubocop-minitest
10
10
 
11
11
  AllCops:
12
12
  TargetRubyVersion: 3.2
data/.rubocop_todo.yml CHANGED
@@ -1,49 +1,11 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-12-27 17:14:14 UTC using RuboCop version 1.82.1.
3
+ # on 2026-01-14 23:11:38 UTC using RuboCop version 1.82.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 90
10
- # Configuration parameters: CountAsOne.
11
- RSpec/ExampleLength:
12
- Max: 17
13
-
14
- # Offense count: 1
15
- RSpec/LeakyConstantDeclaration:
16
- Exclude:
17
- - 'spec/dnsimple/client/client_service_spec.rb'
18
-
19
- # Offense count: 12
20
- # Configuration parameters: .
21
- # SupportedStyles: have_received, receive
22
- RSpec/MessageSpies:
23
- EnforcedStyle: receive
24
-
25
- # Offense count: 134
26
- RSpec/MultipleExpectations:
9
+ # Offense count: 79
10
+ Minitest/MultipleAssertions:
27
11
  Max: 15
28
-
29
- # Offense count: 422
30
- # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
31
- # SupportedStyles: always, named_only
32
- RSpec/NamedSubject:
33
- Enabled: false
34
-
35
- # Offense count: 16
36
- RSpec/SubjectStub:
37
- Exclude:
38
- - 'spec/dnsimple/client/certificates_spec.rb'
39
- - 'spec/dnsimple/client/contacts_spec.rb'
40
- - 'spec/dnsimple/client/domains_delegation_signer_records_spec.rb'
41
- - 'spec/dnsimple/client/domains_email_forwards_spec.rb'
42
- - 'spec/dnsimple/client/domains_spec.rb'
43
- - 'spec/dnsimple/client/services_spec.rb'
44
- - 'spec/dnsimple/client/templates_records_spec.rb'
45
- - 'spec/dnsimple/client/templates_spec.rb'
46
- - 'spec/dnsimple/client/tlds_spec.rb'
47
- - 'spec/dnsimple/client/zones_records_spec.rb'
48
- - 'spec/dnsimple/client/zones_spec.rb'
49
- - 'spec/dnsimple/client_spec.rb'
data/CHANGELOG.md CHANGED
@@ -2,7 +2,19 @@
2
2
 
3
3
  This project uses [Semantic Versioning 2.0.0](http://semver.org/), the format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## 12.1.0 - 2025-02-26
5
+ ## 12.2.0 - 2026-03-23
6
+
7
+ ### Added
8
+
9
+ - Added support for trustee service. (#459)
10
+
11
+ ## 12.1.1 - 2026-03-11
12
+
13
+ ### Changed
14
+
15
+ - Migrated the test suite from RSpec to Minitest. This is an internal change with no public API impact. (#448)
16
+
17
+ ## 12.1.0 - 2026-02-26
6
18
 
7
19
  ### Added
8
20
 
data/Gemfile CHANGED
@@ -9,6 +9,6 @@ gem "bigdecimal", "~> 4.0"
9
9
  gem "coveralls", "~> 0.8", require: false
10
10
  gem "csv", "~> 3.2"
11
11
  gem "rubocop", "~> 1.75", require: false
12
+ gem "rubocop-minitest", "~> 0.36", require: false
12
13
  gem "rubocop-performance", "~> 1.25", require: false
13
14
  gem "rubocop-rake", "~> 0.7", require: false
14
- gem "rubocop-rspec", "~> 3.6", require: false
data/Rakefile CHANGED
@@ -1,12 +1,14 @@
1
1
  require 'bundler/gem_tasks'
2
2
 
3
3
  # By default, run tests and linter.
4
- task default: [:spec, :rubocop]
4
+ task default: [:test, :rubocop]
5
5
 
6
6
 
7
- require 'rspec/core/rake_task'
7
+ require 'rake/testtask'
8
8
 
9
- RSpec::Core::RakeTask.new do |t|
9
+ Rake::TestTask.new do |t|
10
+ t.libs << "test"
11
+ t.test_files = FileList["test/**/*_test.rb"]
10
12
  t.verbose = !ENV["VERBOSE"].nil?
11
13
  end
12
14
 
data/dnsimple.gemspec CHANGED
@@ -21,7 +21,8 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'httparty'
22
22
 
23
23
  s.add_development_dependency 'rake'
24
- s.add_development_dependency 'rspec'
24
+ s.add_development_dependency 'minitest'
25
+ s.add_development_dependency 'minitest-mock'
25
26
  s.add_development_dependency 'yard'
26
27
  s.add_development_dependency 'webmock'
27
28
  end
@@ -27,6 +27,9 @@ module Dnsimple
27
27
  # @return [Bool] True if the domain WHOIS privacy is enabled, false otherwise.
28
28
  attr_accessor :private_whois
29
29
 
30
+ # @return [Bool] True if the domain Trustee service is enabled, false otherwise.
31
+ attr_accessor :trustee_service
32
+
30
33
  # @return [String] The timestamp when domain will expire.
31
34
  attr_accessor :expires_at
32
35
 
@@ -17,6 +17,9 @@ module Dnsimple
17
17
 
18
18
  # @return [Float] The price for transfer
19
19
  attr_accessor :transfer_price
20
+
21
+ # @return [Float] The Trustee service price
22
+ attr_accessor :trustee_service_price
20
23
  end
21
24
  end
22
25
  end
@@ -24,6 +24,9 @@ module Dnsimple
24
24
  # @return [Bool] True if the domain WHOIS privacy was requested.
25
25
  attr_accessor :whois_privacy
26
26
 
27
+ # @return [Bool] True if the domain Trustee service was requested.
28
+ attr_accessor :trustee_service
29
+
27
30
  # @return [String] When the domain renewal was created in DNSimple.
28
31
  attr_accessor :created_at
29
32
 
@@ -30,6 +30,12 @@ module Dnsimple
30
30
  # @return [Boolean] True if DNSimple supports inbound transfers for this TLD.
31
31
  attr_accessor :transfer_enabled
32
32
 
33
+ # @return [Boolean] True if Trustee service is enabled for this TLD.
34
+ attr_accessor :trustee_service_enabled
35
+
36
+ # @return [Boolean] True if Trustee service is required for this TLD.
37
+ attr_accessor :trustee_service_required
38
+
33
39
  # @return [String, nil] Type of data interface required for DNSSEC for this TLD.
34
40
  attr_accessor :dnssec_interface_type
35
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dnsimple
4
- VERSION = "12.1.0"
4
+ VERSION = "12.2.0"
5
5
  end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+
5
+ class AccountsTest < Minitest::Test
6
+ def setup
7
+ @subject = Dnsimple::Client.new(base_url: "https://api.dnsimple.test", access_token: "a1b2c3").accounts
8
+ end
9
+
10
+ test "builds the correct request" do
11
+ stub_request(:get, %r{/v2/accounts$})
12
+ .to_return(read_http_fixture("listAccounts/success-user.http"))
13
+
14
+ @subject.accounts
15
+
16
+ assert_requested(:get, "https://api.dnsimple.test/v2/accounts",
17
+ headers: { "Accept" => "application/json" })
18
+ end
19
+
20
+ test "returns the accounts" do
21
+ stub_request(:get, %r{/v2/accounts$})
22
+ .to_return(read_http_fixture("listAccounts/success-user.http"))
23
+
24
+ response = @subject.accounts
25
+
26
+ assert_kind_of(Dnsimple::Response, response)
27
+
28
+ result = response.data
29
+
30
+ assert_kind_of(Dnsimple::Struct::Account, result.first)
31
+ assert_kind_of(Dnsimple::Struct::Account, result.last)
32
+ end
33
+ end
@@ -0,0 +1,106 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+
5
+ require "bigdecimal/util"
6
+
7
+ class BillingTest < Minitest::Test
8
+ def setup
9
+ @subject = Dnsimple::Client.new(base_url: "https://api.dnsimple.test", access_token: "a1b2c3").billing
10
+ @account_id = 1010
11
+ end
12
+
13
+ test "builds the correct request" do
14
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
15
+ .to_return(read_http_fixture("listCharges/success.http"))
16
+
17
+ @subject.charges(@account_id)
18
+
19
+ assert_requested(:get, "https://api.dnsimple.test/v2/#{@account_id}/billing/charges",
20
+ headers: { "Accept" => "application/json" })
21
+ end
22
+
23
+ test "exposes the pagination information" do
24
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
25
+ .to_return(read_http_fixture("listCharges/success.http"))
26
+
27
+ response = @subject.charges(@account_id)
28
+
29
+ assert_respond_to(response, :page)
30
+ assert_equal(1, response.page)
31
+ assert_kind_of(Integer, response.per_page)
32
+ assert_kind_of(Integer, response.total_entries)
33
+ assert_kind_of(Integer, response.total_pages)
34
+ end
35
+
36
+ test "returns the charges" do
37
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
38
+ .to_return(read_http_fixture("listCharges/success.http"))
39
+
40
+ response = @subject.charges(@account_id)
41
+
42
+ assert_kind_of(Dnsimple::PaginatedResponse, response)
43
+ assert_kind_of(Array, response.data)
44
+ assert_equal(3, response.data.size)
45
+
46
+ response.data.each do |result|
47
+ assert_kind_of(Dnsimple::Struct::Charge, result)
48
+ assert_kind_of(BigDecimal, result.balance_amount)
49
+ assert_kind_of(String, result.reference)
50
+ assert_kind_of(Array, result.items)
51
+ assert_kind_of(Dnsimple::Struct::Charge::ChargeItem, result.items[0])
52
+ end
53
+
54
+ assert_kind_of(BigDecimal, response.data[0].total_amount)
55
+ assert_equal("14.5", response.data[0].total_amount.to_s("F"))
56
+ assert_kind_of(BigDecimal, response.data[0].items[0].amount)
57
+ assert_equal("14.5", response.data[0].items[0].amount.to_s("F"))
58
+ end
59
+
60
+ test "supports filters" do
61
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
62
+ .to_return(read_http_fixture("listCharges/success.http"))
63
+
64
+ @subject.charges(@account_id, filter: { start_date: "2023-01-01", end_date: "2023-08-31" })
65
+
66
+ assert_requested(:get, "https://api.dnsimple.test/v2/#{@account_id}/billing/charges?start_date=2023-01-01&end_date=2023-08-31")
67
+ end
68
+
69
+ test "supports pagination" do
70
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
71
+ .to_return(read_http_fixture("listCharges/success.http"))
72
+
73
+ @subject.charges(@account_id, page: 2)
74
+
75
+ assert_requested(:get, "https://api.dnsimple.test/v2/#{@account_id}/billing/charges?page=2")
76
+ end
77
+
78
+ test "supports sorting" do
79
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
80
+ .to_return(read_http_fixture("listCharges/success.http"))
81
+
82
+ @subject.charges(@account_id, sort: "invoiced:asc")
83
+
84
+ assert_requested(:get, "https://api.dnsimple.test/v2/#{@account_id}/billing/charges?sort=invoiced:asc")
85
+ end
86
+
87
+ test "raises error when using a bad filter" do
88
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
89
+ .to_return(read_http_fixture("listCharges/fail-400-bad-filter.http"))
90
+
91
+ error = assert_raises(Dnsimple::RequestError) do
92
+ @subject.charges(@account_id, filter: { start_date: "01-01-2023" })
93
+ end
94
+ assert_equal("Invalid date format must be ISO8601 (YYYY-MM-DD)", error.message)
95
+ end
96
+
97
+ test "raises error when account is not authorized" do
98
+ stub_request(:get, %r{/v2/#{@account_id}/billing/charges})
99
+ .to_return(read_http_fixture("listCharges/fail-403.http"))
100
+
101
+ error = assert_raises(Dnsimple::RequestError) do
102
+ @subject.charges(@account_id)
103
+ end
104
+ assert_equal("Permission Denied. Required Scope: billing:*:read", error.message)
105
+ end
106
+ end