dnsimple 7.0.0 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/dependabot.yml +1 -0
- data/.github/workflows/ci.yml +63 -0
- data/.markdownlint.yaml +3 -0
- data/.rubocop.yml +2 -1
- data/.rubocop_dnsimple.yml +27 -17
- data/.rubocop_todo.yml +2 -1
- data/CHANGELOG.md +8 -13
- data/CONTRIBUTING.md +6 -9
- data/Gemfile +1 -1
- data/README.md +4 -8
- data/UPGRADING.md +4 -5
- data/lib/dnsimple/client/domains_delegation_signer_records.rb +5 -4
- data/lib/dnsimple/default.rb +1 -1
- data/lib/dnsimple/struct/delegation_signer_record.rb +3 -0
- data/lib/dnsimple/struct/tld.rb +3 -0
- data/lib/dnsimple/version.rb +1 -1
- data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +1 -0
- data/spec/dnsimple/client/tlds_spec.rb +1 -0
- data/spec/dnsimple/extra_spec.rb +1 -1
- data/spec/fixtures.http/createDelegationSignerRecord/created.http +1 -1
- data/spec/fixtures.http/getDelegationSignerRecord/success.http +1 -1
- data/spec/fixtures.http/getTld/success.http +1 -1
- data/spec/fixtures.http/listDelegationSignerRecords/success.http +1 -1
- data/spec/fixtures.http/listTlds/success.http +1 -1
- metadata +9 -7
- data/.travis.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 599aae97228fa50e3a918d98e618849d91aa7aa011afcbd06d7fe61a2fb1e281
|
4
|
+
data.tar.gz: f1c811c95ab28badb5438cf56470b15c8794f31c7da241c28982fb08585ae1fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23e64d29706bac2d104de41666b272d4ec89185be32d3def31d1e4fe6ee776c89e082b0c15ba084338d34b47df950c35159f8d01c6d6cc5191b3fec22129f3c8
|
7
|
+
data.tar.gz: eb126f66a71dd8bc5e7eb7cd329645a5f1cefdce5652b91218d5b0108d5e4a77f3000cc9eff2fd0fe24b149ac185dad7ec61560ce1797006e643b98750c5e463
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @dnsimple/client-ruby
|
data/.github/dependabot.yml
CHANGED
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
name: ci
|
3
|
+
|
4
|
+
"on":
|
5
|
+
pull_request:
|
6
|
+
push:
|
7
|
+
|
8
|
+
# Allows you to run this workflow manually from the Actions tab
|
9
|
+
workflow_dispatch:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
markdownlint-cli:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- name: Checkout Code
|
16
|
+
uses: actions/checkout@v2
|
17
|
+
- name: Run markdownlint-cli
|
18
|
+
uses: nosborn/github-action-markdown-cli@v2.0.0
|
19
|
+
with:
|
20
|
+
files: .
|
21
|
+
config_file: ".markdownlint.yaml"
|
22
|
+
|
23
|
+
yamllint:
|
24
|
+
runs-on: ubuntu-latest
|
25
|
+
steps:
|
26
|
+
- name: Checkout Code
|
27
|
+
uses: actions/checkout@v2
|
28
|
+
- name: Run YAML Lint
|
29
|
+
uses: actionshub/yamllint@main
|
30
|
+
|
31
|
+
build:
|
32
|
+
needs: [markdownlint-cli, yamllint]
|
33
|
+
runs-on: ubuntu-latest
|
34
|
+
name: Ruby ${{ matrix.ruby-version }}
|
35
|
+
strategy:
|
36
|
+
matrix:
|
37
|
+
ruby-version:
|
38
|
+
- '2.6'
|
39
|
+
- '2.7'
|
40
|
+
- '3.0'
|
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}}
|
data/.markdownlint.yaml
ADDED
data/.rubocop.yml
CHANGED
data/.rubocop_dnsimple.yml
CHANGED
@@ -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
|
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
|
@@ -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.
|
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,
|
161
|
-
#
|
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
|
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
|
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
|
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.
|
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
|
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
|
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
|
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`
|
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
|
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,7 @@
|
|
1
|
+
---
|
1
2
|
# This configuration was generated by
|
2
3
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2021-
|
4
|
+
# on 2021-10-04 12:28:12 UTC using RuboCop version 1.22.1.
|
4
5
|
# The point is for the user to remove these configuration records
|
5
6
|
# one by one as the offenses are removed from the code base.
|
6
7
|
# Note that changes in the inspected code, or installation of new
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,11 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
|
4
4
|
|
5
5
|
## main
|
6
6
|
|
7
|
-
##
|
7
|
+
## 7.1.0
|
8
|
+
|
9
|
+
- CHANGED: Updated DNSSEC-related structs and entrypoints to support DS record key-data interface. (dnsimple/dnsimple-ruby#252)
|
10
|
+
|
11
|
+
## 7.0.0
|
8
12
|
|
9
13
|
- CHANGED: Minimum Ruby version is now 2.6
|
10
14
|
- CHANGED: Deprecates `registrar.getDomainPremiumPrice` in favour of `registrar.getDomainPrices`
|
@@ -12,8 +16,7 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
|
12
16
|
## 6.0.0
|
13
17
|
|
14
18
|
- 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)
|
19
|
+
- REMOVED: `domain.reset_domain_token` endpoint no longer exists and the client method is removed. (dnsimple/dnsimple-ruby#231)
|
17
20
|
- REMOVED: The deprecated `Domain.expires_on` is removed. (dnsimple/dnsimple-ruby#232)
|
18
21
|
- REMOVED: The deprecated `Certificate.expires_on` is removed. (dnsimple/dnsimple-ruby#232)
|
19
22
|
|
@@ -37,7 +40,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
|
37
40
|
|
38
41
|
- NEW: Added WHOIS privacy renewal (GH-171)
|
39
42
|
|
40
|
-
|
41
43
|
## 4.5.0
|
42
44
|
|
43
45
|
- NEW: Added zone distribution and zone record distribution (GH-160)
|
@@ -48,26 +50,22 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
|
48
50
|
|
49
51
|
- 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
52
|
|
51
|
-
|
52
53
|
## 4.4.0
|
53
54
|
|
54
55
|
- NEW: Added Let's Encrypt certificate methods (GH-159)
|
55
56
|
|
56
57
|
- 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
58
|
|
58
|
-
|
59
59
|
## 4.3.0
|
60
60
|
|
61
61
|
- NEW: Added `certificates.all_certificates` (dnsimple/dnsimple-ruby#155)
|
62
62
|
|
63
63
|
- CHANGED: Updated registrar URLs (dnsimple/dnsimple-ruby#153)
|
64
64
|
|
65
|
-
|
66
65
|
## 4.2.0
|
67
66
|
|
68
67
|
- NEW: Added DNSSEC support support (dnsimple/dnsimple-ruby#152)
|
69
68
|
|
70
|
-
|
71
69
|
## 4.1.0
|
72
70
|
|
73
71
|
- NEW: Added domain premium price support (dnsimple/dnsimple-ruby#143)
|
@@ -75,7 +73,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
|
75
73
|
- CHANGED: Updated registration, transfer, renewal response payload (dnsimple/dnsimple-developer#111, dnsimple/dnsimple-ruby#140).
|
76
74
|
- CHANGED: Normalize unique string identifiers to SID (dnsimple/dnsimple-ruby#141)
|
77
75
|
|
78
|
-
|
79
76
|
## 4.0.0
|
80
77
|
|
81
78
|
- NEW: Added domain collaborators support (GH-137).
|
@@ -92,7 +89,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
|
92
89
|
- CHANGED: Updated Tld payload (GH-133, GH-129).
|
93
90
|
- CHANGED: Renamed registrar `auth_info` into `auth_code` (GH-136).
|
94
91
|
|
95
|
-
|
96
92
|
## 3.1.0
|
97
93
|
|
98
94
|
- NEW: Added accounts support (GH-113).
|
@@ -106,7 +102,6 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
|
|
106
102
|
|
107
103
|
- REMOVED: Removed support for wildcard accounts (GH-107).
|
108
104
|
|
109
|
-
|
110
105
|
## 3.0.0
|
111
106
|
|
112
107
|
### stable
|
@@ -149,7 +144,7 @@ Internal changes were made to match conventions adopted in other clients, such a
|
|
149
144
|
|
150
145
|
## 2.0.0
|
151
146
|
|
152
|
-
|
147
|
+
### 2.0.0.alpha
|
153
148
|
|
154
149
|
2.0 is a complete client redesign.
|
155
150
|
|
@@ -167,7 +162,7 @@ Internal changes were made to match conventions adopted in other clients, such a
|
|
167
162
|
|
168
163
|
- REMOVED: The library no longer provides built-in support for loading the credentials from a config file.
|
169
164
|
|
170
|
-
|
165
|
+
### 2.0
|
171
166
|
|
172
167
|
- FIXED: Fixed a bug where API token environment variables were not properly detected (GH-59, GH-62). Thanks @oguzbilgic and @rupurt.
|
173
168
|
|
data/CONTRIBUTING.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
## Getting started
|
4
4
|
|
5
|
-
|
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
|
-
|
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
|
-
|
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`.
|
@@ -66,18 +65,16 @@ The following instructions uses `$VERSION` as a placeholder, where `$VERSION` is
|
|
66
65
|
gem push pkg/<filename>
|
67
66
|
```
|
68
67
|
|
69
|
-
|
70
68
|
## Testing
|
71
69
|
|
72
70
|
To run the test suite:
|
73
71
|
|
74
|
-
```
|
72
|
+
```shell
|
75
73
|
rake
|
76
74
|
```
|
77
75
|
|
78
|
-
|
79
76
|
## Tests
|
80
77
|
|
81
78
|
Submit unit tests for your changes. You can test your changes on your machine by [running the test suite](#testing).
|
82
79
|
|
83
|
-
When you submit a PR, tests will also be run on the [continuous integration environment via
|
80
|
+
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.
|
8
|
+
gem 'rubocop', '1.22.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/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://
|
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
89
|
Copyright (c) 2010-2021 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.
|
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.
|
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
|
+
```
|
@@ -67,15 +67,16 @@ module Dnsimple
|
|
67
67
|
# @param [#to_s] domain_id The domain ID or domain name
|
68
68
|
# @param [Hash] attributes
|
69
69
|
# @option attributes [Integer] :algorithm DNSSEC algorithm as number (required)
|
70
|
-
# @option attributes [String] :digest The hexidecimal representation of the digest of the corresponding DNSKEY record (required)
|
71
|
-
# @option attributes [Integer] :digest_type DNSSEC digest type (required)
|
72
|
-
# @option attributes [String] :keytag A keytag that references the corresponding DNSKEY record (required)
|
70
|
+
# @option attributes [String] :digest The hexidecimal representation of the digest of the corresponding DNSKEY record (required if TLD requires DS data)
|
71
|
+
# @option attributes [Integer] :digest_type DNSSEC digest type (required if TLD requires DS data)
|
72
|
+
# @option attributes [String] :keytag A keytag that references the corresponding DNSKEY record (required if TLD requires DS data)
|
73
|
+
# @option attributes [String] :public_key A public key that references the corresponding DNSKEY record (required if TLD requires KEY data)
|
73
74
|
# @param [Hash] options
|
74
75
|
# @return [Dnsimple::Response<Dnsimple::Struct::DelegationSignerRecord>]
|
75
76
|
#
|
76
77
|
# @raise [Dnsimple::RequestError]
|
77
78
|
def create_delegation_signer_record(account_id, domain_id, attributes, options = {})
|
78
|
-
Extra.validate_mandatory_attributes(attributes, [:algorithm
|
79
|
+
Extra.validate_mandatory_attributes(attributes, [:algorithm])
|
79
80
|
response = client.post(Client.versioned("/%s/domains/%s/ds_records" % [account_id, domain_id]), attributes, options)
|
80
81
|
|
81
82
|
Dnsimple::Response.new(response, Struct::DelegationSignerRecord.new(response["data"]))
|
data/lib/dnsimple/default.rb
CHANGED
@@ -22,6 +22,9 @@ module Dnsimple
|
|
22
22
|
# @return [String] The keytag for the associated DNSKEY.
|
23
23
|
attr_accessor :keytag
|
24
24
|
|
25
|
+
# @return [String] The public key that references the corresponding DNSKEY record.
|
26
|
+
attr_accessor :public_key
|
27
|
+
|
25
28
|
# @return [String] When the delegation signing record was created in DNSimple.
|
26
29
|
attr_accessor :created_at
|
27
30
|
|
data/lib/dnsimple/struct/tld.rb
CHANGED
@@ -30,6 +30,9 @@ module Dnsimple
|
|
30
30
|
|
31
31
|
# @return [Boolean] True if DNSimple supports inbound transfers for this TLD.
|
32
32
|
attr_accessor :transfer_enabled
|
33
|
+
|
34
|
+
# @return [String, nil] Type of data interface required for DNSSEC for this TLD.
|
35
|
+
attr_accessor :dnssec_interface_type
|
33
36
|
end
|
34
37
|
|
35
38
|
end
|
data/lib/dnsimple/version.rb
CHANGED
@@ -155,6 +155,7 @@ describe Dnsimple::Client, ".domains" do
|
|
155
155
|
expect(result.digest).to eq("C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F")
|
156
156
|
expect(result.digest_type).to eq("2")
|
157
157
|
expect(result.keytag).to eq("44620")
|
158
|
+
expect(result.public_key).to be_nil
|
158
159
|
expect(result.created_at).to eq("2017-03-03T13:49:58Z")
|
159
160
|
expect(result.updated_at).to eq("2017-03-03T13:49:58Z")
|
160
161
|
end
|
@@ -107,6 +107,7 @@ describe Dnsimple::Client, ".tlds" do
|
|
107
107
|
expect(result.registration_enabled).to be(true)
|
108
108
|
expect(result.renewal_enabled).to be(true)
|
109
109
|
expect(result.transfer_enabled).to be(true)
|
110
|
+
expect(result.dnssec_interface_type).to eq("ds")
|
110
111
|
end
|
111
112
|
end
|
112
113
|
|
data/spec/dnsimple/extra_spec.rb
CHANGED
@@ -26,7 +26,7 @@ describe Dnsimple::Extra do
|
|
26
26
|
describe ".validate_mandatory_attributes" do
|
27
27
|
let(:mandatory_attributes) { %i(name email) }
|
28
28
|
|
29
|
-
it "raises an error if a mandatory attribute is not present
|
29
|
+
it "raises an error if a mandatory attribute is not present" do
|
30
30
|
expect {
|
31
31
|
described_class.validate_mandatory_attributes({ name: "foo" }, mandatory_attributes)
|
32
32
|
}.to raise_error(ArgumentError, ":email is required")
|
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
|
|
17
17
|
X-XSS-Protection: 1; mode=block
|
18
18
|
Strict-Transport-Security: max-age=31536000
|
19
19
|
|
20
|
-
{"data":{"id":2,"domain_id":1010,"algorithm":"13","digest":"684a1f049d7d082b7f98691657da5a65764913df7f065f6f8c36edf62d66ca03","digest_type":"2","keytag":"2371","created_at":"2017-03-03T15:24:00Z","updated_at":"2017-03-03T15:24:00Z"}}
|
20
|
+
{"data":{"id":2,"domain_id":1010,"algorithm":"13","digest":"684a1f049d7d082b7f98691657da5a65764913df7f065f6f8c36edf62d66ca03","digest_type":"2","keytag":"2371","public_key":null,"created_at":"2017-03-03T15:24:00Z","updated_at":"2017-03-03T15:24:00Z"}}
|
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
|
|
17
17
|
X-XSS-Protection: 1; mode=block
|
18
18
|
Strict-Transport-Security: max-age=31536000
|
19
19
|
|
20
|
-
{"data":{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}}
|
20
|
+
{"data":{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","public_key":null,"created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}}
|
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
|
|
17
17
|
X-XSS-Protection: 1; mode=block
|
18
18
|
Strict-Transport-Security: max-age=31536000
|
19
19
|
|
20
|
-
{"data":{"tld":"com","tld_type":1,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true}}
|
20
|
+
{"data":{"tld":"com","tld_type":1,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"ds"}}
|
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
|
|
17
17
|
X-XSS-Protection: 1; mode=block
|
18
18
|
Strict-Transport-Security: max-age=31536000
|
19
19
|
|
20
|
-
{"data":[{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
|
20
|
+
{"data":[{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","public_key":null,"created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
|
@@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
|
|
17
17
|
X-XSS-Protection: 1; mode=block
|
18
18
|
Strict-Transport-Security: max-age=31536000
|
19
19
|
|
20
|
-
{"data":[{"tld":"ac","tld_type":2,"whois_privacy":false,"auto_renew_only":true,"idn":false,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":false},{"tld":"academy","tld_type":3,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true}],"pagination":{"current_page":1,"per_page":2,"total_entries":195,"total_pages":98}}
|
20
|
+
{"data":[{"tld":"ac","tld_type":2,"whois_privacy":false,"auto_renew_only":true,"idn":false,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":false,"dnssec_interface_type":"ds"},{"tld":"academy","tld_type":3,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"key"}],"pagination":{"current_page":1,"per_page":2,"total_entries":195,"total_pages":98}}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsimple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DNSimple
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -88,13 +88,15 @@ extensions: []
|
|
88
88
|
extra_rdoc_files:
|
89
89
|
- LICENSE.txt
|
90
90
|
files:
|
91
|
+
- ".github/CODEOWNERS"
|
91
92
|
- ".github/dependabot.yml"
|
93
|
+
- ".github/workflows/ci.yml"
|
92
94
|
- ".gitignore"
|
95
|
+
- ".markdownlint.yaml"
|
93
96
|
- ".rspec"
|
94
97
|
- ".rubocop.yml"
|
95
98
|
- ".rubocop_dnsimple.yml"
|
96
99
|
- ".rubocop_todo.yml"
|
97
|
-
- ".travis.yml"
|
98
100
|
- CHANGELOG.md
|
99
101
|
- CONTRIBUTING.md
|
100
102
|
- Gemfile
|
@@ -356,7 +358,7 @@ files:
|
|
356
358
|
homepage: https://github.com/dnsimple/dnsimple-ruby
|
357
359
|
licenses: []
|
358
360
|
metadata: {}
|
359
|
-
post_install_message:
|
361
|
+
post_install_message:
|
360
362
|
rdoc_options: []
|
361
363
|
require_paths:
|
362
364
|
- lib
|
@@ -371,8 +373,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
371
373
|
- !ruby/object:Gem::Version
|
372
374
|
version: '0'
|
373
375
|
requirements: []
|
374
|
-
rubygems_version: 3.
|
375
|
-
signing_key:
|
376
|
+
rubygems_version: 3.2.29
|
377
|
+
signing_key:
|
376
378
|
specification_version: 4
|
377
379
|
summary: The DNSimple API client for Ruby
|
378
380
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
dist: focal
|
2
|
-
|
3
|
-
language: ruby
|
4
|
-
|
5
|
-
rvm:
|
6
|
-
- 2.6
|
7
|
-
- 2.7
|
8
|
-
- 3.0
|
9
|
-
- ruby-head
|
10
|
-
- truffleruby-head
|
11
|
-
|
12
|
-
cache: bundler
|
13
|
-
|
14
|
-
jobs:
|
15
|
-
allow_failures:
|
16
|
-
- rvm: ruby-head
|
17
|
-
- rvm: truffleruby-head
|
18
|
-
|
19
|
-
env:
|
20
|
-
- COVERALL=1
|
21
|
-
|
22
|
-
notifications:
|
23
|
-
email: false
|
24
|
-
slack:
|
25
|
-
secure: "N9zPR5jnF1TBiqvb3mCV6Wem3TIvqu4tXiob2P66vBMwmj1ewWvyUzNLwAEOCDc3mRfsI50IYXHewckAUpCWW7XEJlT/pv8llMsoiHqArb7SGJyDdy3ZRr35L7glixs/ikod+xhRKXMM3jML/2MgSa+Culzhl42tMUFDk+bBBQU="
|