dnsimple 4.6.0 → 5.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 (120) hide show
  1. checksums.yaml +4 -4
  2. data/.dependabot/config.yml +9 -0
  3. data/.rubocop.yml +2 -0
  4. data/.rubocop_dnsimple.yml +64 -40
  5. data/.travis.yml +1 -3
  6. data/CHANGELOG.md +34 -26
  7. data/CONTRIBUTING.md +37 -0
  8. data/Gemfile +4 -1
  9. data/LICENSE.txt +1 -1
  10. data/README.md +8 -5
  11. data/dnsimple.gemspec +3 -3
  12. data/lib/dnsimple.rb +2 -0
  13. data/lib/dnsimple/client.rb +12 -10
  14. data/lib/dnsimple/client/accounts.rb +2 -0
  15. data/lib/dnsimple/client/certificates.rb +2 -0
  16. data/lib/dnsimple/client/clients.rb +2 -0
  17. data/lib/dnsimple/client/contacts.rb +2 -0
  18. data/lib/dnsimple/client/domains.rb +2 -0
  19. data/lib/dnsimple/client/domains_collaborators.rb +2 -0
  20. data/lib/dnsimple/client/domains_delegation_signer_records.rb +2 -0
  21. data/lib/dnsimple/client/domains_dnssec.rb +2 -0
  22. data/lib/dnsimple/client/domains_email_forwards.rb +2 -0
  23. data/lib/dnsimple/client/domains_pushes.rb +2 -0
  24. data/lib/dnsimple/client/identity.rb +2 -0
  25. data/lib/dnsimple/client/oauth.rb +2 -0
  26. data/lib/dnsimple/client/registrar.rb +46 -0
  27. data/lib/dnsimple/client/registrar_auto_renewal.rb +2 -0
  28. data/lib/dnsimple/client/registrar_delegation.rb +2 -0
  29. data/lib/dnsimple/client/registrar_whois_privacy.rb +2 -0
  30. data/lib/dnsimple/client/services.rb +2 -0
  31. data/lib/dnsimple/client/services_domains.rb +2 -0
  32. data/lib/dnsimple/client/templates.rb +2 -0
  33. data/lib/dnsimple/client/templates_domains.rb +2 -0
  34. data/lib/dnsimple/client/templates_records.rb +2 -0
  35. data/lib/dnsimple/client/tlds.rb +2 -0
  36. data/lib/dnsimple/client/vanity_name_servers.rb +12 -10
  37. data/lib/dnsimple/client/webhooks.rb +2 -0
  38. data/lib/dnsimple/client/zones.rb +2 -0
  39. data/lib/dnsimple/client/zones_distributions.rb +2 -0
  40. data/lib/dnsimple/client/zones_records.rb +2 -0
  41. data/lib/dnsimple/default.rb +11 -9
  42. data/lib/dnsimple/error.rb +2 -0
  43. data/lib/dnsimple/extra.rb +2 -0
  44. data/lib/dnsimple/options.rb +2 -0
  45. data/lib/dnsimple/response.rb +6 -4
  46. data/lib/dnsimple/struct.rb +2 -0
  47. data/lib/dnsimple/struct/account.rb +2 -0
  48. data/lib/dnsimple/struct/certificate.rb +2 -0
  49. data/lib/dnsimple/struct/certificate_bundle.rb +5 -0
  50. data/lib/dnsimple/struct/certificate_purchase.rb +2 -0
  51. data/lib/dnsimple/struct/certificate_renewal.rb +2 -0
  52. data/lib/dnsimple/struct/collaborator.rb +2 -0
  53. data/lib/dnsimple/struct/contact.rb +2 -0
  54. data/lib/dnsimple/struct/delegation_signer_record.rb +2 -0
  55. data/lib/dnsimple/struct/dnssec.rb +2 -0
  56. data/lib/dnsimple/struct/domain.rb +2 -0
  57. data/lib/dnsimple/struct/domain_check.rb +2 -0
  58. data/lib/dnsimple/struct/domain_premium_price.rb +2 -0
  59. data/lib/dnsimple/struct/domain_push.rb +2 -0
  60. data/lib/dnsimple/struct/domain_registration.rb +2 -0
  61. data/lib/dnsimple/struct/domain_renewal.rb +2 -0
  62. data/lib/dnsimple/struct/domain_transfer.rb +5 -0
  63. data/lib/dnsimple/struct/email_forward.rb +2 -0
  64. data/lib/dnsimple/struct/extended_attribute.rb +2 -0
  65. data/lib/dnsimple/struct/oauth_token.rb +2 -0
  66. data/lib/dnsimple/struct/service.rb +2 -0
  67. data/lib/dnsimple/struct/template.rb +2 -0
  68. data/lib/dnsimple/struct/template_record.rb +2 -0
  69. data/lib/dnsimple/struct/tld.rb +2 -0
  70. data/lib/dnsimple/struct/user.rb +2 -0
  71. data/lib/dnsimple/struct/vanity_name_server.rb +2 -0
  72. data/lib/dnsimple/struct/webhook.rb +2 -0
  73. data/lib/dnsimple/struct/whoami.rb +2 -0
  74. data/lib/dnsimple/struct/whois_privacy.rb +2 -0
  75. data/lib/dnsimple/struct/whois_privacy_renewal.rb +2 -0
  76. data/lib/dnsimple/struct/zone.rb +2 -0
  77. data/lib/dnsimple/struct/zone_distribution.rb +2 -0
  78. data/lib/dnsimple/struct/zone_file.rb +2 -0
  79. data/lib/dnsimple/struct/zone_record.rb +2 -0
  80. data/lib/dnsimple/version.rb +3 -1
  81. data/spec/dnsimple/client/accounts_spec.rb +2 -0
  82. data/spec/dnsimple/client/certificates_spec.rb +2 -0
  83. data/spec/dnsimple/client/client_service_spec.rb +2 -0
  84. data/spec/dnsimple/client/contacts_spec.rb +2 -0
  85. data/spec/dnsimple/client/domains_collaborators_spec.rb +2 -0
  86. data/spec/dnsimple/client/domains_delegation_signer_records_spec.rb +2 -0
  87. data/spec/dnsimple/client/domains_dnssec_spec.rb +2 -0
  88. data/spec/dnsimple/client/domains_email_forwards_spec.rb +2 -0
  89. data/spec/dnsimple/client/domains_pushes_spec.rb +2 -0
  90. data/spec/dnsimple/client/domains_spec.rb +2 -0
  91. data/spec/dnsimple/client/identity_spec.rb +2 -0
  92. data/spec/dnsimple/client/oauth_spec.rb +2 -0
  93. data/spec/dnsimple/client/registrar_auto_renewal_spec.rb +2 -0
  94. data/spec/dnsimple/client/registrar_delegation_spec.rb +2 -0
  95. data/spec/dnsimple/client/registrar_spec.rb +69 -0
  96. data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +2 -0
  97. data/spec/dnsimple/client/services_domains_spec.rb +2 -0
  98. data/spec/dnsimple/client/services_spec.rb +2 -0
  99. data/spec/dnsimple/client/templates_domains_spec.rb +2 -0
  100. data/spec/dnsimple/client/templates_records_spec.rb +2 -0
  101. data/spec/dnsimple/client/templates_spec.rb +2 -0
  102. data/spec/dnsimple/client/tlds_spec.rb +2 -0
  103. data/spec/dnsimple/client/vanity_name_servers_spec.rb +2 -0
  104. data/spec/dnsimple/client/webhooks_spec.rb +2 -0
  105. data/spec/dnsimple/client/zones_distributions_spec.rb +2 -0
  106. data/spec/dnsimple/client/zones_records_spec.rb +2 -0
  107. data/spec/dnsimple/client/zones_spec.rb +2 -0
  108. data/spec/dnsimple/client_spec.rb +3 -1
  109. data/spec/dnsimple/extra_spec.rb +2 -0
  110. data/spec/dnsimple/options/base_spec.rb +2 -0
  111. data/spec/dnsimple/options/list_options_spec.rb +2 -0
  112. data/spec/fixtures.http/cancelDomainTransfer/success.http +30 -0
  113. data/spec/fixtures.http/getDomainTransfer/success.http +30 -0
  114. data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http +1 -1
  115. data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-not-found.http +1 -1
  116. data/spec/spec_helper.rb +3 -1
  117. data/spec/support/helpers.rb +2 -0
  118. data/spec/support/webmock.rb +2 -0
  119. metadata +11 -13
  120. data/.ruby-gemset +0 -1
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".registrar" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".services" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".services" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".templates" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".templates" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".templates" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".tlds" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".vanity_name_servers" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".webhooks" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".zones" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".zones" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client, ".zones" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Client do
@@ -185,7 +187,7 @@ describe Dnsimple::Client do
185
187
  .with(
186
188
  "#{subject.base_url}test",
187
189
  format: :json,
188
- headers: hash_including("User-Agent" => "#{Dnsimple::Default::USER_AGENT} customAgent")
190
+ headers: hash_including("User-Agent" => "customAgent #{Dnsimple::Default::USER_AGENT}")
189
191
  )
190
192
  .and_return(double("response", code: 200))
191
193
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Dnsimple::Extra do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe Dnsimple::Options::Base do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe Dnsimple::Options::ListOptions do
@@ -0,0 +1,30 @@
1
+ HTTP/1.1 202 Accepted
2
+ Server: nginx
3
+ Date: Wed, 29 Apr 2020 19:49:41 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: keep-alive
7
+ Status: 202 Accepted
8
+ X-RateLimit-Limit: 2400
9
+ X-RateLimit-Remaining: 2397
10
+ X-RateLimit-Reset: 1588193270
11
+ ETag: W/"8404bf2739e44e9f69f3a5199466776d"
12
+ Cache-Control: no-store, must-revalidate, private, max-age=0
13
+ X-Request-Id: 10d75bcf-0066-4d38-98a2-dc18dd5b6f4c
14
+ X-Runtime: 1.752154
15
+ Strict-Transport-Security: max-age=31536000
16
+
17
+ {
18
+ "data": {
19
+ "id": 42,
20
+ "domain_id": 6,
21
+ "registrant_id": 1,
22
+ "state": "transferring",
23
+ "auto_renew": true,
24
+ "whois_privacy": false,
25
+ "premium_price": null,
26
+ "status_description": null,
27
+ "created_at": "2020-04-24T19:19:03Z",
28
+ "updated_at": "2020-04-24T19:19:15Z"
29
+ }
30
+ }
@@ -0,0 +1,30 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx
3
+ Date: Mon, 27 Apr 2020 19:40:00 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: keep-alive
7
+ Status: 200 OK
8
+ X-RateLimit-Limit: 2400
9
+ X-RateLimit-Remaining: 2398
10
+ X-RateLimit-Reset: 1588019949
11
+ ETag: W/"8404bf2739e44e9f69f3a5199466776d"
12
+ Cache-Control: max-age=0, private, must-revalidate
13
+ X-Request-Id: 4818d867-1f72-4619-ab46-d345e6dd25eb
14
+ X-Runtime: 0.092854
15
+ Strict-Transport-Security: max-age=31536000
16
+
17
+ {
18
+ "data": {
19
+ "id": 42,
20
+ "domain_id": 2,
21
+ "registrant_id": 3,
22
+ "state": "cancelled",
23
+ "auto_renew": false,
24
+ "whois_privacy": false,
25
+ "premium_price": null,
26
+ "status_description": "Canceled by customer",
27
+ "created_at": "2020-04-27T18:08:44Z",
28
+ "updated_at": "2020-04-27T18:20:01Z"
29
+ }
30
+ }
@@ -16,4 +16,4 @@ X-XSS-Protection: 1; mode=block
16
16
  X-Download-Options: noopen
17
17
  X-Permitted-Cross-Domain-Policies: none
18
18
 
19
- {"message":"The whois privacy for example.com has just been renewed, a new renewal cannot be started at this time","errors":{}}
19
+ {"message":"The whois privacy for example.com has just been renewed, a new renewal cannot be started at this time"}
@@ -16,4 +16,4 @@ X-XSS-Protection: 1; mode=block
16
16
  X-Download-Options: noopen
17
17
  X-Permitted-Cross-Domain-Policies: none
18
18
 
19
- {"message":"WHOIS privacy not found for example.com","errors":{}}
19
+ {"message":"WHOIS privacy not found for example.com"}
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rspec'
2
4
 
3
5
  if ENV['COVERALL']
@@ -12,4 +14,4 @@ unless defined?(SPEC_ROOT)
12
14
  SPEC_ROOT = File.expand_path(__dir__)
13
15
  end
14
16
 
15
- Dir[File.join(SPEC_ROOT, "support/**/*.rb")].each { |f| require f }
17
+ Dir[File.join(SPEC_ROOT, "support/**/*.rb")].sort.each { |f| require f }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RSpecSupportHelpers
2
4
 
3
5
  def http_fixture(*names)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'webmock/rspec'
2
4
 
3
5
  RSpec.configure do |config|
metadata CHANGED
@@ -1,17 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Anthony Eden
8
- - Simone Carletti
9
- - Javier Acero
10
- - Luca Guidi
7
+ - DNSimple
11
8
  autorequire:
12
9
  bindir: bin
13
10
  cert_chain: []
14
- date: 2019-02-01 00:00:00.000000000 Z
11
+ date: 2020-05-21 00:00:00.000000000 Z
15
12
  dependencies:
16
13
  - !ruby/object:Gem::Dependency
17
14
  name: httparty
@@ -85,21 +82,18 @@ dependencies:
85
82
  version: '0'
86
83
  description: The DNSimple API client for Ruby.
87
84
  email:
88
- - anthony.eden@dnsimple.com
89
- - simone.carletti@dnsimple.com
90
- - javier.acero@dnsimple.com
91
- - luca.guidi@dnsimple.com
85
+ - support@dnsimple.com
92
86
  executables: []
93
87
  extensions: []
94
88
  extra_rdoc_files:
95
89
  - LICENSE.txt
96
90
  files:
91
+ - ".dependabot/config.yml"
97
92
  - ".gitignore"
98
93
  - ".rspec"
99
94
  - ".rubocop.yml"
100
95
  - ".rubocop_dnsimple.yml"
101
96
  - ".rubocop_todo.yml"
102
- - ".ruby-gemset"
103
97
  - ".travis.yml"
104
98
  - CHANGELOG.md
105
99
  - CONTRIBUTING.md
@@ -219,6 +213,7 @@ files:
219
213
  - spec/fixtures.http/applyTemplate/success.http
220
214
  - spec/fixtures.http/authorizeDomainTransferOut/success.http
221
215
  - spec/fixtures.http/badgateway.http
216
+ - spec/fixtures.http/cancelDomainTransfer/success.http
222
217
  - spec/fixtures.http/changeDomainDelegation/success.http
223
218
  - spec/fixtures.http/changeDomainDelegationFromVanity/success.http
224
219
  - spec/fixtures.http/changeDomainDelegationToVanity/success.http
@@ -268,6 +263,7 @@ files:
268
263
  - spec/fixtures.http/getDomainDelegation/success.http
269
264
  - spec/fixtures.http/getDomainPremiumPrice/failure.http
270
265
  - spec/fixtures.http/getDomainPremiumPrice/success.http
266
+ - spec/fixtures.http/getDomainTransfer/success.http
271
267
  - spec/fixtures.http/getEmailForward/success.http
272
268
  - spec/fixtures.http/getService/success.http
273
269
  - spec/fixtures.http/getTemplate/success.http
@@ -356,14 +352,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
356
352
  requirements:
357
353
  - - ">="
358
354
  - !ruby/object:Gem::Version
359
- version: '2.1'
355
+ version: '2.4'
360
356
  required_rubygems_version: !ruby/object:Gem::Requirement
361
357
  requirements:
362
358
  - - ">="
363
359
  - !ruby/object:Gem::Version
364
360
  version: '0'
365
361
  requirements: []
366
- rubygems_version: 3.0.2
362
+ rubygems_version: 3.1.2
367
363
  signing_key:
368
364
  specification_version: 4
369
365
  summary: The DNSimple API client for Ruby
@@ -409,6 +405,7 @@ test_files:
409
405
  - spec/fixtures.http/applyTemplate/success.http
410
406
  - spec/fixtures.http/authorizeDomainTransferOut/success.http
411
407
  - spec/fixtures.http/badgateway.http
408
+ - spec/fixtures.http/cancelDomainTransfer/success.http
412
409
  - spec/fixtures.http/changeDomainDelegation/success.http
413
410
  - spec/fixtures.http/changeDomainDelegationFromVanity/success.http
414
411
  - spec/fixtures.http/changeDomainDelegationToVanity/success.http
@@ -458,6 +455,7 @@ test_files:
458
455
  - spec/fixtures.http/getDomainDelegation/success.http
459
456
  - spec/fixtures.http/getDomainPremiumPrice/failure.http
460
457
  - spec/fixtures.http/getDomainPremiumPrice/success.http
458
+ - spec/fixtures.http/getDomainTransfer/success.http
461
459
  - spec/fixtures.http/getEmailForward/success.http
462
460
  - spec/fixtures.http/getService/success.http
463
461
  - spec/fixtures.http/getTemplate/success.http
@@ -1 +0,0 @@
1
- dnsimple-ruby