dnsimple 11.1.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +10 -5
- data/.github/workflows/release.yml +44 -13
- data/.github/workflows/sync-test-fixtures.yml +1 -1
- data/.rubocop.yml +4 -1
- data/.rubocop_dnsimple.yml +13 -41
- data/.rubocop_todo.yml +4 -9
- data/CHANGELOG.md +291 -183
- data/CONTRIBUTING.md +6 -40
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +64 -40
- data/RELEASING.md +67 -0
- data/dnsimple.gemspec +1 -1
- data/lib/dnsimple/client/accounts.rb +1 -3
- data/lib/dnsimple/client/billing.rb +2 -4
- data/lib/dnsimple/client/certificates.rb +0 -2
- data/lib/dnsimple/client/clients.rb +4 -40
- data/lib/dnsimple/client/contacts.rb +17 -19
- data/lib/dnsimple/client/dns_analytics.rb +2 -4
- data/lib/dnsimple/client/domains.rb +13 -15
- data/lib/dnsimple/client/domains_delegation_signer_records.rb +18 -20
- data/lib/dnsimple/client/domains_dnssec.rb +9 -11
- data/lib/dnsimple/client/domains_email_forwards.rb +18 -20
- data/lib/dnsimple/client/domains_pushes.rb +13 -15
- data/lib/dnsimple/client/domains_research.rb +28 -0
- data/lib/dnsimple/client/identity.rb +4 -9
- data/lib/dnsimple/client/oauth.rb +1 -3
- data/lib/dnsimple/client/registrar.rb +45 -47
- data/lib/dnsimple/client/registrar_auto_renewal.rb +6 -8
- data/lib/dnsimple/client/registrar_delegation.rb +14 -16
- data/lib/dnsimple/client/registrar_registrant_changes.rb +14 -16
- data/lib/dnsimple/client/registrar_transfer_lock.rb +9 -11
- data/lib/dnsimple/client/registrar_whois_privacy.rb +6 -48
- data/lib/dnsimple/client/services.rb +4 -6
- data/lib/dnsimple/client/services_domains.rb +12 -14
- data/lib/dnsimple/client/templates.rb +17 -19
- data/lib/dnsimple/client/templates_domains.rb +4 -6
- data/lib/dnsimple/client/templates_records.rb +18 -20
- data/lib/dnsimple/client/tlds.rb +6 -8
- data/lib/dnsimple/client/vanity_name_servers.rb +0 -2
- data/lib/dnsimple/client/webhooks.rb +11 -13
- data/lib/dnsimple/client/zones.rb +16 -18
- data/lib/dnsimple/client/zones_distributions.rb +4 -6
- data/lib/dnsimple/client/zones_records.rb +29 -31
- data/lib/dnsimple/client.rb +22 -24
- data/lib/dnsimple/default.rb +0 -4
- data/lib/dnsimple/error.rb +0 -6
- data/lib/dnsimple/extra.rb +4 -6
- data/lib/dnsimple/options.rb +1 -7
- data/lib/dnsimple/response.rb +4 -13
- data/lib/dnsimple/struct/account.rb +0 -2
- data/lib/dnsimple/struct/certificate.rb +0 -2
- data/lib/dnsimple/struct/certificate_bundle.rb +0 -2
- data/lib/dnsimple/struct/certificate_purchase.rb +0 -2
- data/lib/dnsimple/struct/certificate_renewal.rb +0 -2
- data/lib/dnsimple/struct/charge.rb +4 -8
- data/lib/dnsimple/struct/collaborator.rb +0 -2
- data/lib/dnsimple/struct/contact.rb +0 -2
- data/lib/dnsimple/struct/delegation_signer_record.rb +0 -2
- data/lib/dnsimple/struct/dns_analytics.rb +0 -2
- data/lib/dnsimple/struct/dnssec.rb +0 -2
- data/lib/dnsimple/struct/domain.rb +0 -2
- data/lib/dnsimple/struct/domain_check.rb +0 -2
- data/lib/dnsimple/struct/domain_premium_price.rb +0 -2
- data/lib/dnsimple/struct/domain_price.rb +0 -2
- data/lib/dnsimple/struct/domain_push.rb +0 -2
- data/lib/dnsimple/struct/domain_registration.rb +0 -2
- data/lib/dnsimple/struct/domain_renewal.rb +0 -2
- data/lib/dnsimple/struct/domain_research_status.rb +19 -0
- data/lib/dnsimple/struct/domain_restore.rb +0 -2
- data/lib/dnsimple/struct/domain_transfer.rb +0 -2
- data/lib/dnsimple/struct/email_forward.rb +0 -2
- data/lib/dnsimple/struct/extended_attribute.rb +0 -4
- data/lib/dnsimple/struct/oauth_token.rb +0 -2
- data/lib/dnsimple/struct/registrant_change.rb +0 -2
- data/lib/dnsimple/struct/registrant_change_check.rb +0 -2
- data/lib/dnsimple/struct/service.rb +0 -4
- data/lib/dnsimple/struct/template.rb +0 -2
- data/lib/dnsimple/struct/template_record.rb +0 -2
- data/lib/dnsimple/struct/tld.rb +0 -2
- data/lib/dnsimple/struct/transfer_lock.rb +0 -2
- data/lib/dnsimple/struct/user.rb +0 -2
- data/lib/dnsimple/struct/vanity_name_server.rb +0 -2
- data/lib/dnsimple/struct/webhook.rb +0 -2
- data/lib/dnsimple/struct/whoami.rb +2 -4
- data/lib/dnsimple/struct/whois_privacy.rb +0 -2
- data/lib/dnsimple/struct/zone.rb +0 -2
- data/lib/dnsimple/struct/zone_distribution.rb +0 -2
- data/lib/dnsimple/struct/zone_file.rb +0 -2
- data/lib/dnsimple/struct/zone_record.rb +0 -2
- data/lib/dnsimple/struct/zone_record_id.rb +0 -2
- data/lib/dnsimple/struct/zone_records_batch_change.rb +0 -2
- data/lib/dnsimple/struct.rb +1 -3
- data/lib/dnsimple/version.rb +1 -3
- data/lib/dnsimple.rb +1 -3
- data/spec/dnsimple/client/client_service_spec.rb +12 -10
- data/spec/dnsimple/client/domains_research_spec.rb +38 -0
- data/spec/dnsimple/client/oauth_spec.rb +6 -6
- data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +0 -82
- data/spec/fixtures.http/acceptPush/success.http +15 -15
- data/spec/fixtures.http/accounts/success-account.http +20 -20
- data/spec/fixtures.http/accounts/success-user.http +21 -21
- data/spec/fixtures.http/activateZoneService/success.http +16 -16
- data/spec/fixtures.http/appliedServices/success.http +19 -19
- data/spec/fixtures.http/applyService/success.http +15 -15
- data/spec/fixtures.http/applyTemplate/success.http +13 -13
- data/spec/fixtures.http/authorizeDomainTransferOut/success.http +13 -13
- data/spec/fixtures.http/badgateway.http +5 -5
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +16 -16
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +3 -3
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +3 -3
- data/spec/fixtures.http/batchChangeZoneRecords/success.http +16 -16
- data/spec/fixtures.http/cancelDomainTransfer/success.http +17 -17
- data/spec/fixtures.http/changeDomainDelegation/success.http +15 -15
- data/spec/fixtures.http/changeDomainDelegationFromVanity/success.http +15 -15
- data/spec/fixtures.http/changeDomainDelegationToVanity/success.http +17 -17
- data/spec/fixtures.http/checkDomain/success.http +15 -15
- data/spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http +3 -3
- data/spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http +3 -3
- data/spec/fixtures.http/checkRegistrantChange/success.http +15 -15
- data/spec/fixtures.http/checkZoneDistribution/error.http +17 -17
- data/spec/fixtures.http/checkZoneDistribution/failure.http +17 -17
- data/spec/fixtures.http/checkZoneDistribution/success.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/error.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/failure.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/success.http +17 -17
- data/spec/fixtures.http/createContact/created.http +16 -16
- data/spec/fixtures.http/createContact/error-validation-errors.http +15 -15
- data/spec/fixtures.http/createDelegationSignerRecord/created.http +17 -17
- data/spec/fixtures.http/createDelegationSignerRecord/validation-error.http +15 -15
- data/spec/fixtures.http/createDomain/created.http +19 -19
- data/spec/fixtures.http/createEmailForward/created.http +21 -21
- data/spec/fixtures.http/createPrimaryServer/created.http +20 -20
- data/spec/fixtures.http/createRegistrantChange/success.http +14 -14
- data/spec/fixtures.http/createSecondaryZone/created.http +20 -20
- data/spec/fixtures.http/createTemplate/created.http +15 -15
- data/spec/fixtures.http/createTemplateRecord/created.http +16 -16
- data/spec/fixtures.http/createWebhook/created.http +13 -13
- data/spec/fixtures.http/createZoneRecord/created-apex.http +13 -13
- data/spec/fixtures.http/createZoneRecord/created.http +13 -13
- data/spec/fixtures.http/deactivateZoneService/success.http +16 -16
- data/spec/fixtures.http/deleteContact/error-contact-in-use.http +15 -15
- data/spec/fixtures.http/deleteContact/success.http +13 -13
- data/spec/fixtures.http/deleteDelegationSignerRecord/success.http +15 -15
- data/spec/fixtures.http/deleteDomain/success.http +11 -11
- data/spec/fixtures.http/deleteEmailForward/success.http +18 -18
- data/spec/fixtures.http/deleteRegistrantChange/success.http +13 -13
- data/spec/fixtures.http/deleteRegistrantChange/success_async.http +3 -3
- data/spec/fixtures.http/deleteTemplate/success.http +13 -13
- data/spec/fixtures.http/deleteTemplateRecord/success.http +13 -13
- data/spec/fixtures.http/deleteWebhook/success.http +13 -13
- data/spec/fixtures.http/deleteZoneRecord/success.http +11 -11
- data/spec/fixtures.http/disableDnssec/not-enabled.http +15 -15
- data/spec/fixtures.http/disableDnssec/success.http +15 -15
- data/spec/fixtures.http/disableDomainAutoRenewal/success.http +13 -13
- data/spec/fixtures.http/disableDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/disableVanityNameServers/success.http +15 -15
- data/spec/fixtures.http/disableWhoisPrivacy/success.http +16 -16
- data/spec/fixtures.http/dnsAnalytics/success.http +17 -17
- data/spec/fixtures.http/downloadCertificate/success.http +19 -19
- data/spec/fixtures.http/enableDnssec/success.http +18 -18
- data/spec/fixtures.http/enableDomainAutoRenewal/success.http +13 -13
- data/spec/fixtures.http/enableDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/enableVanityNameServers/success.http +17 -17
- data/spec/fixtures.http/enableWhoisPrivacy/created.http +16 -16
- data/spec/fixtures.http/enableWhoisPrivacy/success.http +16 -16
- data/spec/fixtures.http/getCertificate/success.http +19 -19
- data/spec/fixtures.http/getCertificatePrivateKey/success.http +20 -20
- data/spec/fixtures.http/getContact/success.http +16 -16
- data/spec/fixtures.http/getDelegationSignerRecord/success.http +17 -17
- data/spec/fixtures.http/getDnssec/success.http +18 -18
- data/spec/fixtures.http/getDomain/success.http +19 -19
- data/spec/fixtures.http/getDomainDelegation/success-empty.http +15 -15
- data/spec/fixtures.http/getDomainDelegation/success.http +15 -15
- data/spec/fixtures.http/getDomainPrices/failure.http +18 -18
- data/spec/fixtures.http/getDomainPrices/success.http +21 -21
- data/spec/fixtures.http/getDomainRegistration/success.http +20 -20
- data/spec/fixtures.http/getDomainRenewal/success.http +20 -20
- data/spec/fixtures.http/getDomainRestore/success.http +22 -22
- data/spec/fixtures.http/getDomainTransfer/success.http +19 -19
- data/spec/fixtures.http/getDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/getDomainsResearchStatus/error-validation.http +15 -0
- data/spec/fixtures.http/getDomainsResearchStatus/success-available.http +16 -0
- data/spec/fixtures.http/getDomainsResearchStatus/success-unavailable.http +16 -0
- data/spec/fixtures.http/getDomainsResearchStatus/success-unsupported-tld.http +16 -0
- data/spec/fixtures.http/getEmailForward/success.http +21 -21
- data/spec/fixtures.http/getPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/getRegistrantChange/success.http +15 -15
- data/spec/fixtures.http/getService/success.http +16 -16
- data/spec/fixtures.http/getTemplate/success.http +15 -15
- data/spec/fixtures.http/getTemplateRecord/success.http +16 -16
- data/spec/fixtures.http/getTld/success.http +20 -20
- data/spec/fixtures.http/getTldExtendedAttributes/success-attributes.http +15 -15
- data/spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http +15 -15
- data/spec/fixtures.http/getTldExtendedAttributes/success.http +15 -15
- data/spec/fixtures.http/getWebhook/success.http +13 -13
- data/spec/fixtures.http/getZone/success.http +16 -16
- data/spec/fixtures.http/getZoneFile/success.http +17 -17
- data/spec/fixtures.http/getZoneRecord/success.http +17 -17
- data/spec/fixtures.http/initiatePush/success.http +17 -17
- data/spec/fixtures.http/issueLetsencryptCertificate/success.http +17 -17
- data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +17 -17
- data/spec/fixtures.http/linkPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/listAccounts/success-account.http +20 -20
- data/spec/fixtures.http/listAccounts/success-user.http +20 -20
- data/spec/fixtures.http/listCertificates/success.http +19 -19
- data/spec/fixtures.http/listCharges/fail-400-bad-filter.http +9 -9
- data/spec/fixtures.http/listCharges/fail-403.http +9 -9
- data/spec/fixtures.http/listCharges/success.http +9 -9
- data/spec/fixtures.http/listContacts/success.http +16 -16
- data/spec/fixtures.http/listDelegationSignerRecords/success.http +17 -17
- data/spec/fixtures.http/listDomains/success.http +19 -19
- data/spec/fixtures.http/listEmailForwards/success.http +14 -14
- data/spec/fixtures.http/listPrimaryServers/success.http +20 -20
- data/spec/fixtures.http/listPushes/success.http +17 -17
- data/spec/fixtures.http/listRegistrantChanges/success.http +15 -15
- data/spec/fixtures.http/listServices/success.http +17 -17
- data/spec/fixtures.http/listTemplateRecords/success.http +16 -16
- data/spec/fixtures.http/listTemplates/success.http +15 -15
- data/spec/fixtures.http/listTlds/success.http +20 -20
- data/spec/fixtures.http/listWebhooks/success.http +13 -13
- data/spec/fixtures.http/listZoneRecords/success.http +17 -17
- data/spec/fixtures.http/listZones/success.http +16 -16
- data/spec/fixtures.http/method-not-allowed.http +8 -8
- data/spec/fixtures.http/notfound-certificate.http +12 -12
- data/spec/fixtures.http/notfound-contact.http +10 -10
- data/spec/fixtures.http/notfound-delegationSignerRecord.http +8 -8
- data/spec/fixtures.http/notfound-domain.http +8 -8
- data/spec/fixtures.http/notfound-domainpush.http +8 -8
- data/spec/fixtures.http/notfound-emailforward.http +8 -8
- data/spec/fixtures.http/notfound-record.http +10 -10
- data/spec/fixtures.http/notfound-template.http +10 -10
- data/spec/fixtures.http/notfound-webhook.http +8 -8
- data/spec/fixtures.http/notfound-whoisprivacy.http +10 -10
- data/spec/fixtures.http/notfound-zone.http +10 -10
- data/spec/fixtures.http/oauthAccessToken/error-invalid-request.http +12 -12
- data/spec/fixtures.http/oauthAccessToken/success.http +16 -16
- data/spec/fixtures.http/pages-1of3.http +12 -12
- data/spec/fixtures.http/pages-2of3.http +12 -12
- data/spec/fixtures.http/pages-3of3.http +12 -12
- data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +19 -19
- data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +19 -19
- data/spec/fixtures.http/registerDomain/error-extended-attributes.http +15 -15
- data/spec/fixtures.http/registerDomain/success.http +20 -20
- data/spec/fixtures.http/rejectPush/success.http +15 -15
- data/spec/fixtures.http/renewDomain/error-tooearly.http +14 -14
- data/spec/fixtures.http/renewDomain/success.http +20 -20
- data/spec/fixtures.http/response.http +12 -12
- data/spec/fixtures.http/restoreDomain/success.http +22 -22
- data/spec/fixtures.http/success-with-malformed-json.http +4 -4
- data/spec/fixtures.http/transferDomain/error-indnsimple.http +13 -13
- data/spec/fixtures.http/transferDomain/error-missing-authcode.http +13 -13
- data/spec/fixtures.http/transferDomain/success.http +20 -20
- data/spec/fixtures.http/unapplyService/success.http +15 -15
- data/spec/fixtures.http/unlinkPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/updateContact/success.http +16 -16
- data/spec/fixtures.http/updateTemplate/success.http +15 -15
- data/spec/fixtures.http/updateZoneNsRecords/success.http +16 -16
- data/spec/fixtures.http/updateZoneRecord/success.http +17 -17
- data/spec/fixtures.http/validation-error.http +15 -15
- data/spec/fixtures.http/whoami/success-account.http +15 -15
- data/spec/fixtures.http/whoami/success-user.http +15 -15
- data/spec/fixtures.http/whoami/success.http +15 -15
- data/spec/support/helpers.rb +0 -2
- metadata +14 -13
- data/lib/dnsimple/struct/whois_privacy_renewal.rb +0 -30
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_not_a_premium_domain.http +0 -18
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_tld_not_supported.http +0 -18
- data/spec/fixtures.http/checkDomainPremiumPrice/success.http +0 -20
- data/spec/fixtures.http/getDomainPremiumPrice/failure.http +0 -15
- data/spec/fixtures.http/getDomainPremiumPrice/success.http +0 -20
- data/spec/fixtures.http/getWhoisPrivacy/success.http +0 -16
- data/spec/fixtures.http/renewWhoisPrivacy/success.http +0 -20
- data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http +0 -18
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 371112dc13ce900d770aa434d297b19f75892d3a90a3b2f4292ddffb88574c3f
|
|
4
|
+
data.tar.gz: c312bc89ea319f11c94bf3ed157c663264d206480033076c9b122a5d31dee2a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40334df4d23d15a5a70fde859aacfaffe0407f71fb8cde5524a03b4be98b4df710d71b8eaa7fb3c8484c38fb7845b3b54c95326c84328d44524d771700a39f39
|
|
7
|
+
data.tar.gz: 190c114666115887b7724778e72ad511a204a084f06d30494fed5cc47f8a4ca76a4465e1e8d3b44773b71b55105bdfcfca00c38aaf50a20beb714926e2fd2b5f
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -2,7 +2,10 @@ name: CI
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches:
|
|
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
|
-
|
|
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@
|
|
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:
|
|
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@
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
-
|
|
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
|
-
-
|
|
14
|
-
uses: lewagon/wait-on-check-action@v1.4.1
|
|
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
|
data/.rubocop.yml
CHANGED
data/.rubocop_dnsimple.yml
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
# This
|
|
2
|
-
#
|
|
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
|
-
#
|
|
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
|
|
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:
|
|
@@ -218,12 +200,12 @@ Style/StringLiterals:
|
|
|
218
200
|
Style/StringLiteralsInInterpolation:
|
|
219
201
|
EnforcedStyle: double_quotes
|
|
220
202
|
|
|
221
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
|
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:
|
|
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:
|
|
25
|
+
# Offense count: 134
|
|
26
26
|
RSpec/MultipleExpectations:
|
|
27
27
|
Max: 15
|
|
28
28
|
|
|
29
|
-
# Offense count:
|
|
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
|