dnsimple 12.1.0 → 12.1.1

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 (249) 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 +2 -2
  5. data/.rubocop.yml +1 -1
  6. data/.rubocop_todo.yml +3 -41
  7. data/CHANGELOG.md +6 -0
  8. data/Gemfile +1 -1
  9. data/Rakefile +5 -3
  10. data/dnsimple.gemspec +2 -1
  11. data/lib/dnsimple/version.rb +1 -1
  12. data/test/dnsimple/client/accounts_test.rb +33 -0
  13. data/test/dnsimple/client/billing_test.rb +106 -0
  14. data/test/dnsimple/client/certificates_test.rb +506 -0
  15. data/test/dnsimple/client/client_service_test.rb +32 -0
  16. data/test/dnsimple/client/contacts_test.rb +231 -0
  17. data/test/dnsimple/client/dns_analytics_test.rb +102 -0
  18. data/test/dnsimple/client/domains_delegation_signer_records_test.rb +213 -0
  19. data/test/dnsimple/client/domains_dnssec_test.rb +109 -0
  20. data/test/dnsimple/client/domains_email_forwards_test.rb +209 -0
  21. data/test/dnsimple/client/domains_pushes_test.rb +180 -0
  22. data/test/dnsimple/client/domains_research_test.rb +40 -0
  23. data/test/dnsimple/client/domains_test.rb +221 -0
  24. data/test/dnsimple/client/identity_test.rb +52 -0
  25. data/test/dnsimple/client/oauth_test.rb +71 -0
  26. data/test/dnsimple/client/registrar_auto_renewal_test.rb +77 -0
  27. data/test/dnsimple/client/registrar_delegation_test.rb +109 -0
  28. data/test/dnsimple/client/registrar_test.rb +615 -0
  29. data/test/dnsimple/client/registrar_transfer_lock_test.rb +113 -0
  30. data/test/dnsimple/client/registrar_whois_privacy_test.rb +92 -0
  31. data/test/dnsimple/client/services_domains_test.rb +119 -0
  32. data/test/dnsimple/client/services_test.rb +126 -0
  33. data/test/dnsimple/client/templates_domains_test.rb +32 -0
  34. data/test/dnsimple/client/templates_records_test.rb +239 -0
  35. data/test/dnsimple/client/templates_test.rb +224 -0
  36. data/test/dnsimple/client/tlds_test.rb +180 -0
  37. data/test/dnsimple/client/vanity_name_servers_test.rb +58 -0
  38. data/test/dnsimple/client/webhooks_test.rb +149 -0
  39. data/test/dnsimple/client/zones_distributions_test.rb +136 -0
  40. data/test/dnsimple/client/zones_records_test.rb +403 -0
  41. data/test/dnsimple/client/zones_test.rb +271 -0
  42. data/test/dnsimple/client_test.rb +210 -0
  43. data/test/dnsimple/extra_test.rb +38 -0
  44. data/test/dnsimple/options/base_test.rb +23 -0
  45. data/test/dnsimple/options/list_options_test.rb +95 -0
  46. data/test/test_helper.rb +35 -0
  47. metadata +216 -205
  48. data/.rspec +0 -1
  49. data/spec/dnsimple/client/accounts_spec.rb +0 -33
  50. data/spec/dnsimple/client/billing_spec.rb +0 -101
  51. data/spec/dnsimple/client/certificates_spec.rb +0 -452
  52. data/spec/dnsimple/client/client_service_spec.rb +0 -41
  53. data/spec/dnsimple/client/contacts_spec.rb +0 -228
  54. data/spec/dnsimple/client/dns_analytics_spec.rb +0 -84
  55. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +0 -212
  56. data/spec/dnsimple/client/domains_dnssec_spec.rb +0 -124
  57. data/spec/dnsimple/client/domains_email_forwards_spec.rb +0 -210
  58. data/spec/dnsimple/client/domains_pushes_spec.rb +0 -164
  59. data/spec/dnsimple/client/domains_research_spec.rb +0 -38
  60. data/spec/dnsimple/client/domains_spec.rb +0 -206
  61. data/spec/dnsimple/client/identity_spec.rb +0 -58
  62. data/spec/dnsimple/client/oauth_spec.rb +0 -82
  63. data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +0 -82
  64. data/spec/dnsimple/client/registrar_delegation_spec.rb +0 -109
  65. data/spec/dnsimple/client/registrar_spec.rb +0 -627
  66. data/spec/dnsimple/client/registrar_transfer_lock_spec.rb +0 -118
  67. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +0 -94
  68. data/spec/dnsimple/client/services_domains_spec.rb +0 -115
  69. data/spec/dnsimple/client/services_spec.rb +0 -111
  70. data/spec/dnsimple/client/templates_domains_spec.rb +0 -34
  71. data/spec/dnsimple/client/templates_records_spec.rb +0 -228
  72. data/spec/dnsimple/client/templates_spec.rb +0 -218
  73. data/spec/dnsimple/client/tlds_spec.rb +0 -163
  74. data/spec/dnsimple/client/vanity_name_servers_spec.rb +0 -56
  75. data/spec/dnsimple/client/webhooks_spec.rb +0 -150
  76. data/spec/dnsimple/client/zones_distributions_spec.rb +0 -137
  77. data/spec/dnsimple/client/zones_records_spec.rb +0 -414
  78. data/spec/dnsimple/client/zones_spec.rb +0 -261
  79. data/spec/dnsimple/client_spec.rb +0 -225
  80. data/spec/dnsimple/extra_spec.rb +0 -48
  81. data/spec/dnsimple/options/base_spec.rb +0 -24
  82. data/spec/dnsimple/options/list_options_spec.rb +0 -102
  83. data/spec/spec_helper.rb +0 -17
  84. data/spec/support/helpers.rb +0 -15
  85. data/spec/support/webmock.rb +0 -13
  86. /data/{spec → test}/fixtures.http/acceptPush/success.http +0 -0
  87. /data/{spec → test}/fixtures.http/accounts/success-account.http +0 -0
  88. /data/{spec → test}/fixtures.http/accounts/success-user.http +0 -0
  89. /data/{spec → test}/fixtures.http/activateZoneService/success.http +0 -0
  90. /data/{spec → test}/fixtures.http/appliedServices/success.http +0 -0
  91. /data/{spec → test}/fixtures.http/applyService/success.http +0 -0
  92. /data/{spec → test}/fixtures.http/applyTemplate/success.http +0 -0
  93. /data/{spec → test}/fixtures.http/authorizeDomainTransferOut/success.http +0 -0
  94. /data/{spec → test}/fixtures.http/badgateway.http +0 -0
  95. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +0 -0
  96. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +0 -0
  97. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +0 -0
  98. /data/{spec → test}/fixtures.http/batchChangeZoneRecords/success.http +0 -0
  99. /data/{spec → test}/fixtures.http/cancelDomainTransfer/success.http +0 -0
  100. /data/{spec → test}/fixtures.http/changeDomainDelegation/success.http +0 -0
  101. /data/{spec → test}/fixtures.http/changeDomainDelegationFromVanity/success.http +0 -0
  102. /data/{spec → test}/fixtures.http/changeDomainDelegationToVanity/success.http +0 -0
  103. /data/{spec → test}/fixtures.http/checkDomain/success.http +0 -0
  104. /data/{spec → test}/fixtures.http/checkRegistrantChange/error-contactnotfound.http +0 -0
  105. /data/{spec → test}/fixtures.http/checkRegistrantChange/error-domainnotfound.http +0 -0
  106. /data/{spec → test}/fixtures.http/checkRegistrantChange/success.http +0 -0
  107. /data/{spec → test}/fixtures.http/checkZoneDistribution/error.http +0 -0
  108. /data/{spec → test}/fixtures.http/checkZoneDistribution/failure.http +0 -0
  109. /data/{spec → test}/fixtures.http/checkZoneDistribution/success.http +0 -0
  110. /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/error.http +0 -0
  111. /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/failure.http +0 -0
  112. /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/success.http +0 -0
  113. /data/{spec → test}/fixtures.http/createContact/created.http +0 -0
  114. /data/{spec → test}/fixtures.http/createContact/error-validation-errors.http +0 -0
  115. /data/{spec → test}/fixtures.http/createDelegationSignerRecord/created.http +0 -0
  116. /data/{spec → test}/fixtures.http/createDelegationSignerRecord/validation-error.http +0 -0
  117. /data/{spec → test}/fixtures.http/createDomain/created.http +0 -0
  118. /data/{spec → test}/fixtures.http/createEmailForward/created.http +0 -0
  119. /data/{spec → test}/fixtures.http/createPrimaryServer/created.http +0 -0
  120. /data/{spec → test}/fixtures.http/createRegistrantChange/success.http +0 -0
  121. /data/{spec → test}/fixtures.http/createSecondaryZone/created.http +0 -0
  122. /data/{spec → test}/fixtures.http/createTemplate/created.http +0 -0
  123. /data/{spec → test}/fixtures.http/createTemplateRecord/created.http +0 -0
  124. /data/{spec → test}/fixtures.http/createWebhook/created.http +0 -0
  125. /data/{spec → test}/fixtures.http/createZoneRecord/created-apex.http +0 -0
  126. /data/{spec → test}/fixtures.http/createZoneRecord/created.http +0 -0
  127. /data/{spec → test}/fixtures.http/deactivateZoneService/success.http +0 -0
  128. /data/{spec → test}/fixtures.http/deleteContact/error-contact-in-use.http +0 -0
  129. /data/{spec → test}/fixtures.http/deleteContact/success.http +0 -0
  130. /data/{spec → test}/fixtures.http/deleteDelegationSignerRecord/success.http +0 -0
  131. /data/{spec → test}/fixtures.http/deleteDomain/success.http +0 -0
  132. /data/{spec → test}/fixtures.http/deleteEmailForward/success.http +0 -0
  133. /data/{spec → test}/fixtures.http/deleteRegistrantChange/success.http +0 -0
  134. /data/{spec → test}/fixtures.http/deleteRegistrantChange/success_async.http +0 -0
  135. /data/{spec → test}/fixtures.http/deleteTemplate/success.http +0 -0
  136. /data/{spec → test}/fixtures.http/deleteTemplateRecord/success.http +0 -0
  137. /data/{spec → test}/fixtures.http/deleteWebhook/success.http +0 -0
  138. /data/{spec → test}/fixtures.http/deleteZoneRecord/success.http +0 -0
  139. /data/{spec → test}/fixtures.http/disableDnssec/not-enabled.http +0 -0
  140. /data/{spec → test}/fixtures.http/disableDnssec/success.http +0 -0
  141. /data/{spec → test}/fixtures.http/disableDomainAutoRenewal/success.http +0 -0
  142. /data/{spec → test}/fixtures.http/disableDomainTransferLock/success.http +0 -0
  143. /data/{spec → test}/fixtures.http/disableVanityNameServers/success.http +0 -0
  144. /data/{spec → test}/fixtures.http/disableWhoisPrivacy/success.http +0 -0
  145. /data/{spec → test}/fixtures.http/dnsAnalytics/success.http +0 -0
  146. /data/{spec → test}/fixtures.http/downloadCertificate/success.http +0 -0
  147. /data/{spec → test}/fixtures.http/enableDnssec/success.http +0 -0
  148. /data/{spec → test}/fixtures.http/enableDomainAutoRenewal/success.http +0 -0
  149. /data/{spec → test}/fixtures.http/enableDomainTransferLock/success.http +0 -0
  150. /data/{spec → test}/fixtures.http/enableVanityNameServers/success.http +0 -0
  151. /data/{spec → test}/fixtures.http/enableWhoisPrivacy/created.http +0 -0
  152. /data/{spec → test}/fixtures.http/enableWhoisPrivacy/success.http +0 -0
  153. /data/{spec → test}/fixtures.http/getCertificate/success.http +0 -0
  154. /data/{spec → test}/fixtures.http/getCertificatePrivateKey/success.http +0 -0
  155. /data/{spec → test}/fixtures.http/getContact/success.http +0 -0
  156. /data/{spec → test}/fixtures.http/getDelegationSignerRecord/success.http +0 -0
  157. /data/{spec → test}/fixtures.http/getDnssec/success.http +0 -0
  158. /data/{spec → test}/fixtures.http/getDomain/success.http +0 -0
  159. /data/{spec → test}/fixtures.http/getDomainDelegation/success-empty.http +0 -0
  160. /data/{spec → test}/fixtures.http/getDomainDelegation/success.http +0 -0
  161. /data/{spec → test}/fixtures.http/getDomainPrices/failure.http +0 -0
  162. /data/{spec → test}/fixtures.http/getDomainPrices/success.http +0 -0
  163. /data/{spec → test}/fixtures.http/getDomainRegistration/success.http +0 -0
  164. /data/{spec → test}/fixtures.http/getDomainRenewal/success.http +0 -0
  165. /data/{spec → test}/fixtures.http/getDomainRestore/success.http +0 -0
  166. /data/{spec → test}/fixtures.http/getDomainTransfer/success.http +0 -0
  167. /data/{spec → test}/fixtures.http/getDomainTransferLock/success.http +0 -0
  168. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/error-validation.http +0 -0
  169. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-available.http +0 -0
  170. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-unavailable.http +0 -0
  171. /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-unsupported-tld.http +0 -0
  172. /data/{spec → test}/fixtures.http/getEmailForward/success.http +0 -0
  173. /data/{spec → test}/fixtures.http/getPrimaryServer/success.http +0 -0
  174. /data/{spec → test}/fixtures.http/getRegistrantChange/success.http +0 -0
  175. /data/{spec → test}/fixtures.http/getService/success.http +0 -0
  176. /data/{spec → test}/fixtures.http/getTemplate/success.http +0 -0
  177. /data/{spec → test}/fixtures.http/getTemplateRecord/success.http +0 -0
  178. /data/{spec → test}/fixtures.http/getTld/success.http +0 -0
  179. /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success-attributes.http +0 -0
  180. /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success-noattributes.http +0 -0
  181. /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success.http +0 -0
  182. /data/{spec → test}/fixtures.http/getWebhook/success.http +0 -0
  183. /data/{spec → test}/fixtures.http/getZone/success.http +0 -0
  184. /data/{spec → test}/fixtures.http/getZoneFile/success.http +0 -0
  185. /data/{spec → test}/fixtures.http/getZoneRecord/success.http +0 -0
  186. /data/{spec → test}/fixtures.http/initiatePush/success.http +0 -0
  187. /data/{spec → test}/fixtures.http/issueLetsencryptCertificate/success.http +0 -0
  188. /data/{spec → test}/fixtures.http/issueRenewalLetsencryptCertificate/success.http +0 -0
  189. /data/{spec → test}/fixtures.http/linkPrimaryServer/success.http +0 -0
  190. /data/{spec → test}/fixtures.http/listAccounts/success-account.http +0 -0
  191. /data/{spec → test}/fixtures.http/listAccounts/success-user.http +0 -0
  192. /data/{spec → test}/fixtures.http/listCertificates/success.http +0 -0
  193. /data/{spec → test}/fixtures.http/listCharges/fail-400-bad-filter.http +0 -0
  194. /data/{spec → test}/fixtures.http/listCharges/fail-403.http +0 -0
  195. /data/{spec → test}/fixtures.http/listCharges/success.http +0 -0
  196. /data/{spec → test}/fixtures.http/listContacts/success.http +0 -0
  197. /data/{spec → test}/fixtures.http/listDelegationSignerRecords/success.http +0 -0
  198. /data/{spec → test}/fixtures.http/listDomains/success.http +0 -0
  199. /data/{spec → test}/fixtures.http/listEmailForwards/success.http +0 -0
  200. /data/{spec → test}/fixtures.http/listPrimaryServers/success.http +0 -0
  201. /data/{spec → test}/fixtures.http/listPushes/success.http +0 -0
  202. /data/{spec → test}/fixtures.http/listRegistrantChanges/success.http +0 -0
  203. /data/{spec → test}/fixtures.http/listServices/success.http +0 -0
  204. /data/{spec → test}/fixtures.http/listTemplateRecords/success.http +0 -0
  205. /data/{spec → test}/fixtures.http/listTemplates/success.http +0 -0
  206. /data/{spec → test}/fixtures.http/listTlds/success.http +0 -0
  207. /data/{spec → test}/fixtures.http/listWebhooks/success.http +0 -0
  208. /data/{spec → test}/fixtures.http/listZoneRecords/success.http +0 -0
  209. /data/{spec → test}/fixtures.http/listZones/success.http +0 -0
  210. /data/{spec → test}/fixtures.http/method-not-allowed.http +0 -0
  211. /data/{spec → test}/fixtures.http/notfound-certificate.http +0 -0
  212. /data/{spec → test}/fixtures.http/notfound-contact.http +0 -0
  213. /data/{spec → test}/fixtures.http/notfound-delegationSignerRecord.http +0 -0
  214. /data/{spec → test}/fixtures.http/notfound-domain.http +0 -0
  215. /data/{spec → test}/fixtures.http/notfound-domainpush.http +0 -0
  216. /data/{spec → test}/fixtures.http/notfound-emailforward.http +0 -0
  217. /data/{spec → test}/fixtures.http/notfound-record.http +0 -0
  218. /data/{spec → test}/fixtures.http/notfound-template.http +0 -0
  219. /data/{spec → test}/fixtures.http/notfound-webhook.http +0 -0
  220. /data/{spec → test}/fixtures.http/notfound-whoisprivacy.http +0 -0
  221. /data/{spec → test}/fixtures.http/notfound-zone.http +0 -0
  222. /data/{spec → test}/fixtures.http/oauthAccessToken/error-invalid-request.http +0 -0
  223. /data/{spec → test}/fixtures.http/oauthAccessToken/success.http +0 -0
  224. /data/{spec → test}/fixtures.http/pages-1of3.http +0 -0
  225. /data/{spec → test}/fixtures.http/pages-2of3.http +0 -0
  226. /data/{spec → test}/fixtures.http/pages-3of3.http +0 -0
  227. /data/{spec → test}/fixtures.http/purchaseLetsencryptCertificate/success.http +0 -0
  228. /data/{spec → test}/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +0 -0
  229. /data/{spec → test}/fixtures.http/registerDomain/error-extended-attributes.http +0 -0
  230. /data/{spec → test}/fixtures.http/registerDomain/success.http +0 -0
  231. /data/{spec → test}/fixtures.http/rejectPush/success.http +0 -0
  232. /data/{spec → test}/fixtures.http/renewDomain/error-tooearly.http +0 -0
  233. /data/{spec → test}/fixtures.http/renewDomain/success.http +0 -0
  234. /data/{spec → test}/fixtures.http/response.http +0 -0
  235. /data/{spec → test}/fixtures.http/restoreDomain/success.http +0 -0
  236. /data/{spec → test}/fixtures.http/success-with-malformed-json.http +0 -0
  237. /data/{spec → test}/fixtures.http/transferDomain/error-indnsimple.http +0 -0
  238. /data/{spec → test}/fixtures.http/transferDomain/error-missing-authcode.http +0 -0
  239. /data/{spec → test}/fixtures.http/transferDomain/success.http +0 -0
  240. /data/{spec → test}/fixtures.http/unapplyService/success.http +0 -0
  241. /data/{spec → test}/fixtures.http/unlinkPrimaryServer/success.http +0 -0
  242. /data/{spec → test}/fixtures.http/updateContact/success.http +0 -0
  243. /data/{spec → test}/fixtures.http/updateTemplate/success.http +0 -0
  244. /data/{spec → test}/fixtures.http/updateZoneNsRecords/success.http +0 -0
  245. /data/{spec → test}/fixtures.http/updateZoneRecord/success.http +0 -0
  246. /data/{spec → test}/fixtures.http/validation-error.http +0 -0
  247. /data/{spec → test}/fixtures.http/whoami/success-account.http +0 -0
  248. /data/{spec → test}/fixtures.http/whoami/success-user.http +0 -0
  249. /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: aba3fa999d47316cbc09c4084e223279a1fea0b0694f47fae6ad439aea1eba61
4
+ data.tar.gz: 9ecf0f9812b057a8f091ff7dbeedc0978b4adc167f470e33883c9562699d1625
5
5
  SHA512:
6
- metadata.gz: 40334df4d23d15a5a70fde859aacfaffe0407f71fb8cde5524a03b4be98b4df710d71b8eaa7fb3c8484c38fb7845b3b54c95326c84328d44524d771700a39f39
7
- data.tar.gz: 190c114666115887b7724778e72ad511a204a084f06d30494fed5cc47f8a4ca76a4465e1e8d3b44773b71b55105bdfcfca00c38aaf50a20beb714926e2fd2b5f
6
+ metadata.gz: 3e30070f4e8fbbea5ccba3118edaf80282ca77edfe96010d10f94a299dbd33f18866c8119abcb1a8ea057b2a65a04ac979de4bc652d5aba0c060e6d06c9cfd4f
7
+ data.tar.gz: 710dd46a4f23519e218c7e9e83c06043e605dcf7fdb5b203088b366e2b23db47697003d3d8ad4b2cae9ab501626c1923bb46eba84e781753c467925181a13517
@@ -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
 
@@ -15,7 +15,7 @@ jobs:
15
15
  TMP_DIR=$(mktemp -d)
16
16
  curl -fsSL "https://codeload.github.com/dnsimple/dnsimple-developer/tar.gz/refs/heads/main" \
17
17
  | tar -xz -C "$TMP_DIR"
18
- rsync -a --delete "$TMP_DIR/dnsimple-developer-main/fixtures/v2/api/" spec/fixtures.http/
18
+ rsync -a --delete "$TMP_DIR/dnsimple-developer-main/fixtures/v2/api/" test/fixtures.http/
19
19
  - name: Create a PR to sync fixtures if there are changes
20
20
  run: |
21
21
  cat <<'MD' > pr_body.md
@@ -36,7 +36,7 @@ jobs:
36
36
  git checkout -b "$BRANCH"
37
37
 
38
38
  # Stage changes
39
- git add spec/fixtures.http
39
+ git add test/fixtures.http
40
40
 
41
41
  # Commit if there are staged changes
42
42
  if ! git diff --cached --quiet; then
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,6 +2,12 @@
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.1 - 2026-03-11
6
+
7
+ ### Changed
8
+
9
+ - Migrated the test suite from RSpec to Minitest. This is an internal change with no public API impact. (#448)
10
+
5
11
  ## 12.1.0 - 2025-02-26
6
12
 
7
13
  ### Added
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dnsimple
4
- VERSION = "12.1.0"
4
+ VERSION = "12.1.1"
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