gandi_v5 0.3.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +56 -2
  4. data/.travis.yml +6 -1
  5. data/CHANGELOG.md +61 -0
  6. data/LICENSE.md +2 -6
  7. data/README.md +15 -9
  8. data/gandi_v5.gemspec +2 -2
  9. data/lib/gandi_v5.rb +40 -14
  10. data/lib/gandi_v5/data.rb +1 -2
  11. data/lib/gandi_v5/data/converter/integer.rb +26 -0
  12. data/lib/gandi_v5/domain.rb +13 -14
  13. data/lib/gandi_v5/email/forward.rb +2 -8
  14. data/lib/gandi_v5/email/mailbox.rb +57 -11
  15. data/lib/gandi_v5/email/slot.rb +11 -3
  16. data/lib/gandi_v5/live_dns.rb +0 -12
  17. data/lib/gandi_v5/live_dns/domain.rb +313 -29
  18. data/lib/gandi_v5/live_dns/domain/dnssec_key.rb +115 -0
  19. data/lib/gandi_v5/live_dns/domain/record.rb +81 -0
  20. data/lib/gandi_v5/live_dns/domain/snapshot.rb +107 -0
  21. data/lib/gandi_v5/live_dns/domain/tsig_key.rb +71 -0
  22. data/lib/gandi_v5/organization.rb +10 -0
  23. data/lib/gandi_v5/organization/customer.rb +90 -0
  24. data/lib/gandi_v5/sharing_space.rb +27 -0
  25. data/lib/gandi_v5/simple_hosting.rb +12 -0
  26. data/lib/gandi_v5/simple_hosting/instance.rb +242 -0
  27. data/lib/gandi_v5/simple_hosting/instance/application.rb +44 -0
  28. data/lib/gandi_v5/simple_hosting/instance/database.rb +19 -0
  29. data/lib/gandi_v5/simple_hosting/instance/language.rb +22 -0
  30. data/lib/gandi_v5/simple_hosting/instance/upgrade.rb +21 -0
  31. data/lib/gandi_v5/simple_hosting/instance/virtual_host.rb +187 -0
  32. data/lib/gandi_v5/simple_hosting/instance/virtual_host/linked_dns_zone.rb +74 -0
  33. data/lib/gandi_v5/version.rb +1 -1
  34. data/spec/.rubocop.yml +56 -2
  35. data/spec/fixtures/bodies/GandiV5_Domain/fetch.yml +8 -0
  36. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain/fetch.yml +1 -2
  37. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain/list_tsig.yml +3 -0
  38. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain/nameservers.yml +3 -0
  39. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain_DnssecKey/fetch.yml +12 -0
  40. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain_DnssecKey/list.yml +9 -0
  41. data/spec/fixtures/bodies/{GandiV5_LiveDNS_Zone_Snapshot → GandiV5_LiveDNS_Domain_Snapshot}/fetch.yml +4 -3
  42. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain_Snapshot/list.yml +5 -0
  43. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/fetch.yml +9 -0
  44. data/spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/list.yml +4 -0
  45. data/spec/fixtures/bodies/GandiV5_Organization_Customer/list.yml +8 -0
  46. data/spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/fetch.yml +80 -0
  47. data/spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/list.yml +38 -0
  48. data/spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/fetch.yml +26 -0
  49. data/spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/list.yml +18 -0
  50. data/spec/units/gandi_v5/data/converter/integer_spec.rb +16 -0
  51. data/spec/units/gandi_v5/domain_spec.rb +53 -43
  52. data/spec/units/gandi_v5/email/forward_spec.rb +5 -34
  53. data/spec/units/gandi_v5/email/mailbox_spec.rb +119 -37
  54. data/spec/units/gandi_v5/email/slot_spec.rb +10 -2
  55. data/spec/units/gandi_v5/live_dns/domain/dnssec_key_spec.rb +128 -0
  56. data/spec/units/gandi_v5/live_dns/{record_set_spec.rb → domain/record_spec.rb} +1 -1
  57. data/spec/units/gandi_v5/live_dns/domain/snapshot_spec.rb +101 -0
  58. data/spec/units/gandi_v5/live_dns/domain/tsig_key_spec.rb +78 -0
  59. data/spec/units/gandi_v5/live_dns/domain_spec.rb +297 -118
  60. data/spec/units/gandi_v5/live_dns_spec.rb +0 -12
  61. data/spec/units/gandi_v5/organization/customer_spec.rb +81 -0
  62. data/spec/units/gandi_v5/organization_spec.rb +14 -0
  63. data/spec/units/gandi_v5/sharing_space_spec.rb +4 -0
  64. data/spec/units/gandi_v5/simple_hosting/instance/application_spec.rb +37 -0
  65. data/spec/units/gandi_v5/simple_hosting/instance/database_spec.rb +4 -0
  66. data/spec/units/gandi_v5/simple_hosting/instance/language_spec.rb +4 -0
  67. data/spec/units/gandi_v5/simple_hosting/instance/upgrade_spec.rb +4 -0
  68. data/spec/units/gandi_v5/simple_hosting/instance/virtual_host/linked_dns_zone_spec.rb +50 -0
  69. data/spec/units/gandi_v5/simple_hosting/instance/virtual_host_spec.rb +199 -0
  70. data/spec/units/gandi_v5/simple_hosting/instance_spec.rb +182 -0
  71. data/spec/units/gandi_v5/simple_hosting_spec.rb +9 -0
  72. data/spec/units/gandi_v5_spec.rb +139 -30
  73. metadata +50 -31
  74. data/lib/gandi_v5/domain/sharing_space.rb +0 -21
  75. data/lib/gandi_v5/live_dns/has_zone_records.rb +0 -153
  76. data/lib/gandi_v5/live_dns/record_set.rb +0 -79
  77. data/lib/gandi_v5/live_dns/zone.rb +0 -160
  78. data/lib/gandi_v5/live_dns/zone/snapshot.rb +0 -81
  79. data/spec/features/domain_spec.rb +0 -45
  80. data/spec/features/livedns_domain_spec.rb +0 -8
  81. data/spec/features/livedns_zone_spec.rb +0 -45
  82. data/spec/features/mailbox_spec.rb +0 -18
  83. data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone/fetch.yml +0 -11
  84. data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone/list.yml +0 -11
  85. data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone_Snapshot/list.yml +0 -3
  86. data/spec/fixtures/vcr/Domain_features/List_domains.yml +0 -55
  87. data/spec/fixtures/vcr/Domain_features/Renew_domain.yml +0 -133
  88. data/spec/fixtures/vcr/LiveDNS_Domain_features/List_domains.yml +0 -32
  89. data/spec/fixtures/vcr/LiveDNS_Zone_features/List_zones.yml +0 -42
  90. data/spec/fixtures/vcr/LiveDNS_Zone_features/Make_and_save_snapshot.yml +0 -72
  91. data/spec/fixtures/vcr/LiveDNS_Zone_features/Save_zone_to_file.yml +0 -28
  92. data/spec/fixtures/vcr/Mailbox_features/List_mailboxes.yml +0 -39
  93. data/spec/units/gandi_v5/domain/sharing_space_spec.rb +0 -4
  94. data/spec/units/gandi_v5/live_dns/zone/snapshot_spec.rb +0 -66
  95. data/spec/units/gandi_v5/live_dns/zone_spec.rb +0 -347
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe GandiV5::SimpleHosting do
4
+ it '.instances' do
5
+ returns = double Array
6
+ expect(GandiV5::SimpleHosting::Instance).to receive(:list).and_return(returns)
7
+ expect(described_class.instances).to be returns
8
+ end
9
+ end
@@ -47,41 +47,47 @@ describe GandiV5 do
47
47
  end
48
48
 
49
49
  describe 'Uses RestClient' do
50
+ let(:response) do
51
+ double RestClient::Response, body: 'Hello world!', headers: { content_type: 'text/plain' }
52
+ end
53
+
50
54
  %i[get delete].each do |method|
51
55
  describe ":#{method}" do
52
56
  it 'As JSON' do
53
57
  response_data = { 'hello' => 'world' }
54
58
  response = double RestClient::Response, body: response_data.to_json, headers: { content_type: 'application/json' }
55
59
  expect(described_class).to receive(:prepare_headers)
56
- expect(RestClient).to receive(method).with('url', hash_including(accept: 'application/json')).and_return(response)
57
- expect(described_class.send(method, 'url', accept: 'application/json')).to match_array [response, response_data]
60
+ expect(RestClient).to receive(method).with('url', hash_including(accept: 'application/json'))
61
+ .and_return(response)
62
+ expect(described_class.send(method, 'url', accept: 'application/json'))
63
+ .to match_array [response, response_data]
58
64
  end
59
65
 
60
66
  it 'As text' do
61
- response_data = 'Hello world!'
62
- response = double RestClient::Response, body: response_data, headers: { content_type: 'text/plain' }
63
67
  expect(described_class).to receive(:prepare_headers)
64
68
  expect(RestClient).to receive(method).with('url', hash_including(accept: 'text/plain')).and_return(response)
65
- expect(described_class.send(method, 'url', accept: 'text/plain')).to match_array [response, response_data]
69
+ expect(described_class.send(method, 'url', accept: 'text/plain')).to match_array [response, 'Hello world!']
66
70
  end
67
71
 
68
72
  it 'Passes request headers' do
69
73
  expect(described_class).to receive(:prepare_headers)
70
74
  expect(described_class).to receive(:parse_response)
71
- expect(RestClient).to receive(method).with(anything, header: 'value')
72
- expect(described_class.send(method, 'url', header: 'value')).to match_array [nil, nil]
75
+ expect(RestClient).to receive(method).with(anything, header: 'value').and_return(response)
76
+ expect(described_class.send(method, 'url', header: 'value')).to match_array [response, nil]
73
77
  end
74
78
 
75
79
  it 'Adds authentication header' do
76
- expect(RestClient).to receive(method).with(anything, hash_including(Authorization: 'Apikey abdce12345'))
80
+ expect(RestClient).to receive(method).with(anything, hash_including(authorization: 'Apikey abdce12345'))
81
+ .and_return(response)
77
82
  expect(described_class).to receive(:parse_response)
78
- expect(described_class.send(method, 'https://api.gandi.net/v5/')).to match_array [nil, nil]
83
+ expect(described_class.send(method, 'https://api.gandi.net/v5/')).to match_array [response, nil]
79
84
  end
80
85
 
81
86
  it 'Default accept header' do
82
87
  expect(RestClient).to receive(method).with(any_args, hash_including(accept: 'application/json'))
88
+ .and_return(response)
83
89
  expect(described_class).to receive(:parse_response)
84
- expect(described_class.send(method, 'https://api.gandi.net/v5/')).to match_array [nil, nil]
90
+ expect(described_class.send(method, 'https://api.gandi.net/v5/')).to match_array [response, nil]
85
91
  end
86
92
 
87
93
  it 'Converts a 406 (bad request) exception' do
@@ -92,6 +98,13 @@ describe GandiV5 do
92
98
  end
93
99
  end
94
100
 
101
+ it ':delete handles no content-type' do
102
+ response = double RestClient::Response, headers: {}
103
+ expect(described_class).to receive(:prepare_headers)
104
+ expect(RestClient).to receive(:delete).with('url', hash_including(accept: 'text/plain')).and_return(response)
105
+ expect(described_class.delete('url', accept: 'text/plain')).to match_array [response, nil]
106
+ end
107
+
95
108
  %i[patch post put].each do |method|
96
109
  describe ":#{method}" do
97
110
  let(:payload) { '{"say":"hello world"}' }
@@ -107,26 +120,25 @@ describe GandiV5 do
107
120
  end
108
121
 
109
122
  it 'As text' do
110
- response_data = 'hello world'
111
- response = double RestClient::Response, body: response_data, headers: { content_type: 'text/plain' }
112
123
  expect(described_class).to receive(:prepare_headers)
113
124
  expect(RestClient).to receive(method).with('url', payload, hash_including(accept: 'text/plain'))
114
125
  .and_return(response)
115
- expect(described_class.send(method, 'url', payload, accept: 'text/plain')).to match_array [response, response_data]
126
+ array = [response, 'Hello world!']
127
+ expect(described_class.send(method, 'url', payload, accept: 'text/plain')).to match_array array
116
128
  end
117
129
 
118
130
  it 'Passes payload' do
119
131
  expect(described_class).to receive(:prepare_headers)
120
132
  expect(described_class).to receive(:parse_response)
121
- expect(RestClient).to receive(method).with(anything, payload, any_args)
122
- expect(described_class.send(method, 'url', payload)).to match_array [nil, nil]
133
+ expect(RestClient).to receive(method).with(anything, payload, any_args).and_return(response)
134
+ expect(described_class.send(method, 'url', payload)).to match_array [response, nil]
123
135
  end
124
136
 
125
137
  it 'Passes request headers' do
126
138
  expect(described_class).to receive(:prepare_headers)
127
139
  expect(described_class).to receive(:parse_response)
128
- expect(RestClient).to receive(method).with(any_args, hash_including(header: 'value'))
129
- expect(described_class.send(method, 'url', payload, header: 'value')).to match_array [nil, nil]
140
+ expect(RestClient).to receive(method).with(any_args, hash_including(header: 'value')).and_return(response)
141
+ expect(described_class.send(method, 'url', payload, header: 'value')).to match_array [response, nil]
130
142
  end
131
143
 
132
144
  it 'Adds content type header' do
@@ -136,15 +148,17 @@ describe GandiV5 do
136
148
  end
137
149
 
138
150
  it 'Adds authentication header' do
139
- expect(RestClient).to receive(method).with(any_args, hash_including(Authorization: 'Apikey abdce12345'))
151
+ expect(RestClient).to receive(method).with(any_args, hash_including(authorization: 'Apikey abdce12345'))
152
+ .and_return(response)
140
153
  expect(described_class).to receive(:parse_response)
141
- expect(described_class.send(method, 'https://api.gandi.net/v5/', payload)).to match_array [nil, nil]
154
+ expect(described_class.send(method, 'https://api.gandi.net/v5/', payload)).to match_array [response, nil]
142
155
  end
143
156
 
144
157
  it 'Default accept header' do
145
158
  expect(RestClient).to receive(method).with(any_args, hash_including(accept: 'application/json'))
159
+ .and_return(response)
146
160
  expect(described_class).to receive(:parse_response)
147
- expect(described_class.send(method, 'https://api.gandi.net/v5/', payload)).to match_array [nil, nil]
161
+ expect(described_class.send(method, 'https://api.gandi.net/v5/', payload)).to match_array [response, nil]
148
162
  end
149
163
 
150
164
  it 'Converts a 406 (bad request) exception' do
@@ -156,20 +170,23 @@ describe GandiV5 do
156
170
  end
157
171
  end
158
172
 
159
- describe 'Generates correct authorisation header' do
160
- it 'When requesting from main V5 API' do
161
- expect(described_class.send(:authorisation_header, 'https://api.gandi.net/v5/example'))
162
- .to eq(Authorization: "Apikey #{api_key}")
173
+ describe 'Prepares headers' do
174
+ it 'Sets accept it not present' do
175
+ headers = {}
176
+ described_class.send(:prepare_headers, headers, GandiV5::BASE)
177
+ expect(headers[:accept]).to eq 'application/json'
163
178
  end
164
179
 
165
- it 'When requesting from main LiveDNS V5 API' do
166
- expect(described_class.send(:authorisation_header, 'https://dns.api.gandi.net/api/v5/example'))
167
- .to eq('X-Api-Key': api_key)
180
+ it 'Leaves accept alone if present' do
181
+ headers = { accept: 'leave/alone' }
182
+ described_class.send(:prepare_headers, headers, GandiV5::BASE)
183
+ expect(headers[:accept]).to eq 'leave/alone'
168
184
  end
169
185
 
170
- it 'Raises ArgumentError when requesting an unknown url' do
171
- expect { described_class.send(:authorisation_header, 'https://unknown.example.com') }
172
- .to raise_error ArgumentError, 'Don\'t know how to authorise for url: https://unknown.example.com'
186
+ it 'Sets authorization' do
187
+ headers = {}
188
+ described_class.send(:prepare_headers, headers, GandiV5::BASE)
189
+ expect(headers[:authorization]).to eq "Apikey #{api_key}"
173
190
  end
174
191
  end
175
192
 
@@ -226,4 +243,96 @@ describe GandiV5 do
226
243
  .to raise_error GandiV5::Error::GandiError, 'field: message'
227
244
  end
228
245
  end
246
+
247
+ describe '.paginated_get' do
248
+ let(:url) { "#{GandiV5::BASE}test/url" }
249
+ let(:do_nothing) { ->(_this_data) { nil } }
250
+
251
+ it 'Keeps fetching until getting a partial list' do
252
+ headers1 = { params: { 'page' => 1, 'per_page' => 2 } }
253
+ headers2 = { params: { 'page' => 2, 'per_page' => 2 } }
254
+ expect(GandiV5).to receive(:get).with(url, headers1)
255
+ .ordered
256
+ .and_return([nil, %i[a b]])
257
+ expect(GandiV5).to receive(:get).with(url, headers2)
258
+ .ordered
259
+ .and_return([nil, %i[c]])
260
+
261
+ described_class.paginated_get(url, (1..2), 2, &do_nothing)
262
+ end
263
+
264
+ it 'Keeps fetching until getting an empty list' do
265
+ headers1 = { params: { 'page' => 1, 'per_page' => 2 } }
266
+ headers2 = { params: { 'page' => 2, 'per_page' => 2 } }
267
+ expect(GandiV5).to receive(:get).with(url, headers1)
268
+ .ordered
269
+ .and_return([nil, %i[a b]])
270
+ expect(GandiV5).to receive(:get).with(url, headers2)
271
+ .ordered
272
+ .and_return([nil, []])
273
+
274
+ described_class.paginated_get(url, (1..2), 2, &do_nothing)
275
+ end
276
+
277
+ it 'Passes per_page option' do
278
+ headers = { params: { 'page' => 1, 'per_page' => 100 } }
279
+ expect(GandiV5).to receive(:get).with(url, headers)
280
+ .and_return([nil, []])
281
+ described_class.paginated_get(url, 1, 100, &do_nothing)
282
+ end
283
+
284
+ it 'Passes on other params' do
285
+ headers = { params: { 'page' => 1, 'per_page' => 100, 'custom' => 'value' } }
286
+ expect(GandiV5).to receive(:get).with(url, headers)
287
+ .and_return([nil, []])
288
+ described_class.paginated_get(url, 1, 100, params: { custom: 'value' }, &do_nothing)
289
+ end
290
+
291
+ it 'Passes on other headers' do
292
+ headers = { params: { 'page' => 1, 'per_page' => 100 }, custom: :value }
293
+ expect(GandiV5).to receive(:get).with(url, headers)
294
+ .and_return([nil, []])
295
+ described_class.paginated_get(url, 1, 100, custom: :value, &do_nothing)
296
+ end
297
+
298
+ describe 'Honors passed pages' do
299
+ it 'Has an each method' do
300
+ headers1 = { params: { 'page' => 1, 'per_page' => 2 } }
301
+ headers2 = { params: { 'page' => 2, 'per_page' => 2 } }
302
+ expect(GandiV5).to receive(:get).with(url, headers1)
303
+ .ordered
304
+ .and_return([nil, %i[a b]])
305
+ expect(GandiV5).to receive(:get).with(url, headers2)
306
+ .ordered
307
+ .and_return([nil, %i[c d]])
308
+
309
+ described_class.paginated_get(url, (1..2), 2, &do_nothing)
310
+ end
311
+
312
+ it 'Positive integer' do
313
+ headers = { params: { 'page' => 3, 'per_page' => 2 } }
314
+ expect(GandiV5).to receive(:get).with(url, headers)
315
+ .ordered
316
+ .and_return([nil, %i[a b c]])
317
+ described_class.paginated_get(url, 3, 2, &do_nothing)
318
+ end
319
+
320
+ it 'Nonpositive integer' do
321
+ expect { described_class.paginated_get(url, -3, 2, &do_nothing) }.to \
322
+ raise_error ArgumentError, 'page must be positive'
323
+ end
324
+ end
325
+
326
+ it 'Relies on caller to build their list' do
327
+ this_data = [:a]
328
+ expect(GandiV5).to receive(:get).and_return([nil, this_data])
329
+ expect { |b| described_class.paginated_get(url, 1, 100, &b) }.to yield_with_args(this_data)
330
+ end
331
+
332
+ it 'Requires a block' do
333
+ allow(GandiV5).to receive(:get).and_return([nil, [:a]])
334
+
335
+ expect { described_class.paginated_get(url) }.to raise_error LocalJumpError
336
+ end
337
+ end
229
338
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gandi_v5
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Gauld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-03 00:00:00.000000000 Z
11
+ date: 2020-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -202,28 +202,28 @@ dependencies:
202
202
  requirements:
203
203
  - - "~>"
204
204
  - !ruby/object:Gem::Version
205
- version: '0.73'
205
+ version: '0.87'
206
206
  type: :development
207
207
  prerelease: false
208
208
  version_requirements: !ruby/object:Gem::Requirement
209
209
  requirements:
210
210
  - - "~>"
211
211
  - !ruby/object:Gem::Version
212
- version: '0.73'
212
+ version: '0.87'
213
213
  - !ruby/object:Gem::Dependency
214
214
  name: rubocop-performance
215
215
  requirement: !ruby/object:Gem::Requirement
216
216
  requirements:
217
217
  - - "~>"
218
218
  - !ruby/object:Gem::Version
219
- version: '1.1'
219
+ version: '1.7'
220
220
  type: :development
221
221
  prerelease: false
222
222
  version_requirements: !ruby/object:Gem::Requirement
223
223
  requirements:
224
224
  - - "~>"
225
225
  - !ruby/object:Gem::Version
226
- version: '1.1'
226
+ version: '1.7'
227
227
  - !ruby/object:Gem::Dependency
228
228
  name: simplecov
229
229
  requirement: !ruby/object:Gem::Requirement
@@ -308,6 +308,7 @@ files:
308
308
  - lib/gandi_v5/data.rb
309
309
  - lib/gandi_v5/data/converter.rb
310
310
  - lib/gandi_v5/data/converter/array_of.rb
311
+ - lib/gandi_v5/data/converter/integer.rb
311
312
  - lib/gandi_v5/data/converter/symbol.rb
312
313
  - lib/gandi_v5/data/converter/time.rb
313
314
  - lib/gandi_v5/domain.rb
@@ -323,7 +324,6 @@ files:
323
324
  - lib/gandi_v5/domain/live_dns.rb
324
325
  - lib/gandi_v5/domain/renewal_information.rb
325
326
  - lib/gandi_v5/domain/restore_information.rb
326
- - lib/gandi_v5/domain/sharing_space.rb
327
327
  - lib/gandi_v5/domain/tld.rb
328
328
  - lib/gandi_v5/email.rb
329
329
  - lib/gandi_v5/email/forward.rb
@@ -335,17 +335,23 @@ files:
335
335
  - lib/gandi_v5/error/gandi_error.rb
336
336
  - lib/gandi_v5/live_dns.rb
337
337
  - lib/gandi_v5/live_dns/domain.rb
338
- - lib/gandi_v5/live_dns/has_zone_records.rb
339
- - lib/gandi_v5/live_dns/record_set.rb
340
- - lib/gandi_v5/live_dns/zone.rb
341
- - lib/gandi_v5/live_dns/zone/snapshot.rb
338
+ - lib/gandi_v5/live_dns/domain/dnssec_key.rb
339
+ - lib/gandi_v5/live_dns/domain/record.rb
340
+ - lib/gandi_v5/live_dns/domain/snapshot.rb
341
+ - lib/gandi_v5/live_dns/domain/tsig_key.rb
342
342
  - lib/gandi_v5/organization.rb
343
+ - lib/gandi_v5/organization/customer.rb
344
+ - lib/gandi_v5/sharing_space.rb
345
+ - lib/gandi_v5/simple_hosting.rb
346
+ - lib/gandi_v5/simple_hosting/instance.rb
347
+ - lib/gandi_v5/simple_hosting/instance/application.rb
348
+ - lib/gandi_v5/simple_hosting/instance/database.rb
349
+ - lib/gandi_v5/simple_hosting/instance/language.rb
350
+ - lib/gandi_v5/simple_hosting/instance/upgrade.rb
351
+ - lib/gandi_v5/simple_hosting/instance/virtual_host.rb
352
+ - lib/gandi_v5/simple_hosting/instance/virtual_host/linked_dns_zone.rb
343
353
  - lib/gandi_v5/version.rb
344
354
  - spec/.rubocop.yml
345
- - spec/features/domain_spec.rb
346
- - spec/features/livedns_domain_spec.rb
347
- - spec/features/livedns_zone_spec.rb
348
- - spec/features/mailbox_spec.rb
349
355
  - spec/fixtures/bodies/GandiV5_Billing/info.yml
350
356
  - spec/fixtures/bodies/GandiV5_Domain/fetch.yml
351
357
  - spec/fixtures/bodies/GandiV5_Domain/fetch_contacts.yml
@@ -365,25 +371,28 @@ files:
365
371
  - spec/fixtures/bodies/GandiV5_Email_Slot/list.yml
366
372
  - spec/fixtures/bodies/GandiV5_LiveDNS_Domain/fetch.yml
367
373
  - spec/fixtures/bodies/GandiV5_LiveDNS_Domain/list.yml
368
- - spec/fixtures/bodies/GandiV5_LiveDNS_Zone/fetch.yml
369
- - spec/fixtures/bodies/GandiV5_LiveDNS_Zone/list.yml
370
- - spec/fixtures/bodies/GandiV5_LiveDNS_Zone_Snapshot/fetch.yml
371
- - spec/fixtures/bodies/GandiV5_LiveDNS_Zone_Snapshot/list.yml
374
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain/list_tsig.yml
375
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain/nameservers.yml
376
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain_DnssecKey/fetch.yml
377
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain_DnssecKey/list.yml
378
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain_Snapshot/fetch.yml
379
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain_Snapshot/list.yml
380
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/fetch.yml
381
+ - spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/list.yml
372
382
  - spec/fixtures/bodies/GandiV5_Organization/fetch.yml
373
383
  - spec/fixtures/bodies/GandiV5_Organization/list.yml
374
- - spec/fixtures/vcr/Domain_features/List_domains.yml
375
- - spec/fixtures/vcr/Domain_features/Renew_domain.yml
376
- - spec/fixtures/vcr/LiveDNS_Domain_features/List_domains.yml
377
- - spec/fixtures/vcr/LiveDNS_Zone_features/List_zones.yml
378
- - spec/fixtures/vcr/LiveDNS_Zone_features/Make_and_save_snapshot.yml
379
- - spec/fixtures/vcr/LiveDNS_Zone_features/Save_zone_to_file.yml
380
- - spec/fixtures/vcr/Mailbox_features/List_mailboxes.yml
384
+ - spec/fixtures/bodies/GandiV5_Organization_Customer/list.yml
385
+ - spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/fetch.yml
386
+ - spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/list.yml
387
+ - spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/fetch.yml
388
+ - spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/list.yml
381
389
  - spec/spec_helper.rb
382
390
  - spec/test.env
383
391
  - spec/units/gandi_v5/billing/info/prepaid_spec.rb
384
392
  - spec/units/gandi_v5/billing/info_spec.rb
385
393
  - spec/units/gandi_v5/billing_spec.rb
386
394
  - spec/units/gandi_v5/data/converter/array_of_spec.rb
395
+ - spec/units/gandi_v5/data/converter/integer_spec.rb
387
396
  - spec/units/gandi_v5/data/converter/symbol_spec.rb
388
397
  - spec/units/gandi_v5/data/converter/time_spec.rb
389
398
  - spec/units/gandi_v5/data/converter_spec.rb
@@ -400,7 +409,6 @@ files:
400
409
  - spec/units/gandi_v5/domain/live_dns_spec.rb
401
410
  - spec/units/gandi_v5/domain/renewal_information_spec.rb
402
411
  - spec/units/gandi_v5/domain/restore_information_spec.rb
403
- - spec/units/gandi_v5/domain/sharing_space_spec.rb
404
412
  - spec/units/gandi_v5/domain/tld_spec.rb
405
413
  - spec/units/gandi_v5/domain_spec.rb
406
414
  - spec/units/gandi_v5/email/forward_spec.rb
@@ -410,12 +418,23 @@ files:
410
418
  - spec/units/gandi_v5/email/slot_spec.rb
411
419
  - spec/units/gandi_v5/error/gandi_error_spec.rb
412
420
  - spec/units/gandi_v5/error_spec.rb
421
+ - spec/units/gandi_v5/live_dns/domain/dnssec_key_spec.rb
422
+ - spec/units/gandi_v5/live_dns/domain/record_spec.rb
423
+ - spec/units/gandi_v5/live_dns/domain/snapshot_spec.rb
424
+ - spec/units/gandi_v5/live_dns/domain/tsig_key_spec.rb
413
425
  - spec/units/gandi_v5/live_dns/domain_spec.rb
414
- - spec/units/gandi_v5/live_dns/record_set_spec.rb
415
- - spec/units/gandi_v5/live_dns/zone/snapshot_spec.rb
416
- - spec/units/gandi_v5/live_dns/zone_spec.rb
417
426
  - spec/units/gandi_v5/live_dns_spec.rb
427
+ - spec/units/gandi_v5/organization/customer_spec.rb
418
428
  - spec/units/gandi_v5/organization_spec.rb
429
+ - spec/units/gandi_v5/sharing_space_spec.rb
430
+ - spec/units/gandi_v5/simple_hosting/instance/application_spec.rb
431
+ - spec/units/gandi_v5/simple_hosting/instance/database_spec.rb
432
+ - spec/units/gandi_v5/simple_hosting/instance/language_spec.rb
433
+ - spec/units/gandi_v5/simple_hosting/instance/upgrade_spec.rb
434
+ - spec/units/gandi_v5/simple_hosting/instance/virtual_host/linked_dns_zone_spec.rb
435
+ - spec/units/gandi_v5/simple_hosting/instance/virtual_host_spec.rb
436
+ - spec/units/gandi_v5/simple_hosting/instance_spec.rb
437
+ - spec/units/gandi_v5/simple_hosting_spec.rb
419
438
  - spec/units/gandi_v5_spec.rb
420
439
  homepage: https://github.com/robertgauld/gandi_v5
421
440
  licenses:
@@ -436,7 +455,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
436
455
  - !ruby/object:Gem::Version
437
456
  version: 2.6.14
438
457
  requirements: []
439
- rubygems_version: 3.0.3
458
+ rubygems_version: 3.1.2
440
459
  signing_key:
441
460
  specification_version: 4
442
461
  summary: Make use of Gandi's V5 API.
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class GandiV5
4
- class Domain
5
- # Sharing space which contains a domain.
6
- # @!attribute [r] uuid
7
- # @return [String]
8
- # @!attribute [r] name
9
- # @return [String]
10
- # @!attribute [r] reseller
11
- # @return [nil, Boolean]
12
- class SharingSpace
13
- include GandiV5::Data
14
-
15
- members :name, :reseller
16
- member :uuid, gandi_key: 'id'
17
-
18
- alias sharing_space_uuid uuid
19
- end
20
- end
21
- end