dnsimple 10.0.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +5 -7
  3. data/.github/workflows/ci.yml +3 -3
  4. data/.github/workflows/release.yml +2 -2
  5. data/.github/workflows/sync-test-fixtures.yml +55 -0
  6. data/.markdownlint.yaml +15 -1
  7. data/.rubocop.yml +1 -1
  8. data/.rubocop_dnsimple.yml +14 -30
  9. data/CHANGELOG.md +5 -0
  10. data/Gemfile +7 -7
  11. data/lib/dnsimple/client/clients.rb +29 -31
  12. data/lib/dnsimple/client/domains_email_forwards.rb +1 -1
  13. data/lib/dnsimple/client.rb +5 -5
  14. data/lib/dnsimple/default.rb +7 -7
  15. data/lib/dnsimple/response.rb +3 -3
  16. data/lib/dnsimple/struct/charge.rb +1 -1
  17. data/lib/dnsimple/struct/email_forward.rb +0 -8
  18. data/lib/dnsimple/struct.rb +40 -40
  19. data/lib/dnsimple/version.rb +1 -1
  20. data/lib/dnsimple.rb +5 -5
  21. data/spec/dnsimple/client/accounts_spec.rb +2 -2
  22. data/spec/dnsimple/client/billing_spec.rb +3 -3
  23. data/spec/dnsimple/client/certificates_spec.rb +11 -11
  24. data/spec/dnsimple/client/client_service_spec.rb +1 -1
  25. data/spec/dnsimple/client/contacts_spec.rb +6 -6
  26. data/spec/dnsimple/client/dns_analytics_spec.rb +9 -9
  27. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +5 -5
  28. data/spec/dnsimple/client/domains_dnssec_spec.rb +4 -4
  29. data/spec/dnsimple/client/domains_email_forwards_spec.rb +8 -15
  30. data/spec/dnsimple/client/domains_pushes_spec.rb +5 -5
  31. data/spec/dnsimple/client/domains_spec.rb +6 -6
  32. data/spec/dnsimple/client/identity_spec.rb +2 -2
  33. data/spec/dnsimple/client/oauth_spec.rb +3 -3
  34. data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +3 -3
  35. data/spec/dnsimple/client/registrar_delegation_spec.rb +1 -1
  36. data/spec/dnsimple/client/registrar_spec.rb +1 -1
  37. data/spec/dnsimple/client/registrar_transfer_lock_spec.rb +4 -4
  38. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +1 -1
  39. data/spec/dnsimple/client/services_domains_spec.rb +4 -4
  40. data/spec/dnsimple/client/services_spec.rb +1 -1
  41. data/spec/dnsimple/client/templates_domains_spec.rb +2 -2
  42. data/spec/dnsimple/client/templates_records_spec.rb +4 -4
  43. data/spec/dnsimple/client/templates_spec.rb +2 -2
  44. data/spec/dnsimple/client/tlds_spec.rb +5 -5
  45. data/spec/dnsimple/client/vanity_name_servers_spec.rb +1 -1
  46. data/spec/dnsimple/client/webhooks_spec.rb +5 -5
  47. data/spec/dnsimple/client/zones_distributions_spec.rb +3 -3
  48. data/spec/dnsimple/client/zones_records_spec.rb +7 -7
  49. data/spec/dnsimple/client/zones_spec.rb +6 -6
  50. data/spec/dnsimple/client_spec.rb +10 -10
  51. data/spec/dnsimple/extra_spec.rb +1 -1
  52. data/spec/dnsimple/options/base_spec.rb +5 -5
  53. data/spec/dnsimple/options/list_options_spec.rb +21 -21
  54. data/spec/fixtures.http/accounts/success-user.http +2 -1
  55. data/spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http +4 -4
  56. data/spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http +4 -4
  57. data/spec/fixtures.http/checkRegistrantChange/success.http +5 -5
  58. data/spec/fixtures.http/createContact/error-validation-errors.http +18 -0
  59. data/spec/fixtures.http/createEmailForward/created.http +1 -2
  60. data/spec/fixtures.http/createRegistrantChange/success.http +5 -5
  61. data/spec/fixtures.http/createWebhook/created.http +16 -16
  62. data/spec/fixtures.http/deleteRegistrantChange/success.http +4 -4
  63. data/spec/fixtures.http/deleteRegistrantChange/success_async.http +14 -0
  64. data/spec/fixtures.http/dnsAnalytics/success.http +1 -1
  65. data/spec/fixtures.http/getDomainPrices/failure.http +18 -18
  66. data/spec/fixtures.http/getDomainPrices/success.http +21 -21
  67. data/spec/fixtures.http/getDomainRestore/success.http +13 -14
  68. data/spec/fixtures.http/getEmailForward/success.http +1 -2
  69. data/spec/fixtures.http/getRegistrantChange/success.http +5 -5
  70. data/spec/fixtures.http/getTld/success.http +1 -1
  71. data/spec/fixtures.http/getWebhook/success.http +16 -16
  72. data/spec/fixtures.http/listAccounts/success-user.http +1 -1
  73. data/spec/fixtures.http/listCharges/fail-400-bad-filter.http +0 -2
  74. data/spec/fixtures.http/listCharges/fail-403.http +0 -2
  75. data/spec/fixtures.http/listCharges/success.http +0 -2
  76. data/spec/fixtures.http/listEmailForwards/success.http +1 -1
  77. data/spec/fixtures.http/listRegistrantChanges/success.http +5 -5
  78. data/spec/fixtures.http/listTlds/success.http +1 -1
  79. data/spec/fixtures.http/listWebhooks/success.http +16 -16
  80. data/spec/fixtures.http/registerDomain/error-extended-attributes.http +18 -0
  81. data/spec/fixtures.http/restoreDomain/success.http +12 -13
  82. data/spec/fixtures.http/updateZoneNsRecords/success.http +16 -0
  83. data/spec/fixtures.http/whoami/success-account.http +1 -1
  84. data/spec/fixtures.http/whoami/success.http +1 -1
  85. data/spec/spec_helper.rb +4 -4
  86. data/spec/support/webmock.rb +1 -1
  87. metadata +7 -11
  88. data/.github/CODEOWNERS +0 -1
  89. data/.github/workflows/auto-merge.yml +0 -32
  90. data/lib/dnsimple/client/domains_collaborators.rb +0 -87
  91. data/spec/dnsimple/client/domains_collaborators_spec.rb +0 -164
  92. data/spec/fixtures.http/addCollaborator/invite-success.http +0 -20
  93. data/spec/fixtures.http/addCollaborator/success.http +0 -20
  94. data/spec/fixtures.http/listCollaborators/success.http +0 -20
  95. data/spec/fixtures.http/notfound-collaborator.http +0 -15
  96. data/spec/fixtures.http/removeCollaborator/success.http +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 717f1a8443a707774595d0f3f4fc0ebeeb1383bd91424e1fdca0e46ba9fd9043
4
- data.tar.gz: 0f97c2fa6be76c363bb2a1f6ac793553c051a55f6e191597c0aaf2669c4d3b32
3
+ metadata.gz: 4181725aaf336953ed62dc82cb74fe1d4457880f9fccf3940c817e27ffa559b5
4
+ data.tar.gz: 11662d9a7780adbb47599e34a6e820c2b980c0be22ec79985557f4bd1801592c
5
5
  SHA512:
6
- metadata.gz: 270a8d238b4e9bca275f407c2643152892288b8328fa0e1df43750b2a180f172e38597697cc2d936ca9eb0eb284bcaa0f80d534692d6ee8ca3cbde0d3f068dda
7
- data.tar.gz: 8c0bcc9b2b79848ab07c440e0bda804284918e0cfe668c2d838a388609825ff5d200569d26198aed4d6a5545403f9a026c04b5a10d2fc88987b0988bf0b24608
6
+ metadata.gz: c4357613ee6e5c1b8d25a89a8ce6d61fa53c3369bf59ff9e33f5fce0fc800f31e5a0f0d4709726de2fb0f0c4bc7ec092a34c238d9b8fca28bdb722ad6cd2462b
7
+ data.tar.gz: fa7726f50d6794b34ce537292d50b8050379751942201dad2e61ae246aed2ba5079841140b87ac6bd4494b724aeebc155cc59438f9f9693f69b8dc0c4742357f
@@ -4,18 +4,16 @@ updates:
4
4
  - package-ecosystem: bundler
5
5
  directory: /
6
6
  schedule:
7
- interval: monthly
7
+ interval: weekly
8
8
  open-pull-requests-limit: 10
9
9
  labels:
10
10
  - task
11
11
  - dependencies
12
- - package-ecosystem: "github-actions"
13
- directory: "/"
12
+
13
+ - package-ecosystem: github-actions
14
+ directory: /
14
15
  schedule:
15
- interval: monthly
16
- time: '12:00'
17
- open-pull-requests-limit: 10
16
+ interval: weekly
18
17
  labels:
19
18
  - task
20
19
  - dependencies
21
- - automerge
@@ -16,9 +16,9 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
  steps:
18
18
  - name: Checkout Code
19
- uses: actions/checkout@v4
19
+ uses: actions/checkout@v5
20
20
  - name: Run markdownlint-cli
21
- uses: nosborn/github-action-markdown-cli@v3.4.0
21
+ uses: nosborn/github-action-markdown-cli@v3.5.0
22
22
  with:
23
23
  files: .
24
24
  config_file: ".markdownlint.yaml"
@@ -36,7 +36,7 @@ jobs:
36
36
  - 'ruby-head'
37
37
  - 'truffleruby-head'
38
38
  steps:
39
- - uses: actions/checkout@v4
39
+ - uses: actions/checkout@v5
40
40
  - name: Set up Ruby
41
41
  uses: ruby/setup-ruby@v1
42
42
  with:
@@ -11,7 +11,7 @@ jobs:
11
11
 
12
12
  steps:
13
13
  - name: Wait for tests to succeed
14
- uses: lewagon/wait-on-check-action@v1.3.4
14
+ uses: lewagon/wait-on-check-action@v1.4.0
15
15
  with:
16
16
  ref: 'refs/heads/main'
17
17
  running-workflow-name: 'Release to RubyGems'
@@ -19,7 +19,7 @@ jobs:
19
19
  wait-interval: 10
20
20
  allowed-conclusions: success
21
21
 
22
- - uses: actions/checkout@v4
22
+ - uses: actions/checkout@v5
23
23
 
24
24
  - name: Release Gem
25
25
  uses: simplyqio/publish-rubygems-action@2.0.0
@@ -0,0 +1,55 @@
1
+ name: Sync test fixtures
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ sync_fixtures:
8
+ name: Sync test fixtures
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout repository
12
+ uses: actions/checkout@v5
13
+ - name: Sync fixtures
14
+ run: |
15
+ TMP_DIR=$(mktemp -d)
16
+ curl -fsSL "https://codeload.github.com/dnsimple/dnsimple-developer/tar.gz/refs/heads/main" \
17
+ | tar -xz -C "$TMP_DIR"
18
+ rsync -a --delete "$TMP_DIR/dnsimple-developer-main/fixtures/v2/api/" spec/fixtures.http/
19
+ - name: Create a PR to sync fixtures if there are changes
20
+ run: |
21
+ cat <<'MD' > pr_body.md
22
+ This PR replaces the fixtures in this repository with those from https://github.com/dnsimple/dnsimple-developer/
23
+
24
+ ## Checklist
25
+ - [ ] Close and re-open this PR to trigger the CI workflow (it does not run automatically)
26
+ - [ ] Ensure the CI workflow passes before merging
27
+ MD
28
+
29
+ # Configure Git identity for the workflow
30
+ git config --global user.name "github-actions"
31
+ git config --global user.email "github-actions@github.com"
32
+
33
+ # Create and switch to a new branch
34
+ BRANCH="chore/sync-fixtures-${GITHUB_RUN_ID}"
35
+ NOW="$(date +'%Y-%m-%d %H:%M:%S')"
36
+ git checkout -b "$BRANCH"
37
+
38
+ # Stage changes
39
+ git add spec/fixtures.http
40
+
41
+ # Commit if there are staged changes
42
+ if ! git diff --cached --quiet; then
43
+ git commit -m "chore: sync test fixtures as of $NOW"
44
+ git push -u origin "$BRANCH"
45
+
46
+ gh pr create \
47
+ --title "chore: Sync fixtures as of $NOW" \
48
+ --body-file pr_body.md \
49
+ --base main \
50
+ --head "$BRANCH"
51
+ else
52
+ echo "No fixture detected; nothing to do"
53
+ fi
54
+ env:
55
+ GITHUB_TOKEN: ${{ github.token }}
data/.markdownlint.yaml CHANGED
@@ -1,3 +1,17 @@
1
1
  ---
2
2
  default: true
3
- line-length: false
3
+
4
+ # no-hard-tabs
5
+ MD010:
6
+ code_blocks: false
7
+
8
+ # no-multiple-blanks
9
+ MD012:
10
+ maximum: 2
11
+
12
+ # line-length
13
+ MD013: false
14
+
15
+ # no-duplicate-heading
16
+ MD024:
17
+ siblings_only: true
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_from:
3
3
  - .rubocop_todo.yml
4
4
  - .rubocop_dnsimple.yml
5
5
 
6
- require:
6
+ plugins:
7
7
  - rubocop-performance
8
8
  - rubocop-rake
9
9
  - rubocop-rspec
@@ -1,8 +1,13 @@
1
- # Defaults https://github.com/bbatsov/rubocop/blob/master/config/default.yml
1
+ # This file serves as a template for RuboCop configuration. The primary template is maintained in the engineering repository.
2
+ # Please ensure that any changes made here are also reflected in the engineering file to maintain consistency.
2
3
  #
3
- # References:
4
- # * https://github.com/bbatsov/ruby-style-guide
5
- # * https://rubocop.readthedocs.io/
4
+ # DNSimple Ruby engineering template: https://github.com/dnsimple/dnsimple-engineering/blob/main/templates/ruby/rubocop_dnsimple.yml
5
+ #
6
+ # For default configurations, refer to: https://github.com/bbatsov/rubocop/blob/master/config/default.yml
7
+ #
8
+ # Additional References:
9
+ # * Ruby Style Guide: https://github.com/bbatsov/ruby-style-guide
10
+ # * RuboCop Documentation: https://rubocop.readthedocs.io/
6
11
 
7
12
  AllCops:
8
13
  Exclude:
@@ -10,20 +15,6 @@ AllCops:
10
15
  - '*.gemspec'
11
16
  NewCops: enable
12
17
 
13
- # In most cases, Gems are sorted alphabetically.
14
- # However, in some few cases the order is relevant due to dependencies.
15
- Bundler/OrderedGems:
16
- Enabled: false
17
-
18
- # This cop requires odd code indentations (as of rubocop 0.57.0)
19
- # https://github.com/rubocop-hq/rubocop/issues/5956
20
- Layout/AccessModifierIndentation:
21
- Enabled: false
22
-
23
- # It causes weird aligments, especially for specs.
24
- Layout/BlockEndNewline:
25
- Enabled: false
26
-
27
18
  # Generally, the keyword style uses a lot of space. This is particularly true when
28
19
  # you use case/if statements, in combination with a long-name variable.
29
20
  #
@@ -110,7 +101,7 @@ Naming/MemoizedInstanceVariableName:
110
101
  Naming/PredicateName:
111
102
  Enabled: false
112
103
 
113
- # The team agreed decided to use exception
104
+ # The team agreed decided to use exception.
114
105
  Naming/RescuedExceptionsVariableName:
115
106
  PreferredName: 'exception'
116
107
 
@@ -160,8 +151,10 @@ Style/FormatString:
160
151
  Style/FormatStringToken:
161
152
  Enabled: false
162
153
 
163
- # Prefer the latest Hash syntax
154
+ # always - forces use of the 3.1 syntax (e.g. foo:)
155
+ # https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/HashSyntax
164
156
  Style/HashSyntax:
157
+ EnforcedShorthandSyntax: always
165
158
  Exclude:
166
159
  # Rakefiles generally have definitions like
167
160
  # :default => :test
@@ -191,7 +184,7 @@ Style/MultilineBlockChain:
191
184
  Style/NegatedIf:
192
185
  Enabled: false
193
186
 
194
- # Magic numbers are not welcomed
187
+ # Magic numbers are not welcomed.
195
188
  Style/NumericLiterals:
196
189
  Exclude:
197
190
  # however tests can use numeric literals for method calls,
@@ -219,13 +212,9 @@ Style/SpecialGlobalVars:
219
212
  Enabled: false
220
213
  EnforcedStyle: use_perl_names
221
214
 
222
- # We generally use double quotes, sometimes single quotes.
223
- # Should we enforce it at code level?
224
215
  Style/StringLiterals:
225
- Enabled: false
226
216
  EnforcedStyle: double_quotes
227
217
 
228
- # Pick one option for consistency.
229
218
  Style/StringLiteralsInInterpolation:
230
219
  EnforcedStyle: double_quotes
231
220
 
@@ -266,11 +255,6 @@ Style/WordArray:
266
255
  Layout/CaseIndentation:
267
256
  EnforcedStyle: end
268
257
 
269
- # I was a big fan of leading, but trailing seems to be more commonly adopted.
270
- # At least at the time being.
271
- Layout/DotPosition:
272
- EnforcedStyle: leading
273
-
274
258
  # Double empty lines are useful to separate conceptually different methods
275
259
  # in the same class or module.
276
260
  Layout/EmptyLines:
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
5
  ## main
6
6
 
7
+ ## 11.0.0
8
+
9
+ - CHANGED: Removed `from` and `to` fields in `EmailForward`
10
+ - CHANGED: Removed `DomainCollaborators`
11
+
7
12
  ## 10.0.0
8
13
 
9
14
  - CHANGED: Minimum Ruby version is now 3.2
data/Gemfile CHANGED
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'coveralls', require: false
8
- gem 'rubocop', '1.75.4', require: false
9
- gem 'rubocop-performance', '1.25.0', require: false
10
- gem 'rubocop-rake', '0.7.1', require: false
11
- gem 'rubocop-rspec', '3.6.0', require: false
12
- gem "base64", "~> 0.2.0"
7
+ gem "base64", "~> 0.3.0"
13
8
  gem "bigdecimal", "~> 3.1"
9
+ gem "coveralls", "~> 0.8", require: false
14
10
  gem "csv", "~> 3.2"
11
+ gem "rubocop", "~> 1.75", require: false
12
+ gem "rubocop-performance", "~> 1.25", require: false
13
+ gem "rubocop-rake", "~> 0.7", require: false
14
+ gem "rubocop-rspec", "~> 3.6", require: false
@@ -120,7 +120,7 @@ module Dnsimple
120
120
  end
121
121
 
122
122
 
123
- require_relative 'accounts'
123
+ require_relative "accounts"
124
124
 
125
125
  class AccountsService < ClientService
126
126
 
@@ -128,7 +128,7 @@ module Dnsimple
128
128
 
129
129
  end
130
130
 
131
- require_relative 'billing'
131
+ require_relative "billing"
132
132
 
133
133
  class BillingService < ClientService
134
134
 
@@ -136,7 +136,7 @@ module Dnsimple
136
136
 
137
137
  end
138
138
 
139
- require_relative 'certificates'
139
+ require_relative "certificates"
140
140
 
141
141
  class CertificatesService < ClientService
142
142
 
@@ -145,7 +145,7 @@ module Dnsimple
145
145
  end
146
146
 
147
147
 
148
- require_relative 'contacts'
148
+ require_relative "contacts"
149
149
 
150
150
  class ContactsService < ClientService
151
151
 
@@ -154,12 +154,11 @@ module Dnsimple
154
154
  end
155
155
 
156
156
 
157
- require_relative 'domains'
158
- require_relative 'domains_delegation_signer_records'
159
- require_relative 'domains_dnssec'
160
- require_relative 'domains_email_forwards'
161
- require_relative 'domains_pushes'
162
- require_relative 'domains_collaborators'
157
+ require_relative "domains"
158
+ require_relative "domains_delegation_signer_records"
159
+ require_relative "domains_dnssec"
160
+ require_relative "domains_email_forwards"
161
+ require_relative "domains_pushes"
163
162
 
164
163
  class DomainsService < ClientService
165
164
 
@@ -168,11 +167,10 @@ module Dnsimple
168
167
  include Client::DomainsDnssec
169
168
  include Client::DomainsEmailForwards
170
169
  include Client::DomainsPushes
171
- include Client::DomainsCollaborators
172
170
 
173
171
  end
174
172
 
175
- require_relative 'dns_analytics'
173
+ require_relative "dns_analytics"
176
174
 
177
175
  class DnsAnalyticsService < ClientService
178
176
 
@@ -181,7 +179,7 @@ module Dnsimple
181
179
  end
182
180
 
183
181
 
184
- require_relative 'identity'
182
+ require_relative "identity"
185
183
 
186
184
  class IdentityService < ClientService
187
185
 
@@ -190,7 +188,7 @@ module Dnsimple
190
188
  end
191
189
 
192
190
 
193
- require_relative 'oauth'
191
+ require_relative "oauth"
194
192
 
195
193
  class OauthService < ClientService
196
194
 
@@ -198,12 +196,12 @@ module Dnsimple
198
196
 
199
197
  end
200
198
 
201
- require_relative 'registrar'
202
- require_relative 'registrar_auto_renewal'
203
- require_relative 'registrar_whois_privacy'
204
- require_relative 'registrar_registrant_changes'
205
- require_relative 'registrar_transfer_lock'
206
- require_relative 'registrar_delegation'
199
+ require_relative "registrar"
200
+ require_relative "registrar_auto_renewal"
201
+ require_relative "registrar_whois_privacy"
202
+ require_relative "registrar_registrant_changes"
203
+ require_relative "registrar_transfer_lock"
204
+ require_relative "registrar_delegation"
207
205
 
208
206
  class RegistrarService < ClientService
209
207
 
@@ -217,8 +215,8 @@ module Dnsimple
217
215
  end
218
216
 
219
217
 
220
- require_relative 'services'
221
- require_relative 'services_domains'
218
+ require_relative "services"
219
+ require_relative "services_domains"
222
220
 
223
221
  class ServicesService < ClientService
224
222
 
@@ -228,9 +226,9 @@ module Dnsimple
228
226
  end
229
227
 
230
228
 
231
- require_relative 'templates'
232
- require_relative 'templates_domains'
233
- require_relative 'templates_records'
229
+ require_relative "templates"
230
+ require_relative "templates_domains"
231
+ require_relative "templates_records"
234
232
 
235
233
  class TemplatesService < ClientService
236
234
 
@@ -241,7 +239,7 @@ module Dnsimple
241
239
  end
242
240
 
243
241
 
244
- require_relative 'tlds'
242
+ require_relative "tlds"
245
243
 
246
244
  class TldsService < ClientService
247
245
 
@@ -250,7 +248,7 @@ module Dnsimple
250
248
  end
251
249
 
252
250
 
253
- require_relative 'vanity_name_servers'
251
+ require_relative "vanity_name_servers"
254
252
 
255
253
  class VanityNameServersService < ClientService
256
254
 
@@ -259,9 +257,9 @@ module Dnsimple
259
257
  end
260
258
 
261
259
 
262
- require_relative 'zones'
263
- require_relative 'zones_records'
264
- require_relative 'zones_distributions'
260
+ require_relative "zones"
261
+ require_relative "zones_records"
262
+ require_relative "zones_distributions"
265
263
 
266
264
  class ZonesService < ClientService
267
265
 
@@ -272,7 +270,7 @@ module Dnsimple
272
270
  end
273
271
 
274
272
 
275
- require_relative 'webhooks'
273
+ require_relative "webhooks"
276
274
 
277
275
  class WebhooksService < ClientService
278
276
 
@@ -69,7 +69,7 @@ module Dnsimple
69
69
  #
70
70
  # @raise [Dnsimple::RequestError]
71
71
  def create_email_forward(account_id, domain_id, attributes, options = {})
72
- Extra.validate_mandatory_attributes(attributes, [:from, :to])
72
+ Extra.validate_mandatory_attributes(attributes, [:alias_name, :destination_email])
73
73
  response = client.post(Client.versioned("/%s/domains/%s/email_forwards" % [account_id, domain_id]), attributes, options)
74
74
 
75
75
  Dnsimple::Response.new(response, Struct::EmailForward.new(response["data"]))
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'httparty'
4
- require 'dnsimple/extra'
5
- require 'dnsimple/struct'
6
- require 'dnsimple/response'
7
- require 'dnsimple/client/clients'
3
+ require "httparty"
4
+ require "dnsimple/extra"
5
+ require "dnsimple/struct"
6
+ require "dnsimple/response"
7
+ require "dnsimple/client/clients"
8
8
 
9
9
  module Dnsimple
10
10
  # Client for the DNSimple API
@@ -35,43 +35,43 @@ module Dnsimple
35
35
  # Default API endpoint from ENV or {BASE_URL}
36
36
  # @return [String]
37
37
  def base_url
38
- ENV.fetch('DNSIMPLE_BASE_URL', BASE_URL)
38
+ ENV.fetch("DNSIMPLE_BASE_URL", BASE_URL)
39
39
  end
40
40
 
41
41
  # Default DNSimple username for Basic Auth from ENV
42
42
  # @return [String]
43
43
  def username
44
- ENV.fetch('DNSIMPLE_USERNAME', nil)
44
+ ENV.fetch("DNSIMPLE_USERNAME", nil)
45
45
  end
46
46
 
47
47
  # Default DNSimple password for Basic Auth from ENV
48
48
  # @return [String]
49
49
  def password
50
- ENV.fetch('DNSIMPLE_PASSWORD', nil)
50
+ ENV.fetch("DNSIMPLE_PASSWORD", nil)
51
51
  end
52
52
 
53
53
  # Default DNSimple access token for OAuth authentication from ENV
54
54
  # @return [String]
55
55
  def access_token
56
- ENV.fetch('DNSIMPLE_ACCESS_TOKEN', nil)
56
+ ENV.fetch("DNSIMPLE_ACCESS_TOKEN", nil)
57
57
  end
58
58
 
59
59
  # Default DNSimple Domain API Token for Token Auth from ENV
60
60
  # @return [String]
61
61
  def domain_api_token
62
- ENV.fetch('DNSIMPLE_API_DOMAIN_TOKEN', nil)
62
+ ENV.fetch("DNSIMPLE_API_DOMAIN_TOKEN", nil)
63
63
  end
64
64
 
65
65
  # Default User-Agent header string from ENV
66
66
  # @return [String]
67
67
  def user_agent
68
- ENV.fetch('DNSIMPLE_USER_AGENT', nil)
68
+ ENV.fetch("DNSIMPLE_USER_AGENT", nil)
69
69
  end
70
70
 
71
71
  # Default Proxy address:port from ENV
72
72
  # @return [String]
73
73
  def proxy
74
- ENV.fetch('DNSIMPLE_PROXY', nil)
74
+ ENV.fetch("DNSIMPLE_PROXY", nil)
75
75
  end
76
76
 
77
77
  end
@@ -32,9 +32,9 @@ module Dnsimple
32
32
  @http_response = http_response
33
33
  @data = data
34
34
 
35
- @rate_limit = http_response.headers['X-RateLimit-Limit'].to_i
36
- @rate_limit_remaining = http_response.headers['X-RateLimit-Remaining'].to_i
37
- @rate_limit_reset = Time.at(http_response.headers['X-RateLimit-Reset'].to_i)
35
+ @rate_limit = http_response.headers["X-RateLimit-Limit"].to_i
36
+ @rate_limit_remaining = http_response.headers["X-RateLimit-Remaining"].to_i
37
+ @rate_limit_reset = Time.at(http_response.headers["X-RateLimit-Reset"].to_i)
38
38
  end
39
39
 
40
40
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bigdecimal'
3
+ require "bigdecimal"
4
4
 
5
5
  module Dnsimple
6
6
  module Struct
@@ -10,14 +10,6 @@ module Dnsimple
10
10
  # @return [Integer] The associated domain ID.
11
11
  attr_accessor :domain_id
12
12
 
13
- # @return [String] The "local part" of the originating email address. Anything to the left of the @ symbol.
14
- # @deprecated use {#alias_email} instead
15
- attr_accessor :from
16
-
17
- # @return [String] The full email address to forward to.
18
- # @deprecated use {#destination_email} instead
19
- attr_accessor :to
20
-
21
13
  # @return [String] The receiving email recipient.
22
14
  attr_accessor :alias_email
23
15
 
@@ -15,43 +15,43 @@ module Dnsimple
15
15
  end
16
16
  end
17
17
 
18
- require_relative 'struct/account'
19
- require_relative 'struct/collaborator'
20
- require_relative 'struct/contact'
21
- require_relative 'struct/certificate'
22
- require_relative 'struct/certificate_bundle'
23
- require_relative 'struct/certificate_purchase'
24
- require_relative 'struct/certificate_renewal'
25
- require_relative 'struct/charge'
26
- require_relative 'struct/delegation_signer_record'
27
- require_relative 'struct/dnssec'
28
- require_relative 'struct/domain'
29
- require_relative 'struct/domain_check'
30
- require_relative 'struct/domain_premium_price'
31
- require_relative 'struct/domain_price'
32
- require_relative 'struct/domain_push'
33
- require_relative 'struct/domain_registration'
34
- require_relative 'struct/domain_restore'
35
- require_relative 'struct/domain_transfer'
36
- require_relative 'struct/domain_renewal'
37
- require_relative 'struct/dns_analytics'
38
- require_relative 'struct/email_forward'
39
- require_relative 'struct/extended_attribute'
40
- require_relative 'struct/oauth_token'
41
- require_relative 'struct/registrant_change_check'
42
- require_relative 'struct/registrant_change'
43
- require_relative 'struct/transfer_lock'
44
- require_relative 'struct/zone_record'
45
- require_relative 'struct/service'
46
- require_relative 'struct/template'
47
- require_relative 'struct/template_record'
48
- require_relative 'struct/tld'
49
- require_relative 'struct/user'
50
- require_relative 'struct/vanity_name_server'
51
- require_relative 'struct/whois_privacy'
52
- require_relative 'struct/whois_privacy_renewal'
53
- require_relative 'struct/zone'
54
- require_relative 'struct/zone_file'
55
- require_relative 'struct/zone_distribution'
56
- require_relative 'struct/webhook'
57
- require_relative 'struct/whoami'
18
+ require_relative "struct/account"
19
+ require_relative "struct/collaborator"
20
+ require_relative "struct/contact"
21
+ require_relative "struct/certificate"
22
+ require_relative "struct/certificate_bundle"
23
+ require_relative "struct/certificate_purchase"
24
+ require_relative "struct/certificate_renewal"
25
+ require_relative "struct/charge"
26
+ require_relative "struct/delegation_signer_record"
27
+ require_relative "struct/dnssec"
28
+ require_relative "struct/domain"
29
+ require_relative "struct/domain_check"
30
+ require_relative "struct/domain_premium_price"
31
+ require_relative "struct/domain_price"
32
+ require_relative "struct/domain_push"
33
+ require_relative "struct/domain_registration"
34
+ require_relative "struct/domain_restore"
35
+ require_relative "struct/domain_transfer"
36
+ require_relative "struct/domain_renewal"
37
+ require_relative "struct/dns_analytics"
38
+ require_relative "struct/email_forward"
39
+ require_relative "struct/extended_attribute"
40
+ require_relative "struct/oauth_token"
41
+ require_relative "struct/registrant_change_check"
42
+ require_relative "struct/registrant_change"
43
+ require_relative "struct/transfer_lock"
44
+ require_relative "struct/zone_record"
45
+ require_relative "struct/service"
46
+ require_relative "struct/template"
47
+ require_relative "struct/template_record"
48
+ require_relative "struct/tld"
49
+ require_relative "struct/user"
50
+ require_relative "struct/vanity_name_server"
51
+ require_relative "struct/whois_privacy"
52
+ require_relative "struct/whois_privacy_renewal"
53
+ require_relative "struct/zone"
54
+ require_relative "struct/zone_file"
55
+ require_relative "struct/zone_distribution"
56
+ require_relative "struct/webhook"
57
+ require_relative "struct/whoami"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dnsimple
4
4
 
5
- VERSION = "10.0.0"
5
+ VERSION = "11.0.0"
6
6
 
7
7
  end