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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -3
- data/.github/workflows/release.yml +14 -41
- data/.github/workflows/sync-test-fixtures.yml +2 -2
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +3 -41
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/Rakefile +5 -3
- data/dnsimple.gemspec +2 -1
- data/lib/dnsimple/version.rb +1 -1
- data/test/dnsimple/client/accounts_test.rb +33 -0
- data/test/dnsimple/client/billing_test.rb +106 -0
- data/test/dnsimple/client/certificates_test.rb +506 -0
- data/test/dnsimple/client/client_service_test.rb +32 -0
- data/test/dnsimple/client/contacts_test.rb +231 -0
- data/test/dnsimple/client/dns_analytics_test.rb +102 -0
- data/test/dnsimple/client/domains_delegation_signer_records_test.rb +213 -0
- data/test/dnsimple/client/domains_dnssec_test.rb +109 -0
- data/test/dnsimple/client/domains_email_forwards_test.rb +209 -0
- data/test/dnsimple/client/domains_pushes_test.rb +180 -0
- data/test/dnsimple/client/domains_research_test.rb +40 -0
- data/test/dnsimple/client/domains_test.rb +221 -0
- data/test/dnsimple/client/identity_test.rb +52 -0
- data/test/dnsimple/client/oauth_test.rb +71 -0
- data/test/dnsimple/client/registrar_auto_renewal_test.rb +77 -0
- data/test/dnsimple/client/registrar_delegation_test.rb +109 -0
- data/test/dnsimple/client/registrar_test.rb +615 -0
- data/test/dnsimple/client/registrar_transfer_lock_test.rb +113 -0
- data/test/dnsimple/client/registrar_whois_privacy_test.rb +92 -0
- data/test/dnsimple/client/services_domains_test.rb +119 -0
- data/test/dnsimple/client/services_test.rb +126 -0
- data/test/dnsimple/client/templates_domains_test.rb +32 -0
- data/test/dnsimple/client/templates_records_test.rb +239 -0
- data/test/dnsimple/client/templates_test.rb +224 -0
- data/test/dnsimple/client/tlds_test.rb +180 -0
- data/test/dnsimple/client/vanity_name_servers_test.rb +58 -0
- data/test/dnsimple/client/webhooks_test.rb +149 -0
- data/test/dnsimple/client/zones_distributions_test.rb +136 -0
- data/test/dnsimple/client/zones_records_test.rb +403 -0
- data/test/dnsimple/client/zones_test.rb +271 -0
- data/test/dnsimple/client_test.rb +210 -0
- data/test/dnsimple/extra_test.rb +38 -0
- data/test/dnsimple/options/base_test.rb +23 -0
- data/test/dnsimple/options/list_options_test.rb +95 -0
- data/test/test_helper.rb +35 -0
- metadata +216 -205
- data/.rspec +0 -1
- data/spec/dnsimple/client/accounts_spec.rb +0 -33
- data/spec/dnsimple/client/billing_spec.rb +0 -101
- data/spec/dnsimple/client/certificates_spec.rb +0 -452
- data/spec/dnsimple/client/client_service_spec.rb +0 -41
- data/spec/dnsimple/client/contacts_spec.rb +0 -228
- data/spec/dnsimple/client/dns_analytics_spec.rb +0 -84
- data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +0 -212
- data/spec/dnsimple/client/domains_dnssec_spec.rb +0 -124
- data/spec/dnsimple/client/domains_email_forwards_spec.rb +0 -210
- data/spec/dnsimple/client/domains_pushes_spec.rb +0 -164
- data/spec/dnsimple/client/domains_research_spec.rb +0 -38
- data/spec/dnsimple/client/domains_spec.rb +0 -206
- data/spec/dnsimple/client/identity_spec.rb +0 -58
- data/spec/dnsimple/client/oauth_spec.rb +0 -82
- data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +0 -82
- data/spec/dnsimple/client/registrar_delegation_spec.rb +0 -109
- data/spec/dnsimple/client/registrar_spec.rb +0 -627
- data/spec/dnsimple/client/registrar_transfer_lock_spec.rb +0 -118
- data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +0 -94
- data/spec/dnsimple/client/services_domains_spec.rb +0 -115
- data/spec/dnsimple/client/services_spec.rb +0 -111
- data/spec/dnsimple/client/templates_domains_spec.rb +0 -34
- data/spec/dnsimple/client/templates_records_spec.rb +0 -228
- data/spec/dnsimple/client/templates_spec.rb +0 -218
- data/spec/dnsimple/client/tlds_spec.rb +0 -163
- data/spec/dnsimple/client/vanity_name_servers_spec.rb +0 -56
- data/spec/dnsimple/client/webhooks_spec.rb +0 -150
- data/spec/dnsimple/client/zones_distributions_spec.rb +0 -137
- data/spec/dnsimple/client/zones_records_spec.rb +0 -414
- data/spec/dnsimple/client/zones_spec.rb +0 -261
- data/spec/dnsimple/client_spec.rb +0 -225
- data/spec/dnsimple/extra_spec.rb +0 -48
- data/spec/dnsimple/options/base_spec.rb +0 -24
- data/spec/dnsimple/options/list_options_spec.rb +0 -102
- data/spec/spec_helper.rb +0 -17
- data/spec/support/helpers.rb +0 -15
- data/spec/support/webmock.rb +0 -13
- /data/{spec → test}/fixtures.http/acceptPush/success.http +0 -0
- /data/{spec → test}/fixtures.http/accounts/success-account.http +0 -0
- /data/{spec → test}/fixtures.http/accounts/success-user.http +0 -0
- /data/{spec → test}/fixtures.http/activateZoneService/success.http +0 -0
- /data/{spec → test}/fixtures.http/appliedServices/success.http +0 -0
- /data/{spec → test}/fixtures.http/applyService/success.http +0 -0
- /data/{spec → test}/fixtures.http/applyTemplate/success.http +0 -0
- /data/{spec → test}/fixtures.http/authorizeDomainTransferOut/success.http +0 -0
- /data/{spec → test}/fixtures.http/badgateway.http +0 -0
- /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +0 -0
- /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +0 -0
- /data/{spec → test}/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +0 -0
- /data/{spec → test}/fixtures.http/batchChangeZoneRecords/success.http +0 -0
- /data/{spec → test}/fixtures.http/cancelDomainTransfer/success.http +0 -0
- /data/{spec → test}/fixtures.http/changeDomainDelegation/success.http +0 -0
- /data/{spec → test}/fixtures.http/changeDomainDelegationFromVanity/success.http +0 -0
- /data/{spec → test}/fixtures.http/changeDomainDelegationToVanity/success.http +0 -0
- /data/{spec → test}/fixtures.http/checkDomain/success.http +0 -0
- /data/{spec → test}/fixtures.http/checkRegistrantChange/error-contactnotfound.http +0 -0
- /data/{spec → test}/fixtures.http/checkRegistrantChange/error-domainnotfound.http +0 -0
- /data/{spec → test}/fixtures.http/checkRegistrantChange/success.http +0 -0
- /data/{spec → test}/fixtures.http/checkZoneDistribution/error.http +0 -0
- /data/{spec → test}/fixtures.http/checkZoneDistribution/failure.http +0 -0
- /data/{spec → test}/fixtures.http/checkZoneDistribution/success.http +0 -0
- /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/error.http +0 -0
- /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/failure.http +0 -0
- /data/{spec → test}/fixtures.http/checkZoneRecordDistribution/success.http +0 -0
- /data/{spec → test}/fixtures.http/createContact/created.http +0 -0
- /data/{spec → test}/fixtures.http/createContact/error-validation-errors.http +0 -0
- /data/{spec → test}/fixtures.http/createDelegationSignerRecord/created.http +0 -0
- /data/{spec → test}/fixtures.http/createDelegationSignerRecord/validation-error.http +0 -0
- /data/{spec → test}/fixtures.http/createDomain/created.http +0 -0
- /data/{spec → test}/fixtures.http/createEmailForward/created.http +0 -0
- /data/{spec → test}/fixtures.http/createPrimaryServer/created.http +0 -0
- /data/{spec → test}/fixtures.http/createRegistrantChange/success.http +0 -0
- /data/{spec → test}/fixtures.http/createSecondaryZone/created.http +0 -0
- /data/{spec → test}/fixtures.http/createTemplate/created.http +0 -0
- /data/{spec → test}/fixtures.http/createTemplateRecord/created.http +0 -0
- /data/{spec → test}/fixtures.http/createWebhook/created.http +0 -0
- /data/{spec → test}/fixtures.http/createZoneRecord/created-apex.http +0 -0
- /data/{spec → test}/fixtures.http/createZoneRecord/created.http +0 -0
- /data/{spec → test}/fixtures.http/deactivateZoneService/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteContact/error-contact-in-use.http +0 -0
- /data/{spec → test}/fixtures.http/deleteContact/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteDelegationSignerRecord/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteDomain/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteEmailForward/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteRegistrantChange/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteRegistrantChange/success_async.http +0 -0
- /data/{spec → test}/fixtures.http/deleteTemplate/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteTemplateRecord/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteWebhook/success.http +0 -0
- /data/{spec → test}/fixtures.http/deleteZoneRecord/success.http +0 -0
- /data/{spec → test}/fixtures.http/disableDnssec/not-enabled.http +0 -0
- /data/{spec → test}/fixtures.http/disableDnssec/success.http +0 -0
- /data/{spec → test}/fixtures.http/disableDomainAutoRenewal/success.http +0 -0
- /data/{spec → test}/fixtures.http/disableDomainTransferLock/success.http +0 -0
- /data/{spec → test}/fixtures.http/disableVanityNameServers/success.http +0 -0
- /data/{spec → test}/fixtures.http/disableWhoisPrivacy/success.http +0 -0
- /data/{spec → test}/fixtures.http/dnsAnalytics/success.http +0 -0
- /data/{spec → test}/fixtures.http/downloadCertificate/success.http +0 -0
- /data/{spec → test}/fixtures.http/enableDnssec/success.http +0 -0
- /data/{spec → test}/fixtures.http/enableDomainAutoRenewal/success.http +0 -0
- /data/{spec → test}/fixtures.http/enableDomainTransferLock/success.http +0 -0
- /data/{spec → test}/fixtures.http/enableVanityNameServers/success.http +0 -0
- /data/{spec → test}/fixtures.http/enableWhoisPrivacy/created.http +0 -0
- /data/{spec → test}/fixtures.http/enableWhoisPrivacy/success.http +0 -0
- /data/{spec → test}/fixtures.http/getCertificate/success.http +0 -0
- /data/{spec → test}/fixtures.http/getCertificatePrivateKey/success.http +0 -0
- /data/{spec → test}/fixtures.http/getContact/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDelegationSignerRecord/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDnssec/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomain/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainDelegation/success-empty.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainDelegation/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainPrices/failure.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainPrices/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainRegistration/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainRenewal/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainRestore/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainTransfer/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainTransferLock/success.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainsResearchStatus/error-validation.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-available.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-unavailable.http +0 -0
- /data/{spec → test}/fixtures.http/getDomainsResearchStatus/success-unsupported-tld.http +0 -0
- /data/{spec → test}/fixtures.http/getEmailForward/success.http +0 -0
- /data/{spec → test}/fixtures.http/getPrimaryServer/success.http +0 -0
- /data/{spec → test}/fixtures.http/getRegistrantChange/success.http +0 -0
- /data/{spec → test}/fixtures.http/getService/success.http +0 -0
- /data/{spec → test}/fixtures.http/getTemplate/success.http +0 -0
- /data/{spec → test}/fixtures.http/getTemplateRecord/success.http +0 -0
- /data/{spec → test}/fixtures.http/getTld/success.http +0 -0
- /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success-attributes.http +0 -0
- /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success-noattributes.http +0 -0
- /data/{spec → test}/fixtures.http/getTldExtendedAttributes/success.http +0 -0
- /data/{spec → test}/fixtures.http/getWebhook/success.http +0 -0
- /data/{spec → test}/fixtures.http/getZone/success.http +0 -0
- /data/{spec → test}/fixtures.http/getZoneFile/success.http +0 -0
- /data/{spec → test}/fixtures.http/getZoneRecord/success.http +0 -0
- /data/{spec → test}/fixtures.http/initiatePush/success.http +0 -0
- /data/{spec → test}/fixtures.http/issueLetsencryptCertificate/success.http +0 -0
- /data/{spec → test}/fixtures.http/issueRenewalLetsencryptCertificate/success.http +0 -0
- /data/{spec → test}/fixtures.http/linkPrimaryServer/success.http +0 -0
- /data/{spec → test}/fixtures.http/listAccounts/success-account.http +0 -0
- /data/{spec → test}/fixtures.http/listAccounts/success-user.http +0 -0
- /data/{spec → test}/fixtures.http/listCertificates/success.http +0 -0
- /data/{spec → test}/fixtures.http/listCharges/fail-400-bad-filter.http +0 -0
- /data/{spec → test}/fixtures.http/listCharges/fail-403.http +0 -0
- /data/{spec → test}/fixtures.http/listCharges/success.http +0 -0
- /data/{spec → test}/fixtures.http/listContacts/success.http +0 -0
- /data/{spec → test}/fixtures.http/listDelegationSignerRecords/success.http +0 -0
- /data/{spec → test}/fixtures.http/listDomains/success.http +0 -0
- /data/{spec → test}/fixtures.http/listEmailForwards/success.http +0 -0
- /data/{spec → test}/fixtures.http/listPrimaryServers/success.http +0 -0
- /data/{spec → test}/fixtures.http/listPushes/success.http +0 -0
- /data/{spec → test}/fixtures.http/listRegistrantChanges/success.http +0 -0
- /data/{spec → test}/fixtures.http/listServices/success.http +0 -0
- /data/{spec → test}/fixtures.http/listTemplateRecords/success.http +0 -0
- /data/{spec → test}/fixtures.http/listTemplates/success.http +0 -0
- /data/{spec → test}/fixtures.http/listTlds/success.http +0 -0
- /data/{spec → test}/fixtures.http/listWebhooks/success.http +0 -0
- /data/{spec → test}/fixtures.http/listZoneRecords/success.http +0 -0
- /data/{spec → test}/fixtures.http/listZones/success.http +0 -0
- /data/{spec → test}/fixtures.http/method-not-allowed.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-certificate.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-contact.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-delegationSignerRecord.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-domain.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-domainpush.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-emailforward.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-record.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-template.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-webhook.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-whoisprivacy.http +0 -0
- /data/{spec → test}/fixtures.http/notfound-zone.http +0 -0
- /data/{spec → test}/fixtures.http/oauthAccessToken/error-invalid-request.http +0 -0
- /data/{spec → test}/fixtures.http/oauthAccessToken/success.http +0 -0
- /data/{spec → test}/fixtures.http/pages-1of3.http +0 -0
- /data/{spec → test}/fixtures.http/pages-2of3.http +0 -0
- /data/{spec → test}/fixtures.http/pages-3of3.http +0 -0
- /data/{spec → test}/fixtures.http/purchaseLetsencryptCertificate/success.http +0 -0
- /data/{spec → test}/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +0 -0
- /data/{spec → test}/fixtures.http/registerDomain/error-extended-attributes.http +0 -0
- /data/{spec → test}/fixtures.http/registerDomain/success.http +0 -0
- /data/{spec → test}/fixtures.http/rejectPush/success.http +0 -0
- /data/{spec → test}/fixtures.http/renewDomain/error-tooearly.http +0 -0
- /data/{spec → test}/fixtures.http/renewDomain/success.http +0 -0
- /data/{spec → test}/fixtures.http/response.http +0 -0
- /data/{spec → test}/fixtures.http/restoreDomain/success.http +0 -0
- /data/{spec → test}/fixtures.http/success-with-malformed-json.http +0 -0
- /data/{spec → test}/fixtures.http/transferDomain/error-indnsimple.http +0 -0
- /data/{spec → test}/fixtures.http/transferDomain/error-missing-authcode.http +0 -0
- /data/{spec → test}/fixtures.http/transferDomain/success.http +0 -0
- /data/{spec → test}/fixtures.http/unapplyService/success.http +0 -0
- /data/{spec → test}/fixtures.http/unlinkPrimaryServer/success.http +0 -0
- /data/{spec → test}/fixtures.http/updateContact/success.http +0 -0
- /data/{spec → test}/fixtures.http/updateTemplate/success.http +0 -0
- /data/{spec → test}/fixtures.http/updateZoneNsRecords/success.http +0 -0
- /data/{spec → test}/fixtures.http/updateZoneRecord/success.http +0 -0
- /data/{spec → test}/fixtures.http/validation-error.http +0 -0
- /data/{spec → test}/fixtures.http/whoami/success-account.http +0 -0
- /data/{spec → test}/fixtures.http/whoami/success-user.http +0 -0
- /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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aba3fa999d47316cbc09c4084e223279a1fea0b0694f47fae6ad439aea1eba61
|
|
4
|
+
data.tar.gz: 9ecf0f9812b057a8f091ff7dbeedc0978b4adc167f470e33883c9562699d1625
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e30070f4e8fbbea5ccba3118edaf80282ca77edfe96010d10f94a299dbd33f18866c8119abcb1a8ea057b2a65a04ac979de4bc652d5aba0c060e6d06c9cfd4f
|
|
7
|
+
data.tar.gz: 710dd46a4f23519e218c7e9e83c06043e605dcf7fdb5b203088b366e2b23db47697003d3d8ad4b2cae9ab501626c1923bb46eba84e781753c467925181a13517
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
- completed
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*.*.*
|
|
7
|
+
|
|
9
8
|
jobs:
|
|
10
|
-
|
|
11
|
-
name:
|
|
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:
|
|
18
|
-
uses:
|
|
13
|
+
- name: Wait for CI to pass
|
|
14
|
+
uses: lewagon/wait-on-check-action@v1.5.0
|
|
19
15
|
with:
|
|
20
|
-
ref: ${{ github.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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:
|
|
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/"
|
|
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
|
|
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
data/.rubocop_todo.yml
CHANGED
|
@@ -1,49 +1,11 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
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:
|
|
10
|
-
|
|
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: [:
|
|
4
|
+
task default: [:test, :rubocop]
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
require '
|
|
7
|
+
require 'rake/testtask'
|
|
8
8
|
|
|
9
|
-
|
|
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 '
|
|
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
|
data/lib/dnsimple/version.rb
CHANGED
|
@@ -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
|