dnsimple 7.0.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/dependabot.yml +11 -1
  4. data/.github/workflows/ci.yml +67 -0
  5. data/.github/workflows/release.yml +28 -0
  6. data/.markdownlint.yaml +3 -0
  7. data/.rubocop.yml +2 -5
  8. data/.rubocop_dnsimple.yml +28 -18
  9. data/.rubocop_todo.yml +1 -1
  10. data/.yamllint.yml +29 -0
  11. data/CHANGELOG.md +19 -13
  12. data/CONTRIBUTING.md +6 -21
  13. data/Gemfile +1 -1
  14. data/LICENSE.txt +1 -1
  15. data/README.md +5 -9
  16. data/Rakefile +1 -1
  17. data/UPGRADING.md +4 -5
  18. data/dnsimple.gemspec +1 -1
  19. data/lib/dnsimple/client/certificates.rb +5 -7
  20. data/lib/dnsimple/client/clients.rb +0 -5
  21. data/lib/dnsimple/client/domains_delegation_signer_records.rb +5 -4
  22. data/lib/dnsimple/client/registrar.rb +0 -29
  23. data/lib/dnsimple/default.rb +9 -9
  24. data/lib/dnsimple/extra.rb +1 -1
  25. data/lib/dnsimple/struct/delegation_signer_record.rb +3 -0
  26. data/lib/dnsimple/struct/tld.rb +3 -0
  27. data/lib/dnsimple/version.rb +1 -1
  28. data/spec/dnsimple/client/certificates_spec.rb +8 -9
  29. data/spec/dnsimple/client/contacts_spec.rb +2 -2
  30. data/spec/dnsimple/client/domains_collaborators_spec.rb +2 -2
  31. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +3 -2
  32. data/spec/dnsimple/client/domains_email_forwards_spec.rb +2 -2
  33. data/spec/dnsimple/client/domains_spec.rb +2 -2
  34. data/spec/dnsimple/client/registrar_spec.rb +1 -49
  35. data/spec/dnsimple/client/services_spec.rb +1 -1
  36. data/spec/dnsimple/client/templates_records_spec.rb +1 -1
  37. data/spec/dnsimple/client/templates_spec.rb +2 -2
  38. data/spec/dnsimple/client/tlds_spec.rb +2 -1
  39. data/spec/dnsimple/client/zones_records_spec.rb +3 -3
  40. data/spec/dnsimple/client/zones_spec.rb +2 -2
  41. data/spec/dnsimple/client_spec.rb +32 -33
  42. data/spec/dnsimple/extra_spec.rb +1 -1
  43. data/spec/fixtures.http/createDelegationSignerRecord/created.http +1 -1
  44. data/spec/fixtures.http/getDelegationSignerRecord/success.http +1 -1
  45. data/spec/fixtures.http/getTld/success.http +1 -1
  46. data/spec/fixtures.http/listDelegationSignerRecords/success.http +1 -1
  47. data/spec/fixtures.http/listTlds/success.http +1 -1
  48. metadata +10 -186
  49. data/.travis.yml +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cf8d057d98c78bf3b8584e15b561624dfb35f1264f80d0c5861e970053b18f3
4
- data.tar.gz: acc7e6f33680ba4195243b474dca108e566c953ed2474e36fd9631c9f6b1f2fc
3
+ metadata.gz: 54546cd64cb573f075ed2538cebd73573708a1f9919364b4b963a082b1dc97bf
4
+ data.tar.gz: 9e86592b7ff194316f5466d2b0a4cf0f988df1e90973bc29cfc30a4b7e2bccd8
5
5
  SHA512:
6
- metadata.gz: 504d15c395fcbbb08a4c351912f9cb47e0dac082ae9da5ef22161bc5bc6a5fc6e1f46466ab7c482385c996a558a10dad4d12fc2cd1eac130c417f6c21e70cfd0
7
- data.tar.gz: 3ebc372cd78a2bc5d4cf3bdcab9168e572856fe0614da843949c5a58a1508399281b25a621e399280b1e4464a72ea5099d9e88e227aec7a564213297d81a6720
6
+ metadata.gz: 997ac7555b02778d5bb10c03aa97640a5a2b3e2a55064785657774da5032a8b11cf009b0de1d47dc4864c5835ea1426bc46bed082119d7aae1c87dc5058d44ed
7
+ data.tar.gz: 7fee63c8c4f9ae899023989de18fc920b45bd5405b2075040ef167f1b7f82e0b8ddf7b6364dd23f42ac9f6ff5a53a900493af42eb489f7fa0f6acc17be74fd3b
@@ -0,0 +1 @@
1
+ * @dnsimple/client-ruby
@@ -1,3 +1,4 @@
1
+ ---
1
2
  version: 2
2
3
  updates:
3
4
  - package-ecosystem: bundler
@@ -9,4 +10,13 @@ updates:
9
10
  labels:
10
11
  - task
11
12
  - dependencies
12
- - backlog-dependencies
13
+
14
+ - package-ecosystem: "github-actions"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "daily"
18
+ time: '12:00'
19
+ open-pull-requests-limit: 10
20
+ labels:
21
+ - task
22
+ - dependencies
@@ -0,0 +1,67 @@
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@v3
20
+ - name: Run markdownlint-cli
21
+ uses: nosborn/github-action-markdown-cli@v3.1.0
22
+ with:
23
+ files: .
24
+ config_file: ".markdownlint.yaml"
25
+
26
+ yamllint:
27
+ name: Lint YAML
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - name: Checkout Code
31
+ uses: actions/checkout@v3
32
+ - name: Run YAML Lint
33
+ uses: actionshub/yamllint@main
34
+
35
+ test:
36
+ needs: [markdownlint-cli, yamllint]
37
+ runs-on: ubuntu-latest
38
+ name: Ruby ${{ matrix.ruby-version }}
39
+ strategy:
40
+ matrix:
41
+ ruby-version:
42
+ - '2.7'
43
+ - '3.0'
44
+ - '3.1'
45
+ - 'ruby-head'
46
+ - 'truffleruby-head'
47
+ steps:
48
+ - uses: actions/checkout@v3
49
+ - name: Set up Ruby
50
+ uses: ruby/setup-ruby@v1
51
+ with:
52
+ ruby-version: ${{ matrix.ruby-version }}
53
+ bundler-cache: true
54
+ - run: bundle exec rake
55
+
56
+ slack-workflow-status:
57
+ if: always()
58
+ name: Post Workflow Status To Slack
59
+ needs:
60
+ - test
61
+ runs-on: ubuntu-latest
62
+ steps:
63
+ - name: Slack Workflow Notification
64
+ uses: Gamesight/slack-workflow-status@master
65
+ with:
66
+ repo_token: ${{secrets.GITHUB_TOKEN}}
67
+ slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL_DEVELOPMENT}}
@@ -0,0 +1,28 @@
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.1.2
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@v3
23
+
24
+ - name: Release Gem
25
+ uses: cadwallion/publish-rubygems-action@8f9e0538302643309e4e43bf48cd34173ca48cfc # yamllint disable-line
26
+ env:
27
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
28
+ RELEASE_COMMAND: rake release
@@ -0,0 +1,3 @@
1
+ ---
2
+ default: true
3
+ line-length: false
data/.rubocop.yml CHANGED
@@ -1,3 +1,4 @@
1
+ ---
1
2
  inherit_from:
2
3
  - .rubocop_todo.yml
3
4
  - .rubocop_dnsimple.yml
@@ -8,12 +9,8 @@ require:
8
9
  - rubocop-rspec
9
10
 
10
11
  AllCops:
11
- TargetRubyVersion: 2.6
12
+ TargetRubyVersion: 3.0
12
13
  Exclude:
13
14
  - '*.gemspec'
14
15
  - 'Rakefile'
15
16
  - 'vendor/**/*'
16
-
17
- # This rule conflicts with our specs codebase using Ruby 2.x and 3.x
18
- Lint/NonDeterministicRequireOrder:
19
- Enabled: false
@@ -1,3 +1,4 @@
1
+ ---
1
2
  # Defaults https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
3
  #
3
4
  # References:
@@ -24,8 +25,8 @@ Layout/AccessModifierIndentation:
24
25
  Layout/BlockEndNewline:
25
26
  Enabled: false
26
27
 
27
- # Generally, the keyword style uses a lot of space. This is particularly true when
28
- # 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.
29
30
  #
30
31
  # invoice_error_message = case error
31
32
  # when 1 == 1
@@ -139,7 +140,7 @@ Style/BarePercentLiterals:
139
140
  # braces_for_chaining seems a good fit of what we've been doing so far.
140
141
  Style/BlockDelimiters:
141
142
  EnforcedStyle: braces_for_chaining
142
- IgnoredMethods:
143
+ AllowedMethods:
143
144
  - expect
144
145
 
145
146
  # Warn on empty else.
@@ -147,7 +148,8 @@ Style/EmptyElse:
147
148
  EnforcedStyle: empty
148
149
 
149
150
  # There is no specific preference for empty methods.
150
- # 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.
151
153
  Style/EmptyMethod:
152
154
  Enabled: false
153
155
 
@@ -157,8 +159,10 @@ Style/EmptyMethod:
157
159
  Style/FormatString:
158
160
  Enabled: false
159
161
 
160
- # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
161
- # %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.
162
166
  Style/FormatStringToken:
163
167
  Enabled: false
164
168
 
@@ -170,15 +174,18 @@ Style/HashSyntax:
170
174
  # that looks nicer with the old rocket syntax.
171
175
  - 'Rakefile'
172
176
 
173
- # 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).
174
179
  Style/HashEachMethods:
175
180
  Enabled: true
176
181
 
177
- # 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.
178
184
  Style/HashTransformKeys:
179
185
  Enabled: true
180
186
 
181
- # 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.
182
189
  Style/HashTransformValues:
183
190
  Enabled: true
184
191
 
@@ -213,8 +220,8 @@ Style/NumericLiterals:
213
220
  - 'spec/**/*_spec.rb'
214
221
  - 'test/**/*_test.rb'
215
222
 
216
- # For years, %w() has been the de-facto standard. A lot of libraries are using ().
217
- # 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.
218
225
  Style/PercentLiteralDelimiters:
219
226
  Enabled: false
220
227
 
@@ -233,12 +240,13 @@ Style/RedundantReturn:
233
240
  Style/RegexpLiteral:
234
241
  Enabled: false
235
242
 
236
- # There are cases were the inline rescue is ok. We can either downgrade the severity,
237
- # 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.
238
245
  Style/RescueModifier:
239
246
  Enabled: false
240
247
 
241
- # 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).
242
250
  Style/SymbolArray:
243
251
  Enabled: false
244
252
 
@@ -294,8 +302,8 @@ Style/WordArray:
294
302
  Style/YodaCondition:
295
303
  Enabled: false
296
304
 
297
- # For the same reason of EndAlignment, aligning with the case may have a bad impact
298
- # 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.
299
307
  #
300
308
  # invoice_error_message = case error
301
309
  # when 1 == 1
@@ -317,14 +325,16 @@ Layout/DotPosition:
317
325
  Layout/EmptyLines:
318
326
  Enabled: false
319
327
 
320
- # 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
321
330
  Layout/EmptyLinesAroundArguments:
322
331
  Enabled: false
323
332
 
324
333
  Layout/EmptyLinesAroundBlockBody:
325
334
  Exclude:
326
335
  # RSpec is all made of blocks. Disable this config in RSpec
327
- # to be consistent with EmptyLinesAroundClassBody and EmptyLinesAroundModuleBody
336
+ # to be consistent with EmptyLinesAroundClassBody
337
+ # and EmptyLinesAroundModuleBody
328
338
  - 'spec/**/*_spec.rb'
329
339
  - 'test/**/*_test.rb'
330
340
 
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2021-06-01 13:07:05 UTC using RuboCop version 1.16.0.
3
+ # on 2022-08-09 14:54:31 UTC using RuboCop version 1.34.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
data/.yamllint.yml ADDED
@@ -0,0 +1,29 @@
1
+ ---
2
+
3
+ extends: default
4
+
5
+ rules:
6
+ braces:
7
+ level: warning
8
+ max-spaces-inside: 1
9
+ brackets:
10
+ level: warning
11
+ max-spaces-inside: 1
12
+ colons:
13
+ level: warning
14
+ commas:
15
+ level: warning
16
+ comments: disable
17
+ comments-indentation: disable
18
+ document-start: disable
19
+ empty-lines:
20
+ level: warning
21
+ hyphens:
22
+ level: warning
23
+ indentation:
24
+ level: warning
25
+ indent-sequences: consistent
26
+ line-length:
27
+ level: warning
28
+ allow-non-breakable-inline-mappings: true
29
+ truthy: disable
data/CHANGELOG.md CHANGED
@@ -4,7 +4,22 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
5
  ## main
6
6
 
7
- ## 0.7.0
7
+ ## 8.0.0
8
+
9
+ - CHANGED: Minimum Ruby version is now 2.7
10
+ - REMOVED: `registrar.getDomainPremiumPrice` in favour of `registrar.getDomainPrices`
11
+ - CHANGED: Deprecate Certificate's `contact_id` (dnsimple/dnsimple-ruby#276)
12
+ - FIXED: Remove stale reference to Client::DomainServicesService (dnsimple/dnsimple-ruby#267)
13
+
14
+ ## 7.1.1
15
+
16
+ - CHANGED: Bumped up dependencies
17
+
18
+ ## 7.1.0
19
+
20
+ - CHANGED: Updated DNSSEC-related structs and entrypoints to support DS record key-data interface. (dnsimple/dnsimple-ruby#252)
21
+
22
+ ## 7.0.0
8
23
 
9
24
  - CHANGED: Minimum Ruby version is now 2.6
10
25
  - CHANGED: Deprecates `registrar.getDomainPremiumPrice` in favour of `registrar.getDomainPrices`
@@ -12,8 +27,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
12
27
  ## 6.0.0
13
28
 
14
29
  - 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)
15
- - REMOVED: `domain.reset_domain_token` endpoint no longer exists and the client method is removed.
16
- (dnsimple/dnsimple-ruby#231)
30
+ - REMOVED: `domain.reset_domain_token` endpoint no longer exists and the client method is removed. (dnsimple/dnsimple-ruby#231)
17
31
  - REMOVED: The deprecated `Domain.expires_on` is removed. (dnsimple/dnsimple-ruby#232)
18
32
  - REMOVED: The deprecated `Certificate.expires_on` is removed. (dnsimple/dnsimple-ruby#232)
19
33
 
@@ -37,7 +51,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
37
51
 
38
52
  - NEW: Added WHOIS privacy renewal (GH-171)
39
53
 
40
-
41
54
  ## 4.5.0
42
55
 
43
56
  - NEW: Added zone distribution and zone record distribution (GH-160)
@@ -48,26 +61,22 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
48
61
 
49
62
  - 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.
50
63
 
51
-
52
64
  ## 4.4.0
53
65
 
54
66
  - NEW: Added Let's Encrypt certificate methods (GH-159)
55
67
 
56
68
  - 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.
57
69
 
58
-
59
70
  ## 4.3.0
60
71
 
61
72
  - NEW: Added `certificates.all_certificates` (dnsimple/dnsimple-ruby#155)
62
73
 
63
74
  - CHANGED: Updated registrar URLs (dnsimple/dnsimple-ruby#153)
64
75
 
65
-
66
76
  ## 4.2.0
67
77
 
68
78
  - NEW: Added DNSSEC support support (dnsimple/dnsimple-ruby#152)
69
79
 
70
-
71
80
  ## 4.1.0
72
81
 
73
82
  - NEW: Added domain premium price support (dnsimple/dnsimple-ruby#143)
@@ -75,7 +84,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
75
84
  - CHANGED: Updated registration, transfer, renewal response payload (dnsimple/dnsimple-developer#111, dnsimple/dnsimple-ruby#140).
76
85
  - CHANGED: Normalize unique string identifiers to SID (dnsimple/dnsimple-ruby#141)
77
86
 
78
-
79
87
  ## 4.0.0
80
88
 
81
89
  - NEW: Added domain collaborators support (GH-137).
@@ -92,7 +100,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
92
100
  - CHANGED: Updated Tld payload (GH-133, GH-129).
93
101
  - CHANGED: Renamed registrar `auth_info` into `auth_code` (GH-136).
94
102
 
95
-
96
103
  ## 3.1.0
97
104
 
98
105
  - NEW: Added accounts support (GH-113).
@@ -106,7 +113,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
106
113
 
107
114
  - REMOVED: Removed support for wildcard accounts (GH-107).
108
115
 
109
-
110
116
  ## 3.0.0
111
117
 
112
118
  ### stable
@@ -149,7 +155,7 @@ Internal changes were made to match conventions adopted in other clients, such a
149
155
 
150
156
  ## 2.0.0
151
157
 
152
- **2.0.0.alpha**
158
+ ### 2.0.0.alpha
153
159
 
154
160
  2.0 is a complete client redesign.
155
161
 
@@ -167,7 +173,7 @@ Internal changes were made to match conventions adopted in other clients, such a
167
173
 
168
174
  - REMOVED: The library no longer provides built-in support for loading the credentials from a config file.
169
175
 
170
- **2.0**
176
+ ### 2.0
171
177
 
172
178
  - FIXED: Fixed a bug where API token environment variables were not properly detected (GH-59, GH-62). Thanks @oguzbilgic and @rupurt.
173
179
 
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`.
@@ -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,7 +5,7 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  gem 'coveralls', require: false
8
- gem 'rubocop', '1.16.0', require: false
8
+ gem 'rubocop', '1.34.1', require: false
9
9
  gem 'rubocop-performance', require: false
10
10
  gem 'rubocop-rake', require: false
11
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-2021 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,24 +2,23 @@
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=main)](https://travis-ci.com/dnsimple/dnsimple-ruby)
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
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
- ```
21
+ ```ruby
23
22
  gem 'dnsimple', '~> 6.0'
24
23
  ```
25
24
 
@@ -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-2021 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/Rakefile CHANGED
@@ -33,5 +33,5 @@ task :clobber => "yardoc:clobber"
33
33
 
34
34
  desc "Open an irb session preloaded with this library"
35
35
  task :console do
36
- sh "irb -rubygems -I lib -r dnsimple.rb"
36
+ sh "irb -r rubygems -I lib -r dnsimple.rb"
37
37
  end
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
+ ```
data/dnsimple.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.summary = 'The DNSimple API client for Ruby'
12
12
  s.description = 'The DNSimple API client for Ruby.'
13
13
 
14
- s.required_ruby_version = ">= 2.6"
14
+ s.required_ruby_version = ">= 2.7"
15
15
 
16
16
  s.require_paths = ['lib']
17
17
  s.files = `git ls-files`.split("\n")
@@ -121,7 +121,6 @@ module Dnsimple
121
121
  # @param account_id [Integer] the account ID
122
122
  # @param domain_id [#to_s] the domain ID or domain name
123
123
  # @param attributes [Hash]
124
- # @option attributes [Integer] :contact_id the contact ID (mandatory)
125
124
  # @option attributes [String] :name the certificate name (optional)
126
125
  # @option attributes [Array<String>] :alternate_names the certificate alternate names (optional)
127
126
  # @option attributes [TrueClass,FalseClass] :auto_renew enable certificate auto renew (optional)
@@ -133,7 +132,7 @@ module Dnsimple
133
132
  # @raise [Dnsimple::RequestError]
134
133
  #
135
134
  # @example Basic usage
136
- # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1)
135
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com")
137
136
  # certificate = response.data
138
137
  #
139
138
  # certificate.id # => 100
@@ -142,7 +141,7 @@ module Dnsimple
142
141
  # certificate.auto_renew # => false
143
142
  #
144
143
  # @example Custom name
145
- # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1, name: "docs")
144
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", name: "docs")
146
145
  # certificate = response.data
147
146
  #
148
147
  # certificate.id # => 100
@@ -151,7 +150,7 @@ module Dnsimple
151
150
  # certificate.auto_renew # => false
152
151
  #
153
152
  # @example SAN names
154
- # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1, alternate_names: ["api.example.com", "status.example.com"])
153
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", alternate_names: ["api.example.com", "status.example.com"])
155
154
  # certificate = response.data
156
155
  #
157
156
  # certificate.id # => 100
@@ -160,15 +159,14 @@ module Dnsimple
160
159
  # certificate.auto_renew # => false
161
160
  #
162
161
  # @example Auto renew
163
- # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", contact_id: 1, auto_renew: true)
162
+ # response = client.certificates.purchase_letsencrypt_certificate(1010, "example.com", auto_renew: true)
164
163
  # certificate = response.data
165
164
  #
166
165
  # certificate.id # => 100
167
166
  # certificate.common_name # => "www.example.com"
168
167
  # certificate.alternate_names # => []
169
168
  # certificate.auto_renew # => true
170
- def purchase_letsencrypt_certificate(account_id, domain_id, attributes, options = {})
171
- Extra.validate_mandatory_attributes(attributes, [:contact_id])
169
+ def purchase_letsencrypt_certificate(account_id, domain_id, attributes = {}, options = {})
172
170
  response = client.post(Client.versioned("/%s/domains/%s/certificates/letsencrypt" % [account_id, domain_id]), attributes, options)
173
171
 
174
172
  Dnsimple::Response.new(response, Struct::CertificatePurchase.new(response["data"]))