dnsimple 9.0.0 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5bfb97e597d97322ff4e0f417f569a624cf2692a83b529f978a85cbaf5d5d58
4
- data.tar.gz: 47404701bcebc22e4ba00af2aa9b6e45520972069e6a94f71620223339a137a8
3
+ metadata.gz: 10223d4a1cffc52034b6de3ed1505a3d44c3c27b24defff73926bc614f852e2f
4
+ data.tar.gz: b7ce3fb01c65ec3f18925f2b29fb891f585b4af2dbfb385b8089424317bf2771
5
5
  SHA512:
6
- metadata.gz: 537154d75b9e8084eabd75b2768b060d7928d42b66f08e32c6475104f89bf23df0ca945f66b1ce57335dd26f58338ea2d684be0213f7605ad03d5dff2871e446
7
- data.tar.gz: b3a1d7a4c07d1f5a582b16f87c262cba12361f527f0b0bda2f5ba0a3ced5495edcfee42276c7a8929b236f74ccf7d99537fb12e3393a04a999d4e6a1c42f80d6
6
+ metadata.gz: b9ee7d535a4d68408633052eae655fb8993899647b141a891c315bffb3087730645519955cf755ac5aa71fc03c2d06e6ff63844a0fdadf32830cfa6cc2e26f40
7
+ data.tar.gz: 0e85c8d9a11d3e82d4a674471fe9ad817f7d229ef430958b471785ac3f87d23ba3c373fac07b67a9e046f1e4c1a9133776546f086e9c57194a9c9567254c64ec
@@ -16,7 +16,7 @@ jobs:
16
16
  if: github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'automerge')
17
17
  steps:
18
18
  - name: Wait for tests to succeed
19
- uses: lewagon/wait-on-check-action@v1.3.3
19
+ uses: lewagon/wait-on-check-action@v1.3.4
20
20
  timeout-minutes: 15
21
21
  with:
22
22
  ref: ${{ github.ref }}
@@ -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.3
14
+ uses: lewagon/wait-on-check-action@v1.3.4
15
15
  with:
16
16
  ref: 'refs/heads/main'
17
17
  running-workflow-name: 'Release to RubyGems'
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ This project uses [Semantic Versioning 2.0.0](http://semver.org/).
4
4
 
5
5
  ## main
6
6
 
7
+ ## 9.0.1
8
+
9
+ - NEW: Added `alias_email` and `destination_email` to `EmailForward`
10
+ - CHANGED: Deprecated `from` and `to` fields in `EmailForward`
11
+ - CHANGED: `DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
12
+
7
13
  ## 9.0.0
8
14
 
9
15
  - CHANGED: Minimum Ruby version is now 3.1
data/Gemfile CHANGED
@@ -5,10 +5,10 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  gem 'coveralls', require: false
8
- gem 'rubocop', '1.62.1', require: false
9
- gem 'rubocop-performance', '1.20.2', require: false
8
+ gem 'rubocop', '1.69.0', require: false
9
+ gem 'rubocop-performance', '1.23.0', require: false
10
10
  gem 'rubocop-rake', '0.6.0', require: false
11
- gem 'rubocop-rspec', '2.27.1', require: false
11
+ gem 'rubocop-rspec', '3.2.0', require: false
12
12
  gem "base64", "~> 0.2.0"
13
13
  gem "bigdecimal", "~> 3.1"
14
14
  gem "csv", "~> 3.2"
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2010-2022 DNSimple Corporation
3
+ Copyright (c) 2010-2024 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
@@ -110,4 +110,4 @@ puts response.data
110
110
 
111
111
  ## License
112
112
 
113
- Copyright (c) 2010-2023 DNSimple Corporation. This is Free Software distributed under the MIT license.
113
+ Copyright (c) 2010-2024 DNSimple Corporation. This is Free Software distributed under the MIT license.
@@ -6,7 +6,7 @@ module Dnsimple
6
6
 
7
7
  # Queries DNS Analytics data for the provided account
8
8
  #
9
- # @see https://developer.dnsimple.com/v2/dns-analytics#query
9
+ # @see https://developer.dnsimple.com/v2/dns-analytics#queryDnsAnalytics
10
10
  #
11
11
  # @param [Integer] account_id the account ID
12
12
  # @param [Hash] options the filtering, sorting, and grouping options
@@ -20,9 +20,12 @@ module Dnsimple
20
20
  # @option options [Integer] :page current page (pagination)
21
21
  # @option options [Integer] :per_page number of entries to return (pagination)
22
22
  # @return [Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>]
23
+ # @deprecated `DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
23
24
  #
24
25
  # @raise [Dnsimple::RequestError]
25
26
  def collaborators(account_id, domain_id, options = {})
27
+ Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.')
28
+
26
29
  response = client.get(Client.versioned("/%s/domains/%s/collaborators" % [account_id, domain_id]), Options::ListOptions.new(options))
27
30
 
28
31
  Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Collaborator.new(r) })
@@ -41,9 +44,12 @@ module Dnsimple
41
44
  # @option attributes [String] :email user email (mandatory)
42
45
  # @param [Hash] options request options
43
46
  # @return [Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>]
47
+ # @deprecated `DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
44
48
  #
45
49
  # @raise [Dnsimple::RequestError]
46
50
  def add_collaborator(account_id, domain_id, attributes, options = {})
51
+ Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.')
52
+
47
53
  Extra.validate_mandatory_attributes(attributes, [:email])
48
54
  response = client.post(Client.versioned("/%s/domains/%s/collaborators" % [account_id, domain_id]), attributes, options)
49
55
 
@@ -65,9 +71,12 @@ module Dnsimple
65
71
  # @param [Hash] options request options
66
72
  # @return [Dnsimple::Response<nil>]
67
73
  #
74
+ # @deprecated `DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
68
75
  # @raise [Dnsimple::NotFoundError]
69
76
  # @raise [Dnsimple::RequestError]
70
77
  def remove_collaborator(account_id, domain_id, contact_id, options = {})
78
+ Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.')
79
+
71
80
  response = client.delete(Client.versioned("/%s/domains/%s/collaborators/%s" % [account_id, domain_id, contact_id]), options)
72
81
 
73
82
  Dnsimple::Response.new(response, nil)
@@ -11,15 +11,26 @@ module Dnsimple
11
11
  attr_accessor :domain_id
12
12
 
13
13
  # @return [String] The "local part" of the originating email address. Anything to the left of the @ symbol.
14
+ # @deprecated use {#alias_email} instead
14
15
  attr_accessor :from
15
16
 
16
17
  # @return [String] The full email address to forward to.
18
+ # @deprecated use {#destination_email} instead
17
19
  attr_accessor :to
18
20
 
21
+ # @return [String] The receiving email recipient.
22
+ attr_accessor :alias_email
23
+
24
+ # @return [String] The email recipient the messages are delivered to.
25
+ attr_accessor :destination_email
26
+
27
+ # @return [Boolean] True if the email forward is active, false otherwise.
28
+ attr_accessor :active
29
+
19
30
  # @return [String] When the email forward was created in DNSimple.
20
31
  attr_accessor :created_at
21
32
 
22
- # @return [String] Then the email forward was last updated in DNSimple.
33
+ # @return [String] When the email forward was last updated in DNSimple.
23
34
  attr_accessor :updated_at
24
35
 
25
36
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dnsimple
4
4
 
5
- VERSION = "9.0.0"
5
+ VERSION = "9.0.1"
6
6
 
7
7
  end
@@ -48,10 +48,16 @@ describe Dnsimple::Client, ".domains" do
48
48
  expect(response.data).to be_a(Array)
49
49
  expect(response.data.size).to eq(2)
50
50
 
51
- response.data.each do |result|
52
- expect(result).to be_a(Dnsimple::Struct::EmailForward)
53
- expect(result.id).to be_a(Integer)
54
- end
51
+ expect(response.data[0].id).to eq(24809)
52
+ expect(response.data[0].domain_id).to eq(235146)
53
+ expect(response.data[0].alias_email).to eq("foo@a-domain.com")
54
+ expect(response.data[0].destination_email).to eq("jane.smith@example.com")
55
+ expect(response.data[0].active).to be(true)
56
+ expect(response.data[1].id).to eq(24810)
57
+ expect(response.data[1].domain_id).to eq(235146)
58
+ expect(response.data[1].alias_email).to eq("bar@a-domain.com")
59
+ expect(response.data[1].destination_email).to eq("john.doe@example.com")
60
+ expect(response.data[1].active).to be(false)
55
61
  end
56
62
 
57
63
  it "exposes the pagination information" do
@@ -153,6 +159,8 @@ describe Dnsimple::Client, ".domains" do
153
159
  expect(result.domain_id).to eq(235146)
154
160
  expect(result.from).to eq("example@dnsimple.xyz")
155
161
  expect(result.to).to eq("example@example.com")
162
+ expect(result.alias_email).to eq("example@dnsimple.xyz")
163
+ expect(result.destination_email).to eq("example@example.com")
156
164
  expect(result.created_at).to eq("2021-01-25T13:54:40Z")
157
165
  expect(result.updated_at).to eq("2021-01-25T13:54:40Z")
158
166
  end
@@ -2,6 +2,7 @@ HTTP/1.1 201 Created
2
2
  Server: nginx
3
3
  Date: Mon, 25 Jan 2021 13:54:40 GMT
4
4
  Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: identity
5
6
  Connection: keep-alive
6
7
  X-RateLimit-Limit: 4800
7
8
  X-RateLimit-Remaining: 4772
@@ -18,4 +19,4 @@ X-Permitted-Cross-Domain-Policies: none
18
19
  Content-Security-Policy: frame-ancestors 'none'
19
20
  Strict-Transport-Security: max-age=31536000
20
21
 
21
- {"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}}
22
+ {"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}}
@@ -2,6 +2,7 @@ HTTP/1.1 200 OK
2
2
  Server: nginx
3
3
  Date: Mon, 25 Jan 2021 13:56:24 GMT
4
4
  Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: identity
5
6
  Connection: keep-alive
6
7
  X-RateLimit-Limit: 4800
7
8
  X-RateLimit-Remaining: 4766
@@ -18,4 +19,4 @@ X-Permitted-Cross-Domain-Policies: none
18
19
  Content-Security-Policy: frame-ancestors 'none'
19
20
  Strict-Transport-Security: max-age=31536000
20
21
 
21
- {"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}}
22
+ {"data":{"id":41872,"domain_id":235146,"alias_email":"example@dnsimple.xyz","destination_email":"example@example.com","created_at":"2021-01-25T13:54:40Z","updated_at":"2021-01-25T13:54:40Z","from":"example@dnsimple.xyz","to":"example@example.com"}}
@@ -1,16 +1,16 @@
1
1
  HTTP/1.1 200 OK
2
2
  Server: nginx
3
- Date: Thu, 04 Feb 2016 14:07:19 GMT
3
+ Date: Fri, 17 May 2024 09:07:28 GMT
4
4
  Content-Type: application/json; charset=utf-8
5
5
  Connection: keep-alive
6
- Status: 200 OK
7
- X-RateLimit-Limit: 4000
8
- X-RateLimit-Remaining: 3993
9
- X-RateLimit-Reset: 1454596043
10
- ETag: W/"3f10aae0cf0f0b81bdb4f58786ee1750"
6
+ X-RateLimit-Limit: 4800
7
+ X-RateLimit-Remaining: 4748
8
+ X-RateLimit-Reset: 1715936948
9
+ X-WORK-WITH-US: Love automation? So do we! https://dnsimple.com/jobs
10
+ ETag: W/"a5eed9a071f03e10fc67001ccc647a94"
11
11
  Cache-Control: max-age=0, private, must-revalidate
12
- X-Request-Id: 6e3aa9d0-cb95-4186-93b0-630da372de86
13
- X-Runtime: 0.026287
14
- Strict-Transport-Security: max-age=31536000
12
+ X-Request-Id: e42df983-a8a5-4123-8c74-fb89ab934aba
13
+ X-Runtime: 0.025456
14
+ Strict-Transport-Security: max-age=63072000
15
15
 
16
- {"data":[{"id":17702,"domain_id":228963,"from":".*@a-domain.com","to":"jane.smith@example.com","created_at":"2016-02-04T13:59:29Z","updated_at":"2016-02-04T13:59:29Z"},{"id":17703,"domain_id":228963,"from":"john@a-domain.com","to":"john@example.com","created_at":"2016-02-04T14:07:13Z","updated_at":"2016-02-04T14:07:13Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":2,"total_pages":1}}
16
+ {"data":[{"id":24809,"domain_id":235146,"alias_email":"foo@a-domain.com","destination_email":"jane.smith@example.com","active":true,"created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":"foo@a-domain.com","to":"jane.smith@example.com"},{"id":24810,"domain_id":235146,"alias_email":"bar@a-domain.com","destination_email":"john.doe@example.com","active":false,"created_at":"2017-05-25T19:23:16Z","updated_at":"2017-05-25T19:23:16Z","from":"bar@a-domain.com","to":"john.doe@example.com"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
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: 9.0.0
4
+ version: 9.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DNSimple
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-12 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty