dnsimple 4.6.0 → 10.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.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/dependabot.yml +21 -0
- data/.github/workflows/auto-merge.yml +32 -0
- data/.github/workflows/ci.yml +45 -0
- data/.github/workflows/release.yml +29 -0
- data/.gitignore +3 -0
- data/.markdownlint.yaml +3 -0
- data/.rubocop.yml +8 -15
- data/.rubocop_dnsimple.yml +42 -87
- data/.rubocop_todo.yml +45 -5
- data/CHANGELOG.md +150 -36
- data/CONTRIBUTING.md +35 -7
- data/Gemfile +9 -1
- data/LICENSE.txt +1 -1
- data/README.md +57 -34
- data/Rakefile +1 -1
- data/UPGRADING.md +4 -5
- data/dnsimple.gemspec +3 -3
- data/lib/dnsimple/client/accounts.rb +2 -0
- data/lib/dnsimple/client/billing.rb +37 -0
- data/lib/dnsimple/client/certificates.rb +26 -7
- data/lib/dnsimple/client/clients.rb +63 -7
- data/lib/dnsimple/client/contacts.rb +2 -0
- data/lib/dnsimple/client/dns_analytics.rb +30 -0
- data/lib/dnsimple/client/domains.rb +25 -26
- data/lib/dnsimple/client/domains_collaborators.rb +11 -0
- data/lib/dnsimple/client/domains_delegation_signer_records.rb +7 -4
- data/lib/dnsimple/client/domains_dnssec.rb +3 -0
- data/lib/dnsimple/client/domains_email_forwards.rb +2 -0
- data/lib/dnsimple/client/domains_pushes.rb +2 -1
- data/lib/dnsimple/client/identity.rb +4 -0
- data/lib/dnsimple/client/oauth.rb +7 -0
- data/lib/dnsimple/client/registrar.rb +146 -18
- data/lib/dnsimple/client/registrar_auto_renewal.rb +2 -0
- data/lib/dnsimple/client/registrar_delegation.rb +2 -0
- data/lib/dnsimple/client/registrar_registrant_changes.rb +110 -0
- data/lib/dnsimple/client/registrar_transfer_lock.rb +61 -0
- data/lib/dnsimple/client/registrar_whois_privacy.rb +3 -1
- data/lib/dnsimple/client/services.rb +3 -0
- data/lib/dnsimple/client/services_domains.rb +2 -0
- data/lib/dnsimple/client/templates.rb +2 -0
- data/lib/dnsimple/client/templates_domains.rb +2 -0
- data/lib/dnsimple/client/templates_records.rb +3 -0
- data/lib/dnsimple/client/tlds.rb +4 -0
- data/lib/dnsimple/client/vanity_name_servers.rb +12 -10
- data/lib/dnsimple/client/webhooks.rb +2 -0
- data/lib/dnsimple/client/zones.rb +36 -0
- data/lib/dnsimple/client/zones_distributions.rb +2 -0
- data/lib/dnsimple/client/zones_records.rb +2 -0
- data/lib/dnsimple/client.rb +23 -14
- data/lib/dnsimple/default.rb +19 -18
- data/lib/dnsimple/error.rb +38 -2
- data/lib/dnsimple/extra.rb +5 -3
- data/lib/dnsimple/options.rb +12 -0
- data/lib/dnsimple/response.rb +19 -7
- data/lib/dnsimple/struct/account.rb +4 -2
- data/lib/dnsimple/struct/certificate.rb +6 -4
- data/lib/dnsimple/struct/certificate_bundle.rb +5 -2
- data/lib/dnsimple/struct/certificate_purchase.rb +4 -2
- data/lib/dnsimple/struct/certificate_renewal.rb +4 -2
- data/lib/dnsimple/struct/charge.rb +87 -0
- data/lib/dnsimple/struct/collaborator.rb +4 -2
- data/lib/dnsimple/struct/contact.rb +4 -2
- data/lib/dnsimple/struct/delegation_signer_record.rb +7 -2
- data/lib/dnsimple/struct/dns_analytics.rb +18 -0
- data/lib/dnsimple/struct/dnssec.rb +4 -2
- data/lib/dnsimple/struct/domain.rb +6 -4
- data/lib/dnsimple/struct/domain_check.rb +4 -2
- data/lib/dnsimple/struct/domain_premium_price.rb +4 -2
- data/lib/dnsimple/struct/domain_price.rb +24 -0
- data/lib/dnsimple/struct/domain_push.rb +4 -2
- data/lib/dnsimple/struct/domain_registration.rb +4 -2
- data/lib/dnsimple/struct/domain_renewal.rb +4 -2
- data/lib/dnsimple/struct/domain_restore.rb +24 -0
- data/lib/dnsimple/struct/domain_transfer.rb +7 -2
- data/lib/dnsimple/struct/email_forward.rb +16 -2
- data/lib/dnsimple/struct/extended_attribute.rb +4 -2
- data/lib/dnsimple/struct/oauth_token.rb +4 -2
- data/lib/dnsimple/struct/registrant_change.rb +39 -0
- data/lib/dnsimple/struct/registrant_change_check.rb +21 -0
- data/lib/dnsimple/struct/service.rb +4 -2
- data/lib/dnsimple/struct/template.rb +4 -2
- data/lib/dnsimple/struct/template_record.rb +4 -2
- data/lib/dnsimple/struct/tld.rb +7 -2
- data/lib/dnsimple/struct/transfer_lock.rb +12 -0
- data/lib/dnsimple/struct/user.rb +4 -2
- data/lib/dnsimple/struct/vanity_name_server.rb +4 -2
- data/lib/dnsimple/struct/webhook.rb +4 -2
- data/lib/dnsimple/struct/whoami.rb +4 -2
- data/lib/dnsimple/struct/whois_privacy.rb +4 -2
- data/lib/dnsimple/struct/whois_privacy_renewal.rb +4 -2
- data/lib/dnsimple/struct/zone.rb +13 -2
- data/lib/dnsimple/struct/zone_distribution.rb +4 -2
- data/lib/dnsimple/struct/zone_file.rb +4 -2
- data/lib/dnsimple/struct/zone_record.rb +4 -2
- data/lib/dnsimple/struct.rb +12 -3
- data/lib/dnsimple/version.rb +5 -1
- data/lib/dnsimple.rb +2 -0
- data/spec/dnsimple/client/accounts_spec.rb +2 -0
- data/spec/dnsimple/client/billing_spec.rb +101 -0
- data/spec/dnsimple/client/certificates_spec.rb +43 -42
- data/spec/dnsimple/client/client_service_spec.rb +3 -1
- data/spec/dnsimple/client/contacts_spec.rb +6 -4
- data/spec/dnsimple/client/dns_analytics_spec.rb +84 -0
- data/spec/dnsimple/client/domains_collaborators_spec.rb +6 -4
- data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +6 -3
- data/spec/dnsimple/client/domains_dnssec_spec.rb +2 -0
- data/spec/dnsimple/client/domains_email_forwards_spec.rb +24 -14
- data/spec/dnsimple/client/domains_pushes_spec.rb +4 -2
- data/spec/dnsimple/client/domains_spec.rb +18 -43
- data/spec/dnsimple/client/identity_spec.rb +2 -0
- data/spec/dnsimple/client/oauth_spec.rb +21 -0
- data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +2 -0
- data/spec/dnsimple/client/registrar_delegation_spec.rb +6 -4
- data/spec/dnsimple/client/registrar_spec.rb +422 -34
- data/spec/dnsimple/client/registrar_transfer_lock_spec.rb +118 -0
- data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +12 -10
- data/spec/dnsimple/client/services_domains_spec.rb +4 -4
- data/spec/dnsimple/client/services_spec.rb +4 -4
- data/spec/dnsimple/client/templates_domains_spec.rb +2 -0
- data/spec/dnsimple/client/templates_records_spec.rb +4 -2
- data/spec/dnsimple/client/templates_spec.rb +6 -4
- data/spec/dnsimple/client/tlds_spec.rb +4 -1
- data/spec/dnsimple/client/vanity_name_servers_spec.rb +3 -1
- data/spec/dnsimple/client/webhooks_spec.rb +3 -1
- data/spec/dnsimple/client/zones_distributions_spec.rb +2 -0
- data/spec/dnsimple/client/zones_records_spec.rb +8 -6
- data/spec/dnsimple/client/zones_spec.rb +91 -4
- data/spec/dnsimple/client_spec.rb +80 -52
- data/spec/dnsimple/extra_spec.rb +4 -2
- data/spec/dnsimple/options/base_spec.rb +2 -0
- data/spec/dnsimple/options/list_options_spec.rb +6 -4
- data/spec/fixtures.http/accounts/success-account.http +0 -1
- data/spec/fixtures.http/accounts/success-user.http +0 -1
- data/spec/fixtures.http/activateZoneService/success.http +16 -0
- data/spec/fixtures.http/addCollaborator/invite-success.http +0 -1
- data/spec/fixtures.http/addCollaborator/success.http +0 -1
- data/spec/fixtures.http/appliedServices/success.http +0 -1
- data/spec/fixtures.http/cancelDomainTransfer/success.http +18 -0
- data/spec/fixtures.http/changeDomainDelegation/success.http +0 -1
- data/spec/fixtures.http/changeDomainDelegationToVanity/success.http +0 -1
- data/spec/fixtures.http/checkDomain/success.http +0 -1
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_not_a_premium_domain.http +18 -0
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_tld_not_supported.http +18 -0
- data/spec/fixtures.http/checkDomainPremiumPrice/success.http +20 -0
- data/spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http +14 -0
- data/spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http +15 -0
- data/spec/fixtures.http/checkRegistrantChange/success.http +15 -0
- data/spec/fixtures.http/checkZoneDistribution/error.http +0 -1
- data/spec/fixtures.http/checkZoneDistribution/failure.http +0 -1
- data/spec/fixtures.http/checkZoneDistribution/success.http +0 -1
- data/spec/fixtures.http/checkZoneRecordDistribution/error.http +0 -1
- data/spec/fixtures.http/checkZoneRecordDistribution/failure.http +0 -1
- data/spec/fixtures.http/checkZoneRecordDistribution/success.http +0 -1
- data/spec/fixtures.http/createContact/created.http +0 -1
- data/spec/fixtures.http/createDelegationSignerRecord/created.http +1 -2
- data/spec/fixtures.http/createDelegationSignerRecord/validation-error.http +0 -1
- data/spec/fixtures.http/createDomain/created.http +20 -16
- data/spec/fixtures.http/createEmailForward/created.http +22 -17
- data/spec/fixtures.http/createPrimaryServer/created.http +21 -0
- data/spec/fixtures.http/createRegistrantChange/success.http +14 -0
- data/spec/fixtures.http/createSecondaryZone/created.http +21 -0
- data/spec/fixtures.http/createTemplate/created.http +0 -1
- data/spec/fixtures.http/createTemplateRecord/created.http +0 -1
- data/spec/fixtures.http/createWebhook/created.http +0 -1
- data/spec/fixtures.http/createZoneRecord/created-apex.http +0 -1
- data/spec/fixtures.http/createZoneRecord/created.http +0 -1
- data/spec/fixtures.http/deactivateZoneService/success.http +16 -0
- data/spec/fixtures.http/deleteContact/error-contact-in-use.http +18 -0
- data/spec/fixtures.http/deleteEmailForward/success.http +12 -7
- data/spec/fixtures.http/deleteRegistrantChange/success.http +13 -0
- data/spec/fixtures.http/disableDnssec/not-enabled.http +0 -1
- data/spec/fixtures.http/disableDomainTransferLock/success.http +20 -0
- data/spec/fixtures.http/disableWhoisPrivacy/success.http +0 -1
- data/spec/fixtures.http/dnsAnalytics/success.http +20 -0
- data/spec/fixtures.http/downloadCertificate/success.http +0 -1
- data/spec/fixtures.http/enableDnssec/success.http +0 -1
- data/spec/fixtures.http/enableDomainTransferLock/success.http +20 -0
- data/spec/fixtures.http/enableVanityNameServers/success.http +0 -1
- data/spec/fixtures.http/enableWhoisPrivacy/created.http +0 -1
- data/spec/fixtures.http/enableWhoisPrivacy/success.http +0 -1
- data/spec/fixtures.http/getCertificate/success.http +10 -11
- data/spec/fixtures.http/getCertificatePrivateKey/success.http +0 -1
- data/spec/fixtures.http/getContact/success.http +0 -1
- data/spec/fixtures.http/getDelegationSignerRecord/success.http +1 -2
- data/spec/fixtures.http/getDnssec/success.http +0 -1
- data/spec/fixtures.http/getDomain/success.http +13 -9
- data/spec/fixtures.http/getDomainDelegation/success-empty.http +0 -1
- data/spec/fixtures.http/getDomainDelegation/success.http +0 -1
- data/spec/fixtures.http/getDomainPremiumPrice/failure.http +0 -1
- data/spec/fixtures.http/getDomainPremiumPrice/success.http +0 -1
- data/spec/fixtures.http/getDomainPrices/failure.http +19 -0
- data/spec/fixtures.http/getDomainPrices/success.http +21 -0
- data/spec/fixtures.http/getDomainRegistration/success.http +20 -0
- data/spec/fixtures.http/getDomainRenewal/success.http +20 -0
- data/spec/fixtures.http/getDomainRestore/success.http +20 -0
- data/spec/fixtures.http/getDomainTransfer/success.http +20 -0
- data/spec/fixtures.http/getDomainTransferLock/success.http +20 -0
- data/spec/fixtures.http/getEmailForward/success.http +15 -10
- data/spec/fixtures.http/getPrimaryServer/success.http +21 -0
- data/spec/fixtures.http/getRegistrantChange/success.http +15 -0
- data/spec/fixtures.http/getService/success.http +0 -1
- data/spec/fixtures.http/getTemplate/success.http +0 -1
- data/spec/fixtures.http/getTemplateRecord/success.http +0 -1
- data/spec/fixtures.http/getTld/success.http +1 -2
- data/spec/fixtures.http/getTldExtendedAttributes/success-attributes.http +0 -1
- data/spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http +0 -1
- data/spec/fixtures.http/getTldExtendedAttributes/success.http +0 -1
- data/spec/fixtures.http/getWebhook/success.http +0 -1
- data/spec/fixtures.http/getWhoisPrivacy/success.http +0 -1
- data/spec/fixtures.http/getZone/success.http +1 -2
- data/spec/fixtures.http/getZoneFile/success.http +0 -1
- data/spec/fixtures.http/getZoneRecord/success.http +0 -1
- data/spec/fixtures.http/initiatePush/success.http +0 -1
- data/spec/fixtures.http/issueLetsencryptCertificate/success.http +18 -21
- data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +18 -21
- data/spec/fixtures.http/linkPrimaryServer/success.http +21 -0
- data/spec/fixtures.http/listAccounts/success-account.http +0 -1
- data/spec/fixtures.http/listAccounts/success-user.http +0 -1
- data/spec/fixtures.http/listCertificates/success.http +10 -11
- data/spec/fixtures.http/listCharges/fail-400-bad-filter.http +14 -0
- data/spec/fixtures.http/listCharges/fail-403.http +14 -0
- data/spec/fixtures.http/listCharges/success.http +14 -0
- data/spec/fixtures.http/listCollaborators/success.http +0 -1
- data/spec/fixtures.http/listContacts/success.http +0 -1
- data/spec/fixtures.http/listDelegationSignerRecords/success.http +1 -2
- data/spec/fixtures.http/listDomains/success.http +20 -16
- data/spec/fixtures.http/listEmailForwards/success.http +10 -11
- data/spec/fixtures.http/listPrimaryServers/success.http +21 -0
- data/spec/fixtures.http/listPushes/success.http +0 -1
- data/spec/fixtures.http/listRegistrantChanges/success.http +15 -0
- data/spec/fixtures.http/listServices/success.http +0 -1
- data/spec/fixtures.http/listTemplateRecords/success.http +0 -1
- data/spec/fixtures.http/listTemplates/success.http +0 -1
- data/spec/fixtures.http/listTlds/success.http +1 -2
- data/spec/fixtures.http/listWebhooks/success.http +0 -1
- data/spec/fixtures.http/listZoneRecords/success.http +0 -1
- data/spec/fixtures.http/listZones/success.http +1 -2
- data/spec/fixtures.http/method-not-allowed.http +0 -1
- data/spec/fixtures.http/notfound-certificate.http +0 -1
- data/spec/fixtures.http/notfound-collaborator.http +0 -1
- data/spec/fixtures.http/notfound-contact.http +0 -1
- data/spec/fixtures.http/notfound-delegationsignerrecord.http +0 -1
- data/spec/fixtures.http/notfound-domain.http +0 -1
- data/spec/fixtures.http/notfound-domainpush.http +0 -1
- data/spec/fixtures.http/notfound-emailforward.http +0 -1
- data/spec/fixtures.http/notfound-record.http +0 -1
- data/spec/fixtures.http/notfound-template.http +0 -1
- data/spec/fixtures.http/notfound-webhook.http +0 -1
- data/spec/fixtures.http/notfound-whoisprivacy.http +0 -1
- data/spec/fixtures.http/notfound-zone.http +0 -1
- data/spec/fixtures.http/oauthAccessToken/error-invalid-request.http +0 -1
- data/spec/fixtures.http/oauthAccessToken/success.http +0 -1
- data/spec/fixtures.http/pages-1of3.http +0 -1
- data/spec/fixtures.http/pages-2of3.http +0 -1
- data/spec/fixtures.http/pages-3of3.http +0 -1
- data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +20 -21
- data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +20 -21
- data/spec/fixtures.http/registerDomain/success.http +1 -2
- data/spec/fixtures.http/renewDomain/error-tooearly.http +0 -1
- data/spec/fixtures.http/renewDomain/success.http +1 -2
- data/spec/fixtures.http/renewWhoisPrivacy/success.http +0 -1
- data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http +1 -2
- data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-not-found.http +1 -2
- data/spec/fixtures.http/response.http +0 -1
- data/spec/fixtures.http/restoreDomain/success.http +20 -0
- data/spec/fixtures.http/transferDomain/error-indnsimple.http +0 -1
- data/spec/fixtures.http/transferDomain/error-missing-authcode.http +0 -1
- data/spec/fixtures.http/transferDomain/success.http +1 -2
- data/spec/fixtures.http/unlinkPrimaryServer/success.http +21 -0
- data/spec/fixtures.http/updateContact/success.http +0 -1
- data/spec/fixtures.http/updateTemplate/success.http +0 -1
- data/spec/fixtures.http/updateZoneRecord/success.http +0 -1
- data/spec/fixtures.http/validation-error.http +0 -1
- data/spec/fixtures.http/whoami/success-account.http +0 -1
- data/spec/fixtures.http/whoami/success-user.http +0 -1
- data/spec/fixtures.http/whoami/success.http +0 -1
- data/spec/spec_helper.rb +3 -1
- data/spec/support/helpers.rb +2 -0
- data/spec/support/webmock.rb +2 -0
- metadata +64 -186
- data/.ruby-gemset +0 -1
- data/.travis.yml +0 -19
- data/spec/fixtures.http/resetDomainToken/success.http +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 717f1a8443a707774595d0f3f4fc0ebeeb1383bd91424e1fdca0e46ba9fd9043
|
|
4
|
+
data.tar.gz: 0f97c2fa6be76c363bb2a1f6ac793553c051a55f6e191597c0aaf2669c4d3b32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 270a8d238b4e9bca275f407c2643152892288b8328fa0e1df43750b2a180f172e38597697cc2d936ca9eb0eb284bcaa0f80d534692d6ee8ca3cbde0d3f068dda
|
|
7
|
+
data.tar.gz: 8c0bcc9b2b79848ab07c440e0bda804284918e0cfe668c2d838a388609825ff5d200569d26198aed4d6a5545403f9a026c04b5a10d2fc88987b0988bf0b24608
|
data/.github/CODEOWNERS
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @dnsimple/external-integrations
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 2
|
|
3
|
+
updates:
|
|
4
|
+
- package-ecosystem: bundler
|
|
5
|
+
directory: /
|
|
6
|
+
schedule:
|
|
7
|
+
interval: monthly
|
|
8
|
+
open-pull-requests-limit: 10
|
|
9
|
+
labels:
|
|
10
|
+
- task
|
|
11
|
+
- dependencies
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: monthly
|
|
16
|
+
time: '12:00'
|
|
17
|
+
open-pull-requests-limit: 10
|
|
18
|
+
labels:
|
|
19
|
+
- task
|
|
20
|
+
- dependencies
|
|
21
|
+
- automerge
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Auto-merge
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- labeled
|
|
7
|
+
- synchronize
|
|
8
|
+
- opened
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
auto-merge:
|
|
12
|
+
name: 'Auto-merge'
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions: write-all
|
|
15
|
+
|
|
16
|
+
if: github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'automerge')
|
|
17
|
+
steps:
|
|
18
|
+
- name: Wait for tests to succeed
|
|
19
|
+
uses: lewagon/wait-on-check-action@v1.3.4
|
|
20
|
+
timeout-minutes: 15
|
|
21
|
+
with:
|
|
22
|
+
ref: ${{ github.ref }}
|
|
23
|
+
running-workflow-name: 'Auto-merge'
|
|
24
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
25
|
+
wait-interval: 10
|
|
26
|
+
allowed-conclusions: success
|
|
27
|
+
- uses: juliangruber/merge-pull-request-action@v1
|
|
28
|
+
with:
|
|
29
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
30
|
+
number: ${{ github.event.number }}
|
|
31
|
+
method: squash
|
|
32
|
+
repo: dnsimple/dnsimple-ruby
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
markdownlint-cli:
|
|
15
|
+
name: Lint markdown
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout Code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
- name: Run markdownlint-cli
|
|
21
|
+
uses: nosborn/github-action-markdown-cli@v3.4.0
|
|
22
|
+
with:
|
|
23
|
+
files: .
|
|
24
|
+
config_file: ".markdownlint.yaml"
|
|
25
|
+
|
|
26
|
+
test:
|
|
27
|
+
needs: [markdownlint-cli]
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
name: Ruby ${{ matrix.ruby-version }}
|
|
30
|
+
strategy:
|
|
31
|
+
matrix:
|
|
32
|
+
ruby-version:
|
|
33
|
+
- '3.2'
|
|
34
|
+
- '3.3'
|
|
35
|
+
- '3.4'
|
|
36
|
+
- 'ruby-head'
|
|
37
|
+
- 'truffleruby-head'
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- name: Set up Ruby
|
|
41
|
+
uses: ruby/setup-ruby@v1
|
|
42
|
+
with:
|
|
43
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
44
|
+
bundler-cache: true
|
|
45
|
+
- run: bundle exec rake
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*.*.*
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
name: Release to RubyGems
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Wait for tests to succeed
|
|
14
|
+
uses: lewagon/wait-on-check-action@v1.3.4
|
|
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@v4
|
|
23
|
+
|
|
24
|
+
- name: Release Gem
|
|
25
|
+
uses: simplyqio/publish-rubygems-action@2.0.0
|
|
26
|
+
env:
|
|
27
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
|
29
|
+
RELEASE_COMMAND: "rake build && gem push pkg/*.gem"
|
data/.gitignore
CHANGED
data/.markdownlint.yaml
ADDED
data/.rubocop.yml
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
|
+
---
|
|
1
2
|
inherit_from:
|
|
2
3
|
- .rubocop_todo.yml
|
|
3
4
|
- .rubocop_dnsimple.yml
|
|
4
5
|
|
|
6
|
+
require:
|
|
7
|
+
- rubocop-performance
|
|
8
|
+
- rubocop-rake
|
|
9
|
+
- rubocop-rspec
|
|
10
|
+
|
|
5
11
|
AllCops:
|
|
12
|
+
TargetRubyVersion: 3.0
|
|
6
13
|
Exclude:
|
|
7
14
|
- '*.gemspec'
|
|
8
15
|
- 'Rakefile'
|
|
9
|
-
|
|
10
|
-
# [codesmell]
|
|
11
|
-
# It's irrelevant here, but it could be a code smell.
|
|
12
|
-
# Hence keep it disabled, but don't include it in the DNSimple suite.
|
|
13
|
-
Lint/Loop:
|
|
14
|
-
Enabled: false
|
|
15
|
-
|
|
16
|
-
# It doesn't seem to work as expected.
|
|
17
|
-
Style/IfUnlessModifier:
|
|
18
|
-
Enabled: false
|
|
19
|
-
|
|
20
|
-
# This rule suggest to use safe navigation (&.) operator which was introduced
|
|
21
|
-
# with Ruby 2.3. Because we are supporting Ruby 2.0+ we can't use this operator.
|
|
22
|
-
Style/SafeNavigation:
|
|
23
|
-
Enabled: false
|
|
16
|
+
- 'vendor/**/*'
|
data/.rubocop_dnsimple.yml
CHANGED
|
@@ -8,6 +8,7 @@ AllCops:
|
|
|
8
8
|
Exclude:
|
|
9
9
|
# Exclude .gemspec files because they are generally auto-generated
|
|
10
10
|
- '*.gemspec'
|
|
11
|
+
NewCops: enable
|
|
11
12
|
|
|
12
13
|
# In most cases, Gems are sorted alphabetically.
|
|
13
14
|
# However, in some few cases the order is relevant due to dependencies.
|
|
@@ -19,6 +20,10 @@ Bundler/OrderedGems:
|
|
|
19
20
|
Layout/AccessModifierIndentation:
|
|
20
21
|
Enabled: false
|
|
21
22
|
|
|
23
|
+
# It causes weird aligments, especially for specs.
|
|
24
|
+
Layout/BlockEndNewline:
|
|
25
|
+
Enabled: false
|
|
26
|
+
|
|
22
27
|
# Generally, the keyword style uses a lot of space. This is particularly true when
|
|
23
28
|
# you use case/if statements, in combination with a long-name variable.
|
|
24
29
|
#
|
|
@@ -33,7 +38,15 @@ Layout/EndAlignment:
|
|
|
33
38
|
EnforcedStyleAlignWith: variable
|
|
34
39
|
|
|
35
40
|
# [codesmell]
|
|
36
|
-
|
|
41
|
+
Layout/LineLength:
|
|
42
|
+
Enabled: false
|
|
43
|
+
Exclude:
|
|
44
|
+
- 'spec/**/*_spec.rb'
|
|
45
|
+
- 'test/**/*_test.rb'
|
|
46
|
+
Max: 100
|
|
47
|
+
|
|
48
|
+
# [codesmell]
|
|
49
|
+
Lint/SuppressedException:
|
|
37
50
|
Enabled: false
|
|
38
51
|
|
|
39
52
|
# [codesmell]
|
|
@@ -61,14 +74,6 @@ Metrics/ClassLength:
|
|
|
61
74
|
- 'spec/**/*_spec.rb'
|
|
62
75
|
- 'test/**/*_test.rb'
|
|
63
76
|
|
|
64
|
-
# [codesmell]
|
|
65
|
-
Metrics/LineLength:
|
|
66
|
-
Enabled: false
|
|
67
|
-
Exclude:
|
|
68
|
-
- 'spec/**/*_spec.rb'
|
|
69
|
-
- 'test/**/*_test.rb'
|
|
70
|
-
Max: 100
|
|
71
|
-
|
|
72
77
|
# [codesmell]
|
|
73
78
|
Metrics/MethodLength:
|
|
74
79
|
Enabled: false
|
|
@@ -105,23 +110,21 @@ Naming/MemoizedInstanceVariableName:
|
|
|
105
110
|
Naming/PredicateName:
|
|
106
111
|
Enabled: false
|
|
107
112
|
|
|
113
|
+
# The team agreed decided to use exception
|
|
114
|
+
Naming/RescuedExceptionsVariableName:
|
|
115
|
+
PreferredName: 'exception'
|
|
116
|
+
|
|
108
117
|
# This cop triggers several false positives that make sense in our domain model.
|
|
109
118
|
# For instance, ip is considered an uncommunicative parameter name:
|
|
110
119
|
#
|
|
111
120
|
# ipv4_to_arpa_name(ip)
|
|
112
121
|
#
|
|
113
|
-
Naming/
|
|
122
|
+
Naming/MethodParameterName:
|
|
114
123
|
Enabled: false
|
|
115
124
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
Enabled: false
|
|
120
|
-
|
|
121
|
-
# This cop returns false positive violations (as of rubocop 0.57.0)
|
|
122
|
-
# https://github.com/rubocop-hq/rubocop/issues/5953
|
|
123
|
-
Style/AccessModifierDeclarations:
|
|
124
|
-
Enabled: false
|
|
125
|
+
Style/AccessorGrouping:
|
|
126
|
+
Enabled: true
|
|
127
|
+
EnforcedStyle: separated
|
|
125
128
|
|
|
126
129
|
# Do not use "and" or "or" in conditionals, but for readability we can use it
|
|
127
130
|
# to chain executions. Just beware of operator order.
|
|
@@ -132,26 +135,19 @@ Style/AndOr:
|
|
|
132
135
|
Style/BarePercentLiterals:
|
|
133
136
|
EnforcedStyle: percent_q
|
|
134
137
|
|
|
135
|
-
#
|
|
138
|
+
# Pick one option for consistency.
|
|
136
139
|
Style/BlockDelimiters:
|
|
137
140
|
EnforcedStyle: braces_for_chaining
|
|
138
|
-
|
|
141
|
+
AllowedMethods:
|
|
139
142
|
- expect
|
|
140
143
|
|
|
141
|
-
# I'm not sure we should enforce a style,
|
|
142
|
-
# but if we do, context_dependent offers a good compromise on readability.
|
|
143
|
-
Style/BracesAroundHashParameters:
|
|
144
|
-
Enabled: false
|
|
145
|
-
EnforcedStyle: context_dependent
|
|
146
|
-
|
|
147
144
|
# Warn on empty else.
|
|
148
145
|
Style/EmptyElse:
|
|
149
146
|
EnforcedStyle: empty
|
|
150
147
|
|
|
151
|
-
#
|
|
152
|
-
# One-line methods are not exceptionally nice in Ruby. Just ignore this cop for now.
|
|
148
|
+
# Pick one option for consistency.
|
|
153
149
|
Style/EmptyMethod:
|
|
154
|
-
|
|
150
|
+
EnforcedStyle: expanded
|
|
155
151
|
|
|
156
152
|
# We don't care about the format style.
|
|
157
153
|
# In most cases we use %, but not at the point we want to enforce it
|
|
@@ -164,16 +160,10 @@ Style/FormatString:
|
|
|
164
160
|
Style/FormatStringToken:
|
|
165
161
|
Enabled: false
|
|
166
162
|
|
|
167
|
-
# We don't support frozen strings.
|
|
168
|
-
# This is an experimental feature and we don't know if it will be shipped with
|
|
169
|
-
# Ruby 3.0 or not.
|
|
170
|
-
Style/FrozenStringLiteralComment:
|
|
171
|
-
Enabled: false
|
|
172
|
-
|
|
173
163
|
# Prefer the latest Hash syntax
|
|
174
164
|
Style/HashSyntax:
|
|
175
165
|
Exclude:
|
|
176
|
-
#
|
|
166
|
+
# Rakefiles generally have definitions like
|
|
177
167
|
# :default => :test
|
|
178
168
|
# that looks nicer with the old rocket syntax.
|
|
179
169
|
- 'Rakefile'
|
|
@@ -188,7 +178,7 @@ Style/IfInsideElse:
|
|
|
188
178
|
Enabled: false
|
|
189
179
|
|
|
190
180
|
# module_function doesn't respect the visibility of the methods,
|
|
191
|
-
# and doesn't work well when the module
|
|
181
|
+
# and doesn't work well when the module contains both public/private methods.
|
|
192
182
|
Style/ModuleFunction:
|
|
193
183
|
Enabled: false
|
|
194
184
|
|
|
@@ -209,11 +199,6 @@ Style/NumericLiterals:
|
|
|
209
199
|
- 'spec/**/*_spec.rb'
|
|
210
200
|
- 'test/**/*_test.rb'
|
|
211
201
|
|
|
212
|
-
# For years, %w() has been the de-facto standard. A lot of libraries are using ().
|
|
213
|
-
# Switching to [] would be a nightmare.
|
|
214
|
-
Style/PercentLiteralDelimiters:
|
|
215
|
-
Enabled: false
|
|
216
|
-
|
|
217
202
|
# Enable but only for multiple returns value.
|
|
218
203
|
#
|
|
219
204
|
# return foo, bar
|
|
@@ -225,15 +210,6 @@ Style/PercentLiteralDelimiters:
|
|
|
225
210
|
Style/RedundantReturn:
|
|
226
211
|
AllowMultipleReturnValues: true
|
|
227
212
|
|
|
228
|
-
# Do we care?
|
|
229
|
-
Style/RegexpLiteral:
|
|
230
|
-
Enabled: false
|
|
231
|
-
|
|
232
|
-
# There are cases were the inline rescue is ok. We can either downgrade the severity,
|
|
233
|
-
# or rely on the developer judgement on a case-by-case basis.
|
|
234
|
-
Style/RescueModifier:
|
|
235
|
-
Enabled: false
|
|
236
|
-
|
|
237
213
|
# This is quite annoying, especially in cases where we don't control it (e.g. schema.rb).
|
|
238
214
|
Style/SymbolArray:
|
|
239
215
|
Enabled: false
|
|
@@ -249,9 +225,8 @@ Style/StringLiterals:
|
|
|
249
225
|
Enabled: false
|
|
250
226
|
EnforcedStyle: double_quotes
|
|
251
227
|
|
|
252
|
-
#
|
|
228
|
+
# Pick one option for consistency.
|
|
253
229
|
Style/StringLiteralsInInterpolation:
|
|
254
|
-
Enabled: false
|
|
255
230
|
EnforcedStyle: double_quotes
|
|
256
231
|
|
|
257
232
|
# It's nice to be consistent. The trailing comma also allows easy reordering,
|
|
@@ -278,18 +253,6 @@ Style/WordArray:
|
|
|
278
253
|
EnforcedStyle: percent
|
|
279
254
|
MinSize: 3
|
|
280
255
|
|
|
281
|
-
# Forces the order of comparison arguments.
|
|
282
|
-
#
|
|
283
|
-
# According to this cop, the following statement is bad:
|
|
284
|
-
#
|
|
285
|
-
# "https" == uri.scheme
|
|
286
|
-
#
|
|
287
|
-
# Whereas the following is considered good:
|
|
288
|
-
#
|
|
289
|
-
# uri.scheme == "https"
|
|
290
|
-
Style/YodaCondition:
|
|
291
|
-
Enabled: false
|
|
292
|
-
|
|
293
256
|
# For the same reason of EndAlignment, aligning with the case may have a bad impact
|
|
294
257
|
# on a case after a very long variable.
|
|
295
258
|
#
|
|
@@ -313,10 +276,6 @@ Layout/DotPosition:
|
|
|
313
276
|
Layout/EmptyLines:
|
|
314
277
|
Enabled: false
|
|
315
278
|
|
|
316
|
-
# This is buggy. It detects as a style violation a few `class` and `module` definitions
|
|
317
|
-
Layout/EmptyLinesAroundArguments:
|
|
318
|
-
Enabled: false
|
|
319
|
-
|
|
320
279
|
Layout/EmptyLinesAroundBlockBody:
|
|
321
280
|
Exclude:
|
|
322
281
|
# RSpec is all made of blocks. Disable this config in RSpec
|
|
@@ -324,37 +283,33 @@ Layout/EmptyLinesAroundBlockBody:
|
|
|
324
283
|
- 'spec/**/*_spec.rb'
|
|
325
284
|
- 'test/**/*_test.rb'
|
|
326
285
|
|
|
327
|
-
#
|
|
328
|
-
# Just be consistent with the rest of the surrounding code.
|
|
286
|
+
# Pick one option for consistency. beginning+ending is the most used approach.
|
|
329
287
|
Layout/EmptyLinesAroundClassBody:
|
|
330
|
-
|
|
288
|
+
EnforcedStyle: empty_lines_except_namespace
|
|
331
289
|
|
|
332
290
|
# We're ok with it. We use it quite often for method-level rescue statements.
|
|
333
291
|
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
|
334
292
|
Enabled: false
|
|
335
293
|
|
|
336
|
-
#
|
|
337
|
-
# Just be consistent with the rest of the surrounding code.
|
|
294
|
+
# Pick one option for consistency. beginning+ending is the most used approach.
|
|
338
295
|
Layout/EmptyLinesAroundModuleBody:
|
|
339
|
-
|
|
296
|
+
EnforcedStyle: empty_lines_except_namespace
|
|
340
297
|
|
|
341
298
|
# This is quite buggy, as it doesn't recognize double lines.
|
|
342
299
|
Layout/EmptyLineBetweenDefs:
|
|
343
300
|
Enabled: false
|
|
344
301
|
|
|
345
302
|
# Multi-line differs from standard indentation, they are indented twice.
|
|
346
|
-
Layout/
|
|
303
|
+
Layout/FirstArgumentIndentation:
|
|
347
304
|
IndentationWidth: 4
|
|
348
305
|
|
|
349
|
-
# Array indentation should be
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
IndentationWidth: 4
|
|
306
|
+
# Array indentation should be consistent with method/variable definition.
|
|
307
|
+
Layout/FirstArrayElementIndentation:
|
|
308
|
+
EnforcedStyle: consistent
|
|
353
309
|
|
|
354
|
-
# Hash indentation should be
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
IndentationWidth: 4
|
|
310
|
+
# Hash indentation should be consistent with method/variable definition.
|
|
311
|
+
Layout/FirstHashElementIndentation:
|
|
312
|
+
EnforcedStyle: consistent
|
|
358
313
|
|
|
359
314
|
# Multi-line differs from standard indentation, they are indented twice.
|
|
360
315
|
Layout/MultilineMethodCallIndentation:
|
|
@@ -370,9 +325,9 @@ Layout/MultilineOperationIndentation:
|
|
|
370
325
|
#
|
|
371
326
|
# %w( foo bar )
|
|
372
327
|
#
|
|
373
|
-
# looks better
|
|
328
|
+
# looks better than:
|
|
374
329
|
#
|
|
375
|
-
# %w(
|
|
330
|
+
# %w(foo bar)
|
|
376
331
|
#
|
|
377
332
|
Layout/SpaceInsidePercentLiteralDelimiters:
|
|
378
333
|
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,14 +1,54 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2023-01-26 12:48:02 UTC using RuboCop version 1.44.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
|
-
|
|
10
|
-
|
|
9
|
+
# Offense count: 74
|
|
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: 115
|
|
26
|
+
RSpec/MultipleExpectations:
|
|
27
|
+
Max: 15
|
|
28
|
+
|
|
29
|
+
# Offense count: 372
|
|
30
|
+
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
|
31
|
+
# SupportedStyles: always, named_only
|
|
32
|
+
RSpec/NamedSubject:
|
|
11
33
|
Enabled: false
|
|
34
|
+
|
|
35
|
+
# Offense count: 16
|
|
36
|
+
RSpec/SubjectStub:
|
|
12
37
|
Exclude:
|
|
13
|
-
- 'spec
|
|
14
|
-
- '
|
|
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'
|
|
50
|
+
|
|
51
|
+
# Offense count: 69
|
|
52
|
+
# Configuration parameters: AllowedConstants.
|
|
53
|
+
Style/Documentation:
|
|
54
|
+
Enabled: false
|