dnsimple 11.0.0 → 12.0.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 (272) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +10 -5
  3. data/.github/workflows/release.yml +44 -13
  4. data/.github/workflows/sync-test-fixtures.yml +1 -1
  5. data/.rubocop.yml +4 -1
  6. data/.rubocop_dnsimple.yml +14 -42
  7. data/.rubocop_todo.yml +4 -9
  8. data/CHANGELOG.md +287 -181
  9. data/CONTRIBUTING.md +6 -40
  10. data/Gemfile +1 -1
  11. data/LICENSE.txt +1 -1
  12. data/README.md +49 -40
  13. data/RELEASING.md +67 -0
  14. data/dnsimple.gemspec +1 -1
  15. data/lib/dnsimple/client/accounts.rb +1 -3
  16. data/lib/dnsimple/client/billing.rb +2 -4
  17. data/lib/dnsimple/client/certificates.rb +0 -2
  18. data/lib/dnsimple/client/clients.rb +2 -40
  19. data/lib/dnsimple/client/contacts.rb +17 -19
  20. data/lib/dnsimple/client/dns_analytics.rb +2 -4
  21. data/lib/dnsimple/client/domains.rb +13 -15
  22. data/lib/dnsimple/client/domains_delegation_signer_records.rb +18 -20
  23. data/lib/dnsimple/client/domains_dnssec.rb +9 -11
  24. data/lib/dnsimple/client/domains_email_forwards.rb +18 -20
  25. data/lib/dnsimple/client/domains_pushes.rb +13 -15
  26. data/lib/dnsimple/client/identity.rb +4 -9
  27. data/lib/dnsimple/client/oauth.rb +1 -3
  28. data/lib/dnsimple/client/registrar.rb +45 -47
  29. data/lib/dnsimple/client/registrar_auto_renewal.rb +6 -8
  30. data/lib/dnsimple/client/registrar_delegation.rb +14 -16
  31. data/lib/dnsimple/client/registrar_registrant_changes.rb +14 -16
  32. data/lib/dnsimple/client/registrar_transfer_lock.rb +9 -11
  33. data/lib/dnsimple/client/registrar_whois_privacy.rb +6 -48
  34. data/lib/dnsimple/client/services.rb +4 -6
  35. data/lib/dnsimple/client/services_domains.rb +12 -14
  36. data/lib/dnsimple/client/templates.rb +17 -19
  37. data/lib/dnsimple/client/templates_domains.rb +4 -6
  38. data/lib/dnsimple/client/templates_records.rb +18 -20
  39. data/lib/dnsimple/client/tlds.rb +6 -8
  40. data/lib/dnsimple/client/vanity_name_servers.rb +0 -2
  41. data/lib/dnsimple/client/webhooks.rb +11 -13
  42. data/lib/dnsimple/client/zones.rb +16 -18
  43. data/lib/dnsimple/client/zones_distributions.rb +4 -6
  44. data/lib/dnsimple/client/zones_records.rb +57 -26
  45. data/lib/dnsimple/client.rb +22 -24
  46. data/lib/dnsimple/default.rb +0 -4
  47. data/lib/dnsimple/error.rb +0 -6
  48. data/lib/dnsimple/extra.rb +4 -6
  49. data/lib/dnsimple/options.rb +1 -7
  50. data/lib/dnsimple/response.rb +4 -13
  51. data/lib/dnsimple/struct/account.rb +0 -2
  52. data/lib/dnsimple/struct/certificate.rb +0 -2
  53. data/lib/dnsimple/struct/certificate_bundle.rb +0 -2
  54. data/lib/dnsimple/struct/certificate_purchase.rb +0 -2
  55. data/lib/dnsimple/struct/certificate_renewal.rb +0 -2
  56. data/lib/dnsimple/struct/charge.rb +4 -8
  57. data/lib/dnsimple/struct/collaborator.rb +0 -2
  58. data/lib/dnsimple/struct/contact.rb +0 -2
  59. data/lib/dnsimple/struct/delegation_signer_record.rb +0 -2
  60. data/lib/dnsimple/struct/dns_analytics.rb +0 -2
  61. data/lib/dnsimple/struct/dnssec.rb +0 -2
  62. data/lib/dnsimple/struct/domain.rb +0 -2
  63. data/lib/dnsimple/struct/domain_check.rb +0 -2
  64. data/lib/dnsimple/struct/domain_premium_price.rb +0 -2
  65. data/lib/dnsimple/struct/domain_price.rb +0 -2
  66. data/lib/dnsimple/struct/domain_push.rb +0 -2
  67. data/lib/dnsimple/struct/domain_registration.rb +0 -2
  68. data/lib/dnsimple/struct/domain_renewal.rb +0 -2
  69. data/lib/dnsimple/struct/domain_restore.rb +0 -2
  70. data/lib/dnsimple/struct/domain_transfer.rb +0 -2
  71. data/lib/dnsimple/struct/email_forward.rb +0 -2
  72. data/lib/dnsimple/struct/extended_attribute.rb +0 -4
  73. data/lib/dnsimple/struct/oauth_token.rb +0 -2
  74. data/lib/dnsimple/struct/registrant_change.rb +0 -2
  75. data/lib/dnsimple/struct/registrant_change_check.rb +0 -2
  76. data/lib/dnsimple/struct/service.rb +0 -4
  77. data/lib/dnsimple/struct/template.rb +0 -2
  78. data/lib/dnsimple/struct/template_record.rb +0 -2
  79. data/lib/dnsimple/struct/tld.rb +0 -2
  80. data/lib/dnsimple/struct/transfer_lock.rb +0 -2
  81. data/lib/dnsimple/struct/user.rb +0 -2
  82. data/lib/dnsimple/struct/vanity_name_server.rb +0 -2
  83. data/lib/dnsimple/struct/webhook.rb +0 -2
  84. data/lib/dnsimple/struct/whoami.rb +2 -4
  85. data/lib/dnsimple/struct/whois_privacy.rb +0 -2
  86. data/lib/dnsimple/struct/zone.rb +0 -2
  87. data/lib/dnsimple/struct/zone_distribution.rb +0 -2
  88. data/lib/dnsimple/struct/zone_file.rb +0 -2
  89. data/lib/dnsimple/struct/zone_record.rb +0 -2
  90. data/lib/dnsimple/struct/zone_record_id.rb +10 -0
  91. data/lib/dnsimple/struct/zone_records_batch_change.rb +16 -0
  92. data/lib/dnsimple/struct.rb +2 -3
  93. data/lib/dnsimple/version.rb +1 -3
  94. data/lib/dnsimple.rb +1 -3
  95. data/spec/dnsimple/client/client_service_spec.rb +12 -10
  96. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +2 -2
  97. data/spec/dnsimple/client/oauth_spec.rb +6 -6
  98. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +0 -82
  99. data/spec/dnsimple/client/zones_records_spec.rb +95 -0
  100. data/spec/fixtures.http/acceptPush/success.http +15 -15
  101. data/spec/fixtures.http/accounts/success-account.http +20 -20
  102. data/spec/fixtures.http/accounts/success-user.http +21 -21
  103. data/spec/fixtures.http/activateZoneService/success.http +16 -16
  104. data/spec/fixtures.http/appliedServices/success.http +19 -19
  105. data/spec/fixtures.http/applyService/success.http +15 -15
  106. data/spec/fixtures.http/applyTemplate/success.http +13 -13
  107. data/spec/fixtures.http/authorizeDomainTransferOut/success.http +13 -13
  108. data/spec/fixtures.http/badgateway.http +5 -5
  109. data/spec/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +16 -0
  110. data/spec/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +15 -0
  111. data/spec/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +15 -0
  112. data/spec/fixtures.http/batchChangeZoneRecords/success.http +16 -0
  113. data/spec/fixtures.http/cancelDomainTransfer/success.http +17 -17
  114. data/spec/fixtures.http/changeDomainDelegation/success.http +15 -15
  115. data/spec/fixtures.http/changeDomainDelegationFromVanity/success.http +15 -15
  116. data/spec/fixtures.http/changeDomainDelegationToVanity/success.http +17 -17
  117. data/spec/fixtures.http/checkDomain/success.http +15 -15
  118. data/spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http +3 -3
  119. data/spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http +3 -3
  120. data/spec/fixtures.http/checkRegistrantChange/success.http +15 -15
  121. data/spec/fixtures.http/checkZoneDistribution/error.http +17 -17
  122. data/spec/fixtures.http/checkZoneDistribution/failure.http +17 -17
  123. data/spec/fixtures.http/checkZoneDistribution/success.http +17 -17
  124. data/spec/fixtures.http/checkZoneRecordDistribution/error.http +17 -17
  125. data/spec/fixtures.http/checkZoneRecordDistribution/failure.http +17 -17
  126. data/spec/fixtures.http/checkZoneRecordDistribution/success.http +17 -17
  127. data/spec/fixtures.http/createContact/created.http +16 -16
  128. data/spec/fixtures.http/createContact/error-validation-errors.http +15 -15
  129. data/spec/fixtures.http/createDelegationSignerRecord/created.http +17 -17
  130. data/spec/fixtures.http/createDelegationSignerRecord/validation-error.http +15 -15
  131. data/spec/fixtures.http/createDomain/created.http +19 -19
  132. data/spec/fixtures.http/createEmailForward/created.http +21 -21
  133. data/spec/fixtures.http/createPrimaryServer/created.http +20 -20
  134. data/spec/fixtures.http/createRegistrantChange/success.http +14 -14
  135. data/spec/fixtures.http/createSecondaryZone/created.http +20 -20
  136. data/spec/fixtures.http/createTemplate/created.http +15 -15
  137. data/spec/fixtures.http/createTemplateRecord/created.http +16 -16
  138. data/spec/fixtures.http/createWebhook/created.http +13 -13
  139. data/spec/fixtures.http/createZoneRecord/created-apex.http +13 -13
  140. data/spec/fixtures.http/createZoneRecord/created.http +13 -13
  141. data/spec/fixtures.http/deactivateZoneService/success.http +16 -16
  142. data/spec/fixtures.http/deleteContact/error-contact-in-use.http +15 -15
  143. data/spec/fixtures.http/deleteContact/success.http +13 -13
  144. data/spec/fixtures.http/deleteDelegationSignerRecord/success.http +15 -15
  145. data/spec/fixtures.http/deleteDomain/success.http +11 -11
  146. data/spec/fixtures.http/deleteEmailForward/success.http +18 -18
  147. data/spec/fixtures.http/deleteRegistrantChange/success.http +13 -13
  148. data/spec/fixtures.http/deleteRegistrantChange/success_async.http +3 -3
  149. data/spec/fixtures.http/deleteTemplate/success.http +13 -13
  150. data/spec/fixtures.http/deleteTemplateRecord/success.http +13 -13
  151. data/spec/fixtures.http/deleteWebhook/success.http +13 -13
  152. data/spec/fixtures.http/deleteZoneRecord/success.http +11 -11
  153. data/spec/fixtures.http/disableDnssec/not-enabled.http +15 -15
  154. data/spec/fixtures.http/disableDnssec/success.http +15 -15
  155. data/spec/fixtures.http/disableDomainAutoRenewal/success.http +13 -13
  156. data/spec/fixtures.http/disableDomainTransferLock/success.http +17 -17
  157. data/spec/fixtures.http/disableVanityNameServers/success.http +15 -15
  158. data/spec/fixtures.http/disableWhoisPrivacy/success.http +16 -16
  159. data/spec/fixtures.http/dnsAnalytics/success.http +17 -17
  160. data/spec/fixtures.http/downloadCertificate/success.http +19 -19
  161. data/spec/fixtures.http/enableDnssec/success.http +17 -17
  162. data/spec/fixtures.http/enableDomainAutoRenewal/success.http +13 -13
  163. data/spec/fixtures.http/enableDomainTransferLock/success.http +17 -17
  164. data/spec/fixtures.http/enableVanityNameServers/success.http +17 -17
  165. data/spec/fixtures.http/enableWhoisPrivacy/created.http +16 -16
  166. data/spec/fixtures.http/enableWhoisPrivacy/success.http +16 -16
  167. data/spec/fixtures.http/getCertificate/success.http +19 -19
  168. data/spec/fixtures.http/getCertificatePrivateKey/success.http +20 -20
  169. data/spec/fixtures.http/getContact/success.http +16 -16
  170. data/spec/fixtures.http/getDelegationSignerRecord/success.http +17 -17
  171. data/spec/fixtures.http/getDnssec/success.http +17 -17
  172. data/spec/fixtures.http/getDomain/success.http +19 -19
  173. data/spec/fixtures.http/getDomainDelegation/success-empty.http +15 -15
  174. data/spec/fixtures.http/getDomainDelegation/success.http +15 -15
  175. data/spec/fixtures.http/getDomainPrices/failure.http +18 -18
  176. data/spec/fixtures.http/getDomainPrices/success.http +21 -21
  177. data/spec/fixtures.http/getDomainRegistration/success.http +20 -20
  178. data/spec/fixtures.http/getDomainRenewal/success.http +20 -20
  179. data/spec/fixtures.http/getDomainRestore/success.http +22 -19
  180. data/spec/fixtures.http/getDomainTransfer/success.http +19 -19
  181. data/spec/fixtures.http/getDomainTransferLock/success.http +17 -17
  182. data/spec/fixtures.http/getEmailForward/success.http +21 -21
  183. data/spec/fixtures.http/getPrimaryServer/success.http +20 -20
  184. data/spec/fixtures.http/getRegistrantChange/success.http +15 -15
  185. data/spec/fixtures.http/getService/success.http +16 -16
  186. data/spec/fixtures.http/getTemplate/success.http +15 -15
  187. data/spec/fixtures.http/getTemplateRecord/success.http +16 -16
  188. data/spec/fixtures.http/getTld/success.http +20 -20
  189. data/spec/fixtures.http/getTldExtendedAttributes/success-attributes.http +15 -15
  190. data/spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http +15 -15
  191. data/spec/fixtures.http/getTldExtendedAttributes/success.http +15 -15
  192. data/spec/fixtures.http/getWebhook/success.http +13 -13
  193. data/spec/fixtures.http/getZone/success.http +16 -16
  194. data/spec/fixtures.http/getZoneFile/success.http +17 -17
  195. data/spec/fixtures.http/getZoneRecord/success.http +17 -17
  196. data/spec/fixtures.http/initiatePush/success.http +17 -17
  197. data/spec/fixtures.http/issueLetsencryptCertificate/success.http +17 -17
  198. data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +17 -17
  199. data/spec/fixtures.http/linkPrimaryServer/success.http +20 -20
  200. data/spec/fixtures.http/listAccounts/success-account.http +20 -20
  201. data/spec/fixtures.http/listAccounts/success-user.http +20 -20
  202. data/spec/fixtures.http/listCertificates/success.http +19 -19
  203. data/spec/fixtures.http/listCharges/fail-400-bad-filter.http +9 -9
  204. data/spec/fixtures.http/listCharges/fail-403.http +9 -9
  205. data/spec/fixtures.http/listCharges/success.http +9 -9
  206. data/spec/fixtures.http/listContacts/success.http +16 -16
  207. data/spec/fixtures.http/listDelegationSignerRecords/success.http +17 -17
  208. data/spec/fixtures.http/listDomains/success.http +19 -19
  209. data/spec/fixtures.http/listEmailForwards/success.http +13 -13
  210. data/spec/fixtures.http/listPrimaryServers/success.http +20 -20
  211. data/spec/fixtures.http/listPushes/success.http +17 -17
  212. data/spec/fixtures.http/listRegistrantChanges/success.http +15 -15
  213. data/spec/fixtures.http/listServices/success.http +17 -17
  214. data/spec/fixtures.http/listTemplateRecords/success.http +16 -16
  215. data/spec/fixtures.http/listTemplates/success.http +15 -15
  216. data/spec/fixtures.http/listTlds/success.http +20 -20
  217. data/spec/fixtures.http/listWebhooks/success.http +13 -13
  218. data/spec/fixtures.http/listZoneRecords/success.http +17 -17
  219. data/spec/fixtures.http/listZones/success.http +16 -16
  220. data/spec/fixtures.http/method-not-allowed.http +8 -8
  221. data/spec/fixtures.http/notfound-certificate.http +12 -12
  222. data/spec/fixtures.http/notfound-contact.http +10 -10
  223. data/spec/fixtures.http/notfound-delegationSignerRecord.http +11 -0
  224. data/spec/fixtures.http/notfound-domain.http +8 -8
  225. data/spec/fixtures.http/notfound-domainpush.http +8 -8
  226. data/spec/fixtures.http/notfound-emailforward.http +8 -8
  227. data/spec/fixtures.http/notfound-record.http +10 -10
  228. data/spec/fixtures.http/notfound-template.http +10 -10
  229. data/spec/fixtures.http/notfound-webhook.http +8 -8
  230. data/spec/fixtures.http/notfound-whoisprivacy.http +10 -10
  231. data/spec/fixtures.http/notfound-zone.http +10 -10
  232. data/spec/fixtures.http/oauthAccessToken/error-invalid-request.http +12 -12
  233. data/spec/fixtures.http/oauthAccessToken/success.http +16 -16
  234. data/spec/fixtures.http/pages-1of3.http +12 -12
  235. data/spec/fixtures.http/pages-2of3.http +12 -12
  236. data/spec/fixtures.http/pages-3of3.http +12 -12
  237. data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +19 -19
  238. data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +19 -19
  239. data/spec/fixtures.http/registerDomain/error-extended-attributes.http +15 -15
  240. data/spec/fixtures.http/registerDomain/success.http +20 -20
  241. data/spec/fixtures.http/rejectPush/success.http +15 -15
  242. data/spec/fixtures.http/renewDomain/error-tooearly.http +14 -14
  243. data/spec/fixtures.http/renewDomain/success.http +20 -20
  244. data/spec/fixtures.http/response.http +12 -12
  245. data/spec/fixtures.http/restoreDomain/success.http +22 -19
  246. data/spec/fixtures.http/success-with-malformed-json.http +4 -4
  247. data/spec/fixtures.http/transferDomain/error-indnsimple.http +13 -13
  248. data/spec/fixtures.http/transferDomain/error-missing-authcode.http +13 -13
  249. data/spec/fixtures.http/transferDomain/success.http +20 -20
  250. data/spec/fixtures.http/unapplyService/success.http +15 -15
  251. data/spec/fixtures.http/unlinkPrimaryServer/success.http +20 -20
  252. data/spec/fixtures.http/updateContact/success.http +16 -16
  253. data/spec/fixtures.http/updateTemplate/success.http +15 -15
  254. data/spec/fixtures.http/updateZoneNsRecords/success.http +16 -16
  255. data/spec/fixtures.http/updateZoneRecord/success.http +17 -17
  256. data/spec/fixtures.http/validation-error.http +15 -15
  257. data/spec/fixtures.http/whoami/success-account.http +15 -15
  258. data/spec/fixtures.http/whoami/success-user.http +15 -15
  259. data/spec/fixtures.http/whoami/success.http +15 -15
  260. data/spec/support/helpers.rb +0 -2
  261. metadata +14 -14
  262. data/lib/dnsimple/struct/whois_privacy_renewal.rb +0 -30
  263. data/spec/fixtures.http/checkDomainPremiumPrice/error_400_not_a_premium_domain.http +0 -18
  264. data/spec/fixtures.http/checkDomainPremiumPrice/error_400_tld_not_supported.http +0 -18
  265. data/spec/fixtures.http/checkDomainPremiumPrice/success.http +0 -20
  266. data/spec/fixtures.http/getDomainPremiumPrice/failure.http +0 -15
  267. data/spec/fixtures.http/getDomainPremiumPrice/success.http +0 -20
  268. data/spec/fixtures.http/getWhoisPrivacy/success.http +0 -16
  269. data/spec/fixtures.http/notfound-delegationsignerrecord.http +0 -11
  270. data/spec/fixtures.http/renewWhoisPrivacy/success.http +0 -20
  271. data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http +0 -18
  272. data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-not-found.http +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4181725aaf336953ed62dc82cb74fe1d4457880f9fccf3940c817e27ffa559b5
4
- data.tar.gz: 11662d9a7780adbb47599e34a6e820c2b980c0be22ec79985557f4bd1801592c
3
+ metadata.gz: bf5d85da45a3b9f1f9cfdf8eebb6e138f7701b105d3b5e1168374712bf0c962a
4
+ data.tar.gz: 243d214bf5ecc19649eeac0ee2035591702108e0b49588921466ddba787623d6
5
5
  SHA512:
6
- metadata.gz: c4357613ee6e5c1b8d25a89a8ce6d61fa53c3369bf59ff9e33f5fce0fc800f31e5a0f0d4709726de2fb0f0c4bc7ec092a34c238d9b8fca28bdb722ad6cd2462b
7
- data.tar.gz: fa7726f50d6794b34ce537292d50b8050379751942201dad2e61ae246aed2ba5079841140b87ac6bd4494b724aeebc155cc59438f9f9693f69b8dc0c4742357f
6
+ metadata.gz: 529d35b92ffd260c29bd62c0dfe5302112b82620cf77f3b59b69c8bae4d7705a47dee1b09d86af8431f420c56fb916860bee1c6b2718b6441e61d08635823f98
7
+ data.tar.gz: 5a0536f22fb8fe8e0833fad81476c2e92433e349b4c8722c9cc57270644bab5931bea8cf67172f971f886e0b6db35c15e719af4bef20cc61c393423c10bb5dd9
@@ -2,7 +2,10 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main ]
5
+ branches:
6
+ - main
7
+ tags:
8
+ - v*.*.*
6
9
  pull_request:
7
10
  workflow_dispatch:
8
11
 
@@ -11,12 +14,12 @@ concurrency:
11
14
  cancel-in-progress: true
12
15
 
13
16
  jobs:
14
- markdownlint-cli:
17
+ markdown-lint:
15
18
  name: Lint markdown
16
19
  runs-on: ubuntu-latest
17
20
  steps:
18
21
  - name: Checkout Code
19
- uses: actions/checkout@v5
22
+ uses: actions/checkout@v6
20
23
  - name: Run markdownlint-cli
21
24
  uses: nosborn/github-action-markdown-cli@v3.5.0
22
25
  with:
@@ -24,7 +27,8 @@ jobs:
24
27
  config_file: ".markdownlint.yaml"
25
28
 
26
29
  test:
27
- needs: [markdownlint-cli]
30
+ needs:
31
+ - markdown-lint
28
32
  runs-on: ubuntu-latest
29
33
  name: Ruby ${{ matrix.ruby-version }}
30
34
  strategy:
@@ -33,10 +37,11 @@ jobs:
33
37
  - '3.2'
34
38
  - '3.3'
35
39
  - '3.4'
40
+ - '4.0'
36
41
  - 'ruby-head'
37
42
  - 'truffleruby-head'
38
43
  steps:
39
- - uses: actions/checkout@v5
44
+ - uses: actions/checkout@v6
40
45
  - name: Set up Ruby
41
46
  uses: ruby/setup-ruby@v1
42
47
  with:
@@ -1,25 +1,56 @@
1
1
  name: Release
2
2
 
3
3
  on:
4
- push:
5
- tags:
6
- - v*.*.*
4
+ workflow_run:
5
+ workflows:
6
+ - "CI"
7
+ types:
8
+ - completed
7
9
  jobs:
10
+ validate-tag:
11
+ name: Check tag
12
+ 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
+ steps:
17
+ - name: Check out the repository including tags
18
+ uses: actions/checkout@v6
19
+ 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"
8
46
  publish:
9
47
  name: Release to RubyGems
48
+ needs: validate-tag
10
49
  runs-on: ubuntu-latest
50
+ if: ${{ needs.validate-tag.outputs.valid_tag == 'true' && github.event.workflow_run.conclusion == 'success' }}
11
51
 
12
52
  steps:
13
- - name: Wait for tests to succeed
14
- uses: lewagon/wait-on-check-action@v1.4.0
15
- with:
16
- ref: 'refs/heads/main'
17
- running-workflow-name: 'Release to RubyGems'
18
- repo-token: ${{ secrets.GITHUB_TOKEN }}
19
- wait-interval: 10
20
- allowed-conclusions: success
21
-
22
- - uses: actions/checkout@v5
53
+ - uses: actions/checkout@v6
23
54
 
24
55
  - name: Release Gem
25
56
  uses: simplyqio/publish-rubygems-action@2.0.0
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
11
  - name: Checkout repository
12
- uses: actions/checkout@v5
12
+ uses: actions/checkout@v6
13
13
  - name: Sync fixtures
14
14
  run: |
15
15
  TMP_DIR=$(mktemp -d)
data/.rubocop.yml CHANGED
@@ -9,8 +9,11 @@ plugins:
9
9
  - rubocop-rspec
10
10
 
11
11
  AllCops:
12
- TargetRubyVersion: 3.0
12
+ TargetRubyVersion: 3.2
13
13
  Exclude:
14
14
  - '*.gemspec'
15
15
  - 'Rakefile'
16
16
  - 'vendor/**/*'
17
+
18
+ Style/Documentation:
19
+ Enabled: false
@@ -1,13 +1,12 @@
1
- # This file serves as a template for RuboCop configuration. The primary template is maintained in the engineering repository.
2
- # Please ensure that any changes made here are also reflected in the engineering file to maintain consistency.
1
+ # This is the DNSimple organization-wide RuboCop configuration.
2
+ # It defines our unified linting and coding standards for all Ruby projects,
3
+ # in accordance with our Ruby development practices and guidelines.
3
4
  #
4
- # DNSimple Ruby engineering template: https://github.com/dnsimple/dnsimple-engineering/blob/main/templates/ruby/rubocop_dnsimple.yml
5
+ # This template is maintained centrally in the infra-github repository:
6
+ # https://github.com/dnsimple/infra-github/blob/main/workspace/templates/ruby/rubocop_dnsimple.yml
5
7
  #
6
- # For default configurations, refer to: https://github.com/bbatsov/rubocop/blob/master/config/default.yml
7
- #
8
- # Additional References:
9
- # * Ruby Style Guide: https://github.com/bbatsov/ruby-style-guide
10
- # * RuboCop Documentation: https://rubocop.readthedocs.io/
8
+ # For details on RuboCop itself and its configuration options, refer to:
9
+ # https://docs.rubocop.org/rubocop/
11
10
 
12
11
  AllCops:
13
12
  Exclude:
@@ -28,24 +27,16 @@ AllCops:
28
27
  Layout/EndAlignment:
29
28
  EnforcedStyleAlignWith: variable
30
29
 
31
- # [codesmell]
32
30
  Layout/LineLength:
33
31
  Enabled: false
34
- Exclude:
35
- - 'spec/**/*_spec.rb'
36
- - 'test/**/*_test.rb'
37
32
  Max: 100
38
33
 
39
34
  # [codesmell]
40
35
  Lint/SuppressedException:
41
36
  Enabled: false
42
37
 
43
- # [codesmell]
44
38
  Metrics/AbcSize:
45
39
  Enabled: false
46
- Exclude:
47
- - 'spec/**/*_spec.rb'
48
- - 'test/**/*_test.rb'
49
40
 
50
41
  # [codesmell]
51
42
  Metrics/BlockLength:
@@ -58,20 +49,11 @@ Metrics/CyclomaticComplexity:
58
49
  - 'spec/**/*_spec.rb'
59
50
  - 'test/**/*_test.rb'
60
51
 
61
- # [codesmell]
62
52
  Metrics/ClassLength:
63
53
  Enabled: false
64
- Exclude:
65
- - 'spec/**/*_spec.rb'
66
- - 'test/**/*_test.rb'
67
54
 
68
- # [codesmell]
69
55
  Metrics/MethodLength:
70
56
  Enabled: false
71
- Exclude:
72
- - 'spec/**/*_spec.rb'
73
- - 'test/**/*_test.rb'
74
- Max: 10
75
57
 
76
58
  # [codesmell]
77
59
  Metrics/ModuleLength:
@@ -98,7 +80,7 @@ Naming/MemoizedInstanceVariableName:
98
80
  # to use simple ? methods.
99
81
  # Moreover, it's actually more efficient to not-use predicates:
100
82
  # https://github.com/bbatsov/rubocop/issues/3633
101
- Naming/PredicateName:
83
+ Naming/PredicatePrefix:
102
84
  Enabled: false
103
85
 
104
86
  # The team agreed decided to use exception.
@@ -218,12 +200,12 @@ Style/StringLiterals:
218
200
  Style/StringLiteralsInInterpolation:
219
201
  EnforcedStyle: double_quotes
220
202
 
221
- # It's nice to be consistent. The trailing comma also allows easy reordering,
203
+ # Be consistent. The trailing comma also allows easy reordering,
222
204
  # and doesn't cause a diff in Git when you add a line to the bottom.
223
205
  Style/TrailingCommaInArrayLiteral:
224
206
  EnforcedStyleForMultiline: consistent_comma
225
207
 
226
- # It's nice to be consistent. The trailing comma also allows easy reordering,
208
+ # Be consistent. The trailing comma also allows easy reordering,
227
209
  # and doesn't cause a diff in Git when you add a line to the bottom.
228
210
  Style/TrailingCommaInHashLiteral:
229
211
  EnforcedStyleForMultiline: consistent_comma
@@ -255,11 +237,13 @@ Style/WordArray:
255
237
  Layout/CaseIndentation:
256
238
  EnforcedStyle: end
257
239
 
258
- # Double empty lines are useful to separate conceptually different methods
259
- # in the same class or module.
240
+ # This is quite buggy, as it doesn't recognize double lines.
260
241
  Layout/EmptyLines:
261
242
  Enabled: false
262
243
 
244
+ Layout/EmptyLineBetweenDefs:
245
+ NumberOfEmptyLines: [1, 2]
246
+
263
247
  Layout/EmptyLinesAroundBlockBody:
264
248
  Exclude:
265
249
  # RSpec is all made of blocks. Disable this config in RSpec
@@ -267,22 +251,10 @@ Layout/EmptyLinesAroundBlockBody:
267
251
  - 'spec/**/*_spec.rb'
268
252
  - 'test/**/*_test.rb'
269
253
 
270
- # Pick one option for consistency. beginning+ending is the most used approach.
271
- Layout/EmptyLinesAroundClassBody:
272
- EnforcedStyle: empty_lines_except_namespace
273
-
274
254
  # We're ok with it. We use it quite often for method-level rescue statements.
275
255
  Layout/EmptyLinesAroundExceptionHandlingKeywords:
276
256
  Enabled: false
277
257
 
278
- # Pick one option for consistency. beginning+ending is the most used approach.
279
- Layout/EmptyLinesAroundModuleBody:
280
- EnforcedStyle: empty_lines_except_namespace
281
-
282
- # This is quite buggy, as it doesn't recognize double lines.
283
- Layout/EmptyLineBetweenDefs:
284
- Enabled: false
285
-
286
258
  # Multi-line differs from standard indentation, they are indented twice.
287
259
  Layout/FirstArgumentIndentation:
288
260
  IndentationWidth: 4
data/.rubocop_todo.yml CHANGED
@@ -1,12 +1,12 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2023-01-26 12:48:02 UTC using RuboCop version 1.44.1.
3
+ # on 2025-12-27 17:14:14 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: 74
9
+ # Offense count: 90
10
10
  # Configuration parameters: CountAsOne.
11
11
  RSpec/ExampleLength:
12
12
  Max: 17
@@ -22,11 +22,11 @@ RSpec/LeakyConstantDeclaration:
22
22
  RSpec/MessageSpies:
23
23
  EnforcedStyle: receive
24
24
 
25
- # Offense count: 115
25
+ # Offense count: 134
26
26
  RSpec/MultipleExpectations:
27
27
  Max: 15
28
28
 
29
- # Offense count: 372
29
+ # Offense count: 422
30
30
  # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
31
31
  # SupportedStyles: always, named_only
32
32
  RSpec/NamedSubject:
@@ -47,8 +47,3 @@ RSpec/SubjectStub:
47
47
  - 'spec/dnsimple/client/zones_records_spec.rb'
48
48
  - 'spec/dnsimple/client/zones_spec.rb'
49
49
  - 'spec/dnsimple/client_spec.rb'
50
-
51
- # Offense count: 69
52
- # Configuration parameters: AllowedConstants.
53
- Style/Documentation:
54
- Enabled: false