dnsimple 5.2.0 → 7.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/dependabot.yml +13 -0
  4. data/.github/workflows/ci.yml +63 -0
  5. data/.github/workflows/release.yml +19 -0
  6. data/.gitignore +3 -0
  7. data/.markdownlint.yaml +3 -0
  8. data/.rubocop.yml +7 -16
  9. data/.rubocop_dnsimple.yml +28 -55
  10. data/.rubocop_todo.yml +44 -5
  11. data/CHANGELOG.md +24 -10
  12. data/CONTRIBUTING.md +8 -23
  13. data/Gemfile +3 -1
  14. data/LICENSE.txt +1 -1
  15. data/README.md +7 -11
  16. data/UPGRADING.md +4 -5
  17. data/dnsimple.gemspec +1 -1
  18. data/lib/dnsimple/client/clients.rb +3 -2
  19. data/lib/dnsimple/client/domains.rb +0 -18
  20. data/lib/dnsimple/client/domains_delegation_signer_records.rb +5 -4
  21. data/lib/dnsimple/client/registrar.rb +23 -0
  22. data/lib/dnsimple/client/registrar_whois_privacy.rb +1 -1
  23. data/lib/dnsimple/client.rb +11 -3
  24. data/lib/dnsimple/default.rb +2 -2
  25. data/lib/dnsimple/error.rb +1 -1
  26. data/lib/dnsimple/extra.rb +3 -3
  27. data/lib/dnsimple/response.rb +1 -3
  28. data/lib/dnsimple/struct/certificate.rb +0 -19
  29. data/lib/dnsimple/struct/delegation_signer_record.rb +3 -0
  30. data/lib/dnsimple/struct/domain.rb +0 -20
  31. data/lib/dnsimple/struct/domain_price.rb +24 -0
  32. data/lib/dnsimple/struct/tld.rb +3 -0
  33. data/lib/dnsimple/struct.rb +1 -0
  34. data/lib/dnsimple/version.rb +1 -1
  35. data/spec/dnsimple/client/certificates_spec.rb +0 -1
  36. data/spec/dnsimple/client/client_service_spec.rb +1 -1
  37. data/spec/dnsimple/client/contacts_spec.rb +2 -2
  38. data/spec/dnsimple/client/domains_collaborators_spec.rb +2 -2
  39. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +2 -1
  40. data/spec/dnsimple/client/domains_email_forwards_spec.rb +8 -8
  41. data/spec/dnsimple/client/domains_pushes_spec.rb +2 -2
  42. data/spec/dnsimple/client/domains_spec.rb +1 -29
  43. data/spec/dnsimple/client/registrar_delegation_spec.rb +2 -2
  44. data/spec/dnsimple/client/registrar_spec.rb +46 -3
  45. data/spec/dnsimple/client/services_domains_spec.rb +2 -4
  46. data/spec/dnsimple/client/services_spec.rb +1 -3
  47. data/spec/dnsimple/client/templates_records_spec.rb +1 -1
  48. data/spec/dnsimple/client/templates_spec.rb +2 -2
  49. data/spec/dnsimple/client/tlds_spec.rb +1 -0
  50. data/spec/dnsimple/client/webhooks_spec.rb +1 -1
  51. data/spec/dnsimple/client/zones_records_spec.rb +2 -2
  52. data/spec/dnsimple/client/zones_spec.rb +1 -1
  53. data/spec/dnsimple/client_spec.rb +15 -15
  54. data/spec/dnsimple/extra_spec.rb +1 -1
  55. data/spec/dnsimple/options/list_options_spec.rb +4 -4
  56. data/spec/fixtures.http/accounts/success-account.http +0 -1
  57. data/spec/fixtures.http/accounts/success-user.http +0 -1
  58. data/spec/fixtures.http/addCollaborator/invite-success.http +0 -1
  59. data/spec/fixtures.http/addCollaborator/success.http +0 -1
  60. data/spec/fixtures.http/appliedServices/success.http +0 -1
  61. data/spec/fixtures.http/cancelDomainTransfer/success.http +0 -1
  62. data/spec/fixtures.http/changeDomainDelegation/success.http +0 -1
  63. data/spec/fixtures.http/changeDomainDelegationToVanity/success.http +0 -1
  64. data/spec/fixtures.http/checkDomain/success.http +0 -1
  65. data/spec/fixtures.http/checkDomainPremiumPrice/error_400_not_a_premium_domain.http +18 -0
  66. data/spec/fixtures.http/checkDomainPremiumPrice/error_400_tld_not_supported.http +18 -0
  67. data/spec/fixtures.http/checkDomainPremiumPrice/success.http +20 -0
  68. data/spec/fixtures.http/checkZoneDistribution/error.http +0 -1
  69. data/spec/fixtures.http/checkZoneDistribution/failure.http +0 -1
  70. data/spec/fixtures.http/checkZoneDistribution/success.http +0 -1
  71. data/spec/fixtures.http/checkZoneRecordDistribution/error.http +0 -1
  72. data/spec/fixtures.http/checkZoneRecordDistribution/failure.http +0 -1
  73. data/spec/fixtures.http/checkZoneRecordDistribution/success.http +0 -1
  74. data/spec/fixtures.http/createContact/created.http +0 -1
  75. data/spec/fixtures.http/createDelegationSignerRecord/created.http +1 -2
  76. data/spec/fixtures.http/createDelegationSignerRecord/validation-error.http +0 -1
  77. data/spec/fixtures.http/createDomain/created.http +0 -1
  78. data/spec/fixtures.http/createEmailForward/created.http +21 -17
  79. data/spec/fixtures.http/createPrimaryServer/created.http +21 -0
  80. data/spec/fixtures.http/createSecondaryZone/created.http +21 -0
  81. data/spec/fixtures.http/createTemplate/created.http +0 -1
  82. data/spec/fixtures.http/createTemplateRecord/created.http +0 -1
  83. data/spec/fixtures.http/createWebhook/created.http +0 -1
  84. data/spec/fixtures.http/createZoneRecord/created-apex.http +0 -1
  85. data/spec/fixtures.http/createZoneRecord/created.http +0 -1
  86. data/spec/fixtures.http/deleteContact/error-contact-in-use.http +18 -0
  87. data/spec/fixtures.http/deleteEmailForward/success.http +12 -7
  88. data/spec/fixtures.http/disableDnssec/not-enabled.http +0 -1
  89. data/spec/fixtures.http/disableWhoisPrivacy/success.http +0 -1
  90. data/spec/fixtures.http/downloadCertificate/success.http +0 -1
  91. data/spec/fixtures.http/enableDnssec/success.http +0 -1
  92. data/spec/fixtures.http/enableVanityNameServers/success.http +0 -1
  93. data/spec/fixtures.http/enableWhoisPrivacy/created.http +0 -1
  94. data/spec/fixtures.http/enableWhoisPrivacy/success.http +0 -1
  95. data/spec/fixtures.http/getCertificate/success.http +0 -1
  96. data/spec/fixtures.http/getCertificatePrivateKey/success.http +0 -1
  97. data/spec/fixtures.http/getContact/success.http +0 -1
  98. data/spec/fixtures.http/getDelegationSignerRecord/success.http +1 -2
  99. data/spec/fixtures.http/getDnssec/success.http +0 -1
  100. data/spec/fixtures.http/getDomain/success.http +0 -1
  101. data/spec/fixtures.http/getDomainDelegation/success-empty.http +0 -1
  102. data/spec/fixtures.http/getDomainDelegation/success.http +0 -1
  103. data/spec/fixtures.http/getDomainPremiumPrice/failure.http +0 -1
  104. data/spec/fixtures.http/getDomainPremiumPrice/success.http +0 -1
  105. data/spec/fixtures.http/getDomainPrices/failure.http +19 -0
  106. data/spec/fixtures.http/getDomainPrices/success.http +21 -0
  107. data/spec/fixtures.http/getDomainTransfer/success.http +0 -1
  108. data/spec/fixtures.http/getEmailForward/success.http +14 -10
  109. data/spec/fixtures.http/getPrimaryServer/success.http +21 -0
  110. data/spec/fixtures.http/getService/success.http +0 -1
  111. data/spec/fixtures.http/getTemplate/success.http +0 -1
  112. data/spec/fixtures.http/getTemplateRecord/success.http +0 -1
  113. data/spec/fixtures.http/getTld/success.http +1 -2
  114. data/spec/fixtures.http/getTldExtendedAttributes/success-attributes.http +0 -1
  115. data/spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http +0 -1
  116. data/spec/fixtures.http/getTldExtendedAttributes/success.http +0 -1
  117. data/spec/fixtures.http/getWebhook/success.http +0 -1
  118. data/spec/fixtures.http/getWhoisPrivacy/success.http +0 -1
  119. data/spec/fixtures.http/getZone/success.http +0 -1
  120. data/spec/fixtures.http/getZoneFile/success.http +0 -1
  121. data/spec/fixtures.http/getZoneRecord/success.http +0 -1
  122. data/spec/fixtures.http/initiatePush/success.http +0 -1
  123. data/spec/fixtures.http/issueLetsencryptCertificate/success.http +0 -1
  124. data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +0 -1
  125. data/spec/fixtures.http/linkPrimaryServer/success.http +21 -0
  126. data/spec/fixtures.http/listAccounts/success-account.http +0 -1
  127. data/spec/fixtures.http/listAccounts/success-user.http +0 -1
  128. data/spec/fixtures.http/listCertificates/success.http +0 -1
  129. data/spec/fixtures.http/listCollaborators/success.http +0 -1
  130. data/spec/fixtures.http/listContacts/success.http +0 -1
  131. data/spec/fixtures.http/listDelegationSignerRecords/success.http +1 -2
  132. data/spec/fixtures.http/listDomains/success.http +0 -1
  133. data/spec/fixtures.http/listEmailForwards/success.http +0 -1
  134. data/spec/fixtures.http/listPrimaryServers/success.http +21 -0
  135. data/spec/fixtures.http/listPushes/success.http +0 -1
  136. data/spec/fixtures.http/listServices/success.http +0 -1
  137. data/spec/fixtures.http/listTemplateRecords/success.http +0 -1
  138. data/spec/fixtures.http/listTemplates/success.http +0 -1
  139. data/spec/fixtures.http/listTlds/success.http +1 -2
  140. data/spec/fixtures.http/listWebhooks/success.http +0 -1
  141. data/spec/fixtures.http/listZoneRecords/success.http +0 -1
  142. data/spec/fixtures.http/listZones/success.http +0 -1
  143. data/spec/fixtures.http/method-not-allowed.http +0 -1
  144. data/spec/fixtures.http/notfound-certificate.http +0 -1
  145. data/spec/fixtures.http/notfound-collaborator.http +0 -1
  146. data/spec/fixtures.http/notfound-contact.http +0 -1
  147. data/spec/fixtures.http/notfound-delegationsignerrecord.http +0 -1
  148. data/spec/fixtures.http/notfound-domain.http +0 -1
  149. data/spec/fixtures.http/notfound-domainpush.http +0 -1
  150. data/spec/fixtures.http/notfound-emailforward.http +0 -1
  151. data/spec/fixtures.http/notfound-record.http +0 -1
  152. data/spec/fixtures.http/notfound-template.http +0 -1
  153. data/spec/fixtures.http/notfound-webhook.http +0 -1
  154. data/spec/fixtures.http/notfound-whoisprivacy.http +0 -1
  155. data/spec/fixtures.http/notfound-zone.http +0 -1
  156. data/spec/fixtures.http/oauthAccessToken/error-invalid-request.http +0 -1
  157. data/spec/fixtures.http/oauthAccessToken/success.http +0 -1
  158. data/spec/fixtures.http/pages-1of3.http +0 -1
  159. data/spec/fixtures.http/pages-2of3.http +0 -1
  160. data/spec/fixtures.http/pages-3of3.http +0 -1
  161. data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +0 -1
  162. data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +0 -1
  163. data/spec/fixtures.http/registerDomain/success.http +0 -1
  164. data/spec/fixtures.http/renewDomain/error-tooearly.http +0 -1
  165. data/spec/fixtures.http/renewDomain/success.http +0 -1
  166. data/spec/fixtures.http/renewWhoisPrivacy/success.http +0 -1
  167. data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http +0 -1
  168. data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-not-found.http +0 -1
  169. data/spec/fixtures.http/response.http +0 -1
  170. data/spec/fixtures.http/transferDomain/error-indnsimple.http +0 -1
  171. data/spec/fixtures.http/transferDomain/error-missing-authcode.http +0 -1
  172. data/spec/fixtures.http/transferDomain/success.http +0 -1
  173. data/spec/fixtures.http/unlinkPrimaryServer/success.http +21 -0
  174. data/spec/fixtures.http/updateContact/success.http +0 -1
  175. data/spec/fixtures.http/updateTemplate/success.http +0 -1
  176. data/spec/fixtures.http/updateZoneRecord/success.http +0 -1
  177. data/spec/fixtures.http/validation-error.http +0 -1
  178. data/spec/fixtures.http/whoami/success-account.http +0 -1
  179. data/spec/fixtures.http/whoami/success-user.http +0 -1
  180. data/spec/fixtures.http/whoami/success.http +0 -1
  181. data/spec/spec_helper.rb +2 -2
  182. metadata +23 -177
  183. data/.dependabot/config.yml +0 -9
  184. data/.travis.yml +0 -17
  185. data/spec/fixtures.http/resetDomainToken/success.http +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb65512fa0b18965225026494660cee2722a79b2bfd0f54e514c66ab4671d4c6
4
- data.tar.gz: af619ac80882ec17cea64ba6ea7d3552688cb08a2b0306aaf2b909e8d23a5555
3
+ metadata.gz: 186f6faf074afa519d67b5397e0e1568ed6745948239a14fb8f72f39dccea390
4
+ data.tar.gz: 605cf70471182fc26fb96cb99eadc204040040bee4481ff1de4837a8084940c8
5
5
  SHA512:
6
- metadata.gz: 32f3d80ebbf898ed8dcd8ecd30b32f1e27caf5883f05c8a86874227a739eedd8b81cb30dbb31651797de927257d025b54bc57d9d324c5eb4fb196483ecf22e60
7
- data.tar.gz: 5f793cf92e6b11a46eca6eaaee769580cb1b168b94d3b9e10c0605eda6865c954dacee9daf213575b950b5c7557475947c0e578d3267208b5098d96073989653
6
+ metadata.gz: 76a9bdea4ba0618262230bea5daa1d5fe66a23e414ce7c5eae0115b343bb9355e277ef492d6f4f8ce8579609e3c511075dfed7080dfac3a34260c499faea1375
7
+ data.tar.gz: 5c07656ba50cdd66cba4c51ea7085229c05f0140127061a0c567ec3940c9ab6e779aae9ff8627f4531fc9bdb2bdb150683f63e792a051c55be81d3e26f0f906e
@@ -0,0 +1 @@
1
+ * @dnsimple/client-ruby
@@ -0,0 +1,13 @@
1
+ ---
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: bundler
5
+ directory: /
6
+ schedule:
7
+ interval: daily
8
+ time: '12:00'
9
+ open-pull-requests-limit: 10
10
+ labels:
11
+ - task
12
+ - dependencies
13
+ - backlog-dependencies
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: ci
3
+
4
+ on:
5
+ push:
6
+ pull_request:
7
+ # Allows you to run this workflow manually from the Actions tab
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ markdownlint-cli:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout Code
15
+ uses: actions/checkout@v2
16
+ - name: Run markdownlint-cli
17
+ uses: nosborn/github-action-markdown-cli@v2.0.0
18
+ with:
19
+ files: .
20
+ config_file: ".markdownlint.yaml"
21
+
22
+ yamllint:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Checkout Code
26
+ uses: actions/checkout@v2
27
+ - name: Run YAML Lint
28
+ uses: actionshub/yamllint@main
29
+
30
+ build:
31
+ needs: [markdownlint-cli, yamllint]
32
+ runs-on: ubuntu-latest
33
+ name: Ruby ${{ matrix.ruby-version }}
34
+ strategy:
35
+ matrix:
36
+ ruby-version:
37
+ - '2.6'
38
+ - '2.7'
39
+ - '3.0'
40
+ - '3.1'
41
+ - 'ruby-head'
42
+ - 'truffleruby-head'
43
+ steps:
44
+ - uses: actions/checkout@v2
45
+ - name: Set up Ruby
46
+ uses: ruby/setup-ruby@v1
47
+ with:
48
+ ruby-version: ${{ matrix.ruby-version }}
49
+ bundler-cache: true
50
+ - run: bundle exec rake
51
+
52
+ slack-workflow-status:
53
+ if: always()
54
+ name: Post Workflow Status To Slack
55
+ needs:
56
+ - build
57
+ runs-on: ubuntu-latest
58
+ steps:
59
+ - name: Slack Workflow Notification
60
+ uses: Gamesight/slack-workflow-status@master
61
+ with:
62
+ repo_token: ${{secrets.GITHUB_TOKEN}}
63
+ slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL_DEVELOPMENT}}
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: release
3
+
4
+ on:
5
+ push:
6
+ tags:
7
+ - v*.*.*
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+
15
+ - name: Release Gem
16
+ uses: cadwallion/publish-rubygems-action@8f9e0538302643309e4e43bf48cd34173ca48cfc # yamllint disable-line
17
+ env:
18
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
19
+ RELEASE_COMMAND: rake release
data/.gitignore CHANGED
@@ -7,3 +7,6 @@ Gemfile.lock
7
7
  .yardoc
8
8
  yardoc/
9
9
  doc/
10
+
11
+ #ASDF
12
+ .tool-versions
@@ -0,0 +1,3 @@
1
+ ---
2
+ default: true
3
+ line-length: false
data/.rubocop.yml CHANGED
@@ -1,25 +1,16 @@
1
+ ---
1
2
  inherit_from:
2
3
  - .rubocop_todo.yml
3
4
  - .rubocop_dnsimple.yml
4
5
 
5
- require: rubocop-performance
6
+ require:
7
+ - rubocop-performance
8
+ - rubocop-rake
9
+ - rubocop-rspec
6
10
 
7
11
  AllCops:
12
+ TargetRubyVersion: 3.0
8
13
  Exclude:
9
14
  - '*.gemspec'
10
15
  - 'Rakefile'
11
-
12
- # [codesmell]
13
- # It's irrelevant here, but it could be a code smell.
14
- # Hence keep it disabled, but don't include it in the DNSimple suite.
15
- Lint/Loop:
16
- Enabled: false
17
-
18
- # It doesn't seem to work as expected.
19
- Style/IfUnlessModifier:
20
- Enabled: false
21
-
22
- # This rule suggest to use safe navigation (&.) operator which was introduced
23
- # with Ruby 2.3. Because we are supporting Ruby 2.0+ we can't use this operator.
24
- Style/SafeNavigation:
25
- Enabled: false
16
+ - 'vendor/**/*'
@@ -1,3 +1,4 @@
1
+ ---
1
2
  # Defaults https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
3
  #
3
4
  # References:
@@ -8,6 +9,7 @@ AllCops:
8
9
  Exclude:
9
10
  # Exclude .gemspec files because they are generally auto-generated
10
11
  - '*.gemspec'
12
+ NewCops: enable
11
13
 
12
14
  # In most cases, Gems are sorted alphabetically.
13
15
  # However, in some few cases the order is relevant due to dependencies.
@@ -23,8 +25,8 @@ Layout/AccessModifierIndentation:
23
25
  Layout/BlockEndNewline:
24
26
  Enabled: false
25
27
 
26
- # Generally, the keyword style uses a lot of space. This is particularly true when
27
- # you use case/if statements, in combination with a long-name variable.
28
+ # Generally, the keyword style uses a lot of space. This is particularly true
29
+ # when you use case/if statements, in combination with a long-name variable.
28
30
  #
29
31
  # invoice_error_message = case error
30
32
  # when 1 == 1
@@ -146,7 +148,8 @@ Style/EmptyElse:
146
148
  EnforcedStyle: empty
147
149
 
148
150
  # There is no specific preference for empty methods.
149
- # One-line methods are not exceptionally nice in Ruby. Just ignore this cop for now.
151
+ # One-line methods are not exceptionally nice in Ruby.
152
+ # Just ignore this cop for now.
150
153
  Style/EmptyMethod:
151
154
  Enabled: false
152
155
 
@@ -156,8 +159,10 @@ Style/EmptyMethod:
156
159
  Style/FormatString:
157
160
  Enabled: false
158
161
 
159
- # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
160
- # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
162
+ # Annotated tokens (like %<foo>s) are a good thing,
163
+ # but in most cases we don't need them.
164
+ # %s is a simpler and straightforward version that works in almost all cases.
165
+ # So don't complain.
161
166
  Style/FormatStringToken:
162
167
  Enabled: false
163
168
 
@@ -169,15 +174,18 @@ Style/HashSyntax:
169
174
  # that looks nicer with the old rocket syntax.
170
175
  - 'Rakefile'
171
176
 
172
- # Enforces usage of Hash#each_key and Hash#each_value (vs. Hash#keys.each and Hash#values.each).
177
+ # Enforces usage of Hash#each_key and Hash#each_value (vs. Hash#keys.each
178
+ # and Hash#values.each).
173
179
  Style/HashEachMethods:
174
180
  Enabled: true
175
181
 
176
- # Enforce the use of Hash#TransformKeys introduced in Ruby 2.5 to transform Hash keys.
182
+ # Enforce the use of Hash#TransformKeys introduced in Ruby 2.5 to transform
183
+ # Hash keys.
177
184
  Style/HashTransformKeys:
178
185
  Enabled: true
179
186
 
180
- # Enforce the use of Hash#TransformValues introduced in Ruby 2.5 to transform Hash values.
187
+ # Enforce the use of Hash#TransformValues introduced in Ruby 2.5 to transform
188
+ # Hash values.
181
189
  Style/HashTransformValues:
182
190
  Enabled: true
183
191
 
@@ -212,8 +220,8 @@ Style/NumericLiterals:
212
220
  - 'spec/**/*_spec.rb'
213
221
  - 'test/**/*_test.rb'
214
222
 
215
- # For years, %w() has been the de-facto standard. A lot of libraries are using ().
216
- # Switching to [] would be a nightmare.
223
+ # For years, %w() has been the de-facto standard.
224
+ # A lot of libraries are using (). Switching to [] would be a nightmare.
217
225
  Style/PercentLiteralDelimiters:
218
226
  Enabled: false
219
227
 
@@ -232,12 +240,13 @@ Style/RedundantReturn:
232
240
  Style/RegexpLiteral:
233
241
  Enabled: false
234
242
 
235
- # There are cases were the inline rescue is ok. We can either downgrade the severity,
236
- # or rely on the developer judgement on a case-by-case basis.
243
+ # There are cases were the inline rescue is ok. We can either downgrade
244
+ # the severity, or rely on the developer judgement on a case-by-case basis.
237
245
  Style/RescueModifier:
238
246
  Enabled: false
239
247
 
240
- # This is quite annoying, especially in cases where we don't control it (e.g. schema.rb).
248
+ # This is quite annoying, especially in cases where we don't control it
249
+ # (e.g. schema.rb).
241
250
  Style/SymbolArray:
242
251
  Enabled: false
243
252
 
@@ -293,8 +302,8 @@ Style/WordArray:
293
302
  Style/YodaCondition:
294
303
  Enabled: false
295
304
 
296
- # For the same reason of EndAlignment, aligning with the case may have a bad impact
297
- # on a case after a very long variable.
305
+ # For the same reason of EndAlignment, aligning with the case may have
306
+ # a bad impact on a case after a very long variable.
298
307
  #
299
308
  # invoice_error_message = case error
300
309
  # when 1 == 1
@@ -316,14 +325,16 @@ Layout/DotPosition:
316
325
  Layout/EmptyLines:
317
326
  Enabled: false
318
327
 
319
- # This is buggy. It detects as a style violation a few `class` and `module` definitions
328
+ # This is buggy. It detects as a style violation a few `class`
329
+ # and `module` definitions
320
330
  Layout/EmptyLinesAroundArguments:
321
331
  Enabled: false
322
332
 
323
333
  Layout/EmptyLinesAroundBlockBody:
324
334
  Exclude:
325
335
  # RSpec is all made of blocks. Disable this config in RSpec
326
- # to be consistent with EmptyLinesAroundClassBody and EmptyLinesAroundModuleBody
336
+ # to be consistent with EmptyLinesAroundClassBody
337
+ # and EmptyLinesAroundModuleBody
327
338
  - 'spec/**/*_spec.rb'
328
339
  - 'test/**/*_test.rb'
329
340
 
@@ -377,41 +388,3 @@ Layout/MultilineOperationIndentation:
377
388
  #
378
389
  Layout/SpaceInsidePercentLiteralDelimiters:
379
390
  Enabled: false
380
-
381
-
382
- # New cops
383
- # We'll remove them once they become defaults.
384
- # See https://docs.rubocop.org/en/latest/versioning/
385
-
386
-
387
- Layout/SpaceAroundMethodCallOperator:
388
- Enabled: true
389
-
390
- Lint/RaiseException:
391
- Enabled: true
392
-
393
- Lint/StructNewOverride:
394
- Enabled: true
395
-
396
- Style/ExponentialNotation:
397
- Enabled: true
398
-
399
- Layout/EmptyLinesAroundAttributeAccessor:
400
- Enabled: true
401
-
402
- Style/SlicingWithRange:
403
- Enabled: true
404
-
405
- # Introduced in rubocop 0.84.0
406
- Lint/DeprecatedOpenSSLConstant:
407
- Enabled: true
408
-
409
- # Introduced in rubocop 0.85.0
410
- Lint/MixedRegexpCaptureTypes:
411
- Enabled: true
412
-
413
- Style/RedundantRegexpCharacterClass:
414
- Enabled: true
415
-
416
- Style/RedundantRegexpEscape:
417
- Enabled: true
data/.rubocop_todo.yml CHANGED
@@ -1,14 +1,53 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-03-27 01:01:12 +0100 using RuboCop version 0.38.0.
3
+ # on 2021-12-31 12:20:10 UTC using RuboCop version 1.24.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
- Style/Documentation:
10
- # Silence this check for now until we fix it.
9
+ # Offense count: 71
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: 11
20
+ # Configuration parameters: .
21
+ # SupportedStyles: have_received, receive
22
+ RSpec/MessageSpies:
23
+ EnforcedStyle: receive
24
+
25
+ # Offense count: 112
26
+ RSpec/MultipleExpectations:
27
+ Max: 15
28
+
29
+ # Offense count: 375
30
+ # Configuration parameters: IgnoreSharedExamples.
31
+ RSpec/NamedSubject:
11
32
  Enabled: false
33
+
34
+ # Offense count: 16
35
+ RSpec/SubjectStub:
12
36
  Exclude:
13
- - 'spec/**/*'
14
- - 'test/**/*'
37
+ - 'spec/dnsimple/client/certificates_spec.rb'
38
+ - 'spec/dnsimple/client/contacts_spec.rb'
39
+ - 'spec/dnsimple/client/domains_delegation_signer_records_spec.rb'
40
+ - 'spec/dnsimple/client/domains_email_forwards_spec.rb'
41
+ - 'spec/dnsimple/client/domains_spec.rb'
42
+ - 'spec/dnsimple/client/services_spec.rb'
43
+ - 'spec/dnsimple/client/templates_records_spec.rb'
44
+ - 'spec/dnsimple/client/templates_spec.rb'
45
+ - 'spec/dnsimple/client/tlds_spec.rb'
46
+ - 'spec/dnsimple/client/zones_records_spec.rb'
47
+ - 'spec/dnsimple/client/zones_spec.rb'
48
+ - 'spec/dnsimple/client_spec.rb'
49
+
50
+ # Offense count: 37
51
+ # Configuration parameters: AllowedConstants.
52
+ Style/Documentation:
53
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
+ ## main
6
+
7
+ ## 7.1.1
8
+
9
+ - CHANGED: Bumped up dependencies
10
+
11
+ ## 7.1.0
12
+
13
+ - CHANGED: Updated DNSSEC-related structs and entrypoints to support DS record key-data interface. (dnsimple/dnsimple-ruby#252)
14
+
15
+ ## 7.0.0
16
+
17
+ - CHANGED: Minimum Ruby version is now 2.6
18
+ - CHANGED: Deprecates `registrar.getDomainPremiumPrice` in favour of `registrar.getDomainPrices`
19
+
20
+ ## 6.0.0
21
+
22
+ - NEW: Added `registrar.get_domain_prices` to retrieve whether a domain is premium and the prices to register, transfer, and renew. (dnsimple/dnsimple-ruby#230)
23
+ - REMOVED: `domain.reset_domain_token` endpoint no longer exists and the client method is removed. (dnsimple/dnsimple-ruby#231)
24
+ - REMOVED: The deprecated `Domain.expires_on` is removed. (dnsimple/dnsimple-ruby#232)
25
+ - REMOVED: The deprecated `Certificate.expires_on` is removed. (dnsimple/dnsimple-ruby#232)
26
+
5
27
  ## 5.2.0
6
28
 
7
29
  - CHANGED: `Certificate#expires_on` (date only) is deprecated in favor of `Certificate#expires_at` (timestamp). (dnsimple/dnsimple-ruby#190)
@@ -22,7 +44,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
22
44
 
23
45
  - NEW: Added WHOIS privacy renewal (GH-171)
24
46
 
25
-
26
47
  ## 4.5.0
27
48
 
28
49
  - NEW: Added zone distribution and zone record distribution (GH-160)
@@ -33,26 +54,22 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
33
54
 
34
55
  - REMOVED: Removed extra alias (GH-168). You should use `dnsimple.foo.list_foo` instead of `dnsimple.foo.list`. Same for create/update. The change ensures consistency across the various clients. We prefer fully qualified methods.
35
56
 
36
-
37
57
  ## 4.4.0
38
58
 
39
59
  - NEW: Added Let's Encrypt certificate methods (GH-159)
40
60
 
41
61
  - REMOVED: Removed premium_price attribute from registrar order responses (GH-163). Please do not rely on that attribute, as it returned an incorrect value. The attribute is going to be removed, and the API now returns a null value.
42
62
 
43
-
44
63
  ## 4.3.0
45
64
 
46
65
  - NEW: Added `certificates.all_certificates` (dnsimple/dnsimple-ruby#155)
47
66
 
48
67
  - CHANGED: Updated registrar URLs (dnsimple/dnsimple-ruby#153)
49
68
 
50
-
51
69
  ## 4.2.0
52
70
 
53
71
  - NEW: Added DNSSEC support support (dnsimple/dnsimple-ruby#152)
54
72
 
55
-
56
73
  ## 4.1.0
57
74
 
58
75
  - NEW: Added domain premium price support (dnsimple/dnsimple-ruby#143)
@@ -60,7 +77,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
60
77
  - CHANGED: Updated registration, transfer, renewal response payload (dnsimple/dnsimple-developer#111, dnsimple/dnsimple-ruby#140).
61
78
  - CHANGED: Normalize unique string identifiers to SID (dnsimple/dnsimple-ruby#141)
62
79
 
63
-
64
80
  ## 4.0.0
65
81
 
66
82
  - NEW: Added domain collaborators support (GH-137).
@@ -77,7 +93,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
77
93
  - CHANGED: Updated Tld payload (GH-133, GH-129).
78
94
  - CHANGED: Renamed registrar `auth_info` into `auth_code` (GH-136).
79
95
 
80
-
81
96
  ## 3.1.0
82
97
 
83
98
  - NEW: Added accounts support (GH-113).
@@ -91,7 +106,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
91
106
 
92
107
  - REMOVED: Removed support for wildcard accounts (GH-107).
93
108
 
94
-
95
109
  ## 3.0.0
96
110
 
97
111
  ### stable
@@ -134,7 +148,7 @@ Internal changes were made to match conventions adopted in other clients, such a
134
148
 
135
149
  ## 2.0.0
136
150
 
137
- **2.0.0.alpha**
151
+ ### 2.0.0.alpha
138
152
 
139
153
  2.0 is a complete client redesign.
140
154
 
@@ -152,7 +166,7 @@ Internal changes were made to match conventions adopted in other clients, such a
152
166
 
153
167
  - REMOVED: The library no longer provides built-in support for loading the credentials from a config file.
154
168
 
155
- **2.0**
169
+ ### 2.0
156
170
 
157
171
  - FIXED: Fixed a bug where API token environment variables were not properly detected (GH-59, GH-62). Thanks @oguzbilgic and @rupurt.
158
172
 
data/CONTRIBUTING.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Getting started
4
4
 
5
- #### 1. Clone the repository
5
+ ### 1. Clone the repository
6
6
 
7
7
  Clone the repository and move into it:
8
8
 
@@ -11,19 +11,18 @@ git clone git@github.com:dnsimple/dnsimple-ruby.git
11
11
  cd dnsimple-ruby
12
12
  ```
13
13
 
14
- #### 2. Install the dependencies
14
+ ### 2. Install the dependencies
15
15
 
16
16
  Install the dependencies using [Bundler](http://bundler.io/):
17
17
 
18
- ```
18
+ ```shell
19
19
  bundle
20
20
  ```
21
21
 
22
- #### 3. Build and test
22
+ ### 3. Build and test
23
23
 
24
24
  [Run the test suite](#testing) to check everything works as expected.
25
25
 
26
-
27
26
  ## Releasing
28
27
 
29
28
  The following instructions uses `$VERSION` as a placeholder, where `$VERSION` is a `MAJOR.MINOR.BUGFIX` release such as `1.2.0`.
@@ -36,13 +35,13 @@ The following instructions uses `$VERSION` as a placeholder, where `$VERSION` is
36
35
 
37
36
  1. Run the test suite and ensure all the tests pass.
38
37
 
39
- 1. Finalize the `## master` section in `CHANGELOG.md` assigning the version.
38
+ 1. Finalize the `## main` section in `CHANGELOG.md` assigning the version.
40
39
 
41
40
  1. Commit and push the changes
42
41
 
43
42
  ```shell
44
43
  git commit -a -m "Release $VERSION"
45
- git push origin master
44
+ git push origin main
46
45
  ```
47
46
 
48
47
  1. Wait for CI to complete.
@@ -54,30 +53,16 @@ The following instructions uses `$VERSION` as a placeholder, where `$VERSION` is
54
53
  git push origin --tags
55
54
  ```
56
55
 
57
- 1. Build the package.
58
-
59
- ```shell
60
- rake build
61
- ```
62
-
63
- 1. Release to RubyGems.
64
-
65
- ```shell
66
- gem push pkg/<filename>
67
- ```
68
-
69
-
70
56
  ## Testing
71
57
 
72
58
  To run the test suite:
73
59
 
74
- ```
60
+ ```shell
75
61
  rake
76
62
  ```
77
63
 
78
-
79
64
  ## Tests
80
65
 
81
66
  Submit unit tests for your changes. You can test your changes on your machine by [running the test suite](#testing).
82
67
 
83
- When you submit a PR, tests will also be run on the [continuous integration environment via Travis](https://travis-ci.org/dnsimple/dnsimple-ruby).
68
+ When you submit a PR, tests will also be run on the [continuous integration environment via GitHub Actions](https://github.com/dnsimple/dnsimple-ruby/actions).
data/Gemfile CHANGED
@@ -5,5 +5,7 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  gem 'coveralls', require: false
8
- gem 'rubocop', '0.85.1', require: false
8
+ gem 'rubocop', '1.24.1', require: false
9
9
  gem 'rubocop-performance', require: false
10
+ gem 'rubocop-rake', require: false
11
+ gem 'rubocop-rspec', require: false
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2010-2020 DNSimple Corporation
3
+ Copyright (c) 2010-2022 DNSimple Corporation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,25 +2,24 @@
2
2
 
3
3
  A Ruby client for the [DNSimple API v2](https://developer.dnsimple.com/v2/).
4
4
 
5
- [![Build Status](https://travis-ci.com/dnsimple/dnsimple-ruby.svg?branch=master)](https://travis-ci.com/dnsimple/dnsimple-ruby)
6
- [![Coverage Status](https://img.shields.io/coveralls/dnsimple/dnsimple-ruby.svg)](https://coveralls.io/r/dnsimple/dnsimple-ruby?branch=master)
5
+ [![Build Status](https://github.com/dnsimple/dnsimple-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/dnsimple/dnsimple-ruby/actions/workflows/ci.yml)
6
+ [![Coverage Status](https://img.shields.io/coveralls/dnsimple/dnsimple-ruby.svg)](https://coveralls.io/r/dnsimple/dnsimple-ruby?branch=main)
7
7
 
8
8
  [DNSimple](https://dnsimple.com/) provides DNS hosting and domain registration that is simple and friendly.
9
9
  We provide a full API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.
10
10
 
11
-
12
11
  ## Installation
13
12
 
14
13
  You can install the gem manually:
15
14
 
16
- ```
15
+ ```shell
17
16
  gem install dnsimple
18
17
  ```
19
18
 
20
19
  Or use Bundler and define it as a dependency in your Gemfile:
21
20
 
22
- ```
23
- gem 'dnsimple', '~> 4.0'
21
+ ```ruby
22
+ gem 'dnsimple', '~> 6.0'
24
23
  ```
25
24
 
26
25
  ## Usage
@@ -59,8 +58,7 @@ response = client.domains.domain(account_id, "example.com")
59
58
  puts response.data
60
59
  ```
61
60
 
62
- For the full library documentation visit http://rubydoc.info/gems/dnsimple
63
-
61
+ For the full library documentation visit <http://rubydoc.info/gems/dnsimple>
64
62
 
65
63
  ## Sandbox Environment
66
64
 
@@ -74,7 +72,6 @@ client = Dnsimple::Client.new(base_url: "https://api.sandbox.dnsimple.com", acce
74
72
 
75
73
  You will need to ensure that you are using an access token created in the sandbox environment. Production tokens will *not* work in the sandbox environment.
76
74
 
77
-
78
75
  ## Setting a custom `User-Agent` header
79
76
 
80
77
  You can customize the `User-Agent` header for the calls made to the DNSimple API:
@@ -87,7 +84,6 @@ The value you provide will be prepended to the default `User-Agent` the client u
87
84
 
88
85
  We recommend to customize the user agent. If you are building a library or integration on top of the official client, customizing the client will help us to understand what is this client used for, and allow to contribute back or get in touch.
89
86
 
90
-
91
87
  ## License
92
88
 
93
- Copyright (c) 2010-2020 DNSimple Corporation. This is Free Software distributed under the MIT license.
89
+ Copyright (c) 2010-2022 DNSimple Corporation. This is Free Software distributed under the MIT license.
data/UPGRADING.md CHANGED
@@ -7,8 +7,7 @@ and take advantage of Ruby 1.9.3 and Ruby 2.0.
7
7
 
8
8
  If you are upgrading your code from v1.x, here's the major changes you should be aware of.
9
9
 
10
-
11
- 1. The client is now an instance.
10
+ 1. The client is now an instance.
12
11
 
13
12
  All the API calls are performed within the scope of an instance, rather than a class,
14
13
  making it possible to pass the client around, write thread-safe code and create multiple client instances
@@ -25,7 +24,7 @@ If you are upgrading your code from v1.x, here's the major changes you should be
25
24
  domain = client.domains.domain("example.com")
26
25
  ```
27
26
 
28
- 1. API call responses are now simple struct-like objects, rather Model-like objects.
27
+ 1. API call responses are now simple struct-like objects, rather Model-like objects.
29
28
 
30
29
  ```ruby
31
30
  domain = client.domains.domain("example.com")
@@ -35,7 +34,7 @@ If you are upgrading your code from v1.x, here's the major changes you should be
35
34
  A struct-like object is designed to be a simple container of key/value attributes,
36
35
  as opposite to a fully-features instance you can interact with.
37
36
 
38
- 1. API methods are now defined as methods of the client instance.
37
+ 1. API methods are now defined as methods of the client instance.
39
38
 
40
39
  This is a consequence (or the cause, depending on the POV) of the previous point. It is no longer possible to call
41
40
  persistence methods on an object returned from the API, as it was in v1.
@@ -99,4 +98,4 @@ If you are upgrading your code from v1.x, here's the major changes you should be
99
98
 
100
99
  ```ruby
101
100
  client.domains.update_record("example.com", 12, name: "updated", content: "127.0.0.1")
102
- ```
101
+ ```