gandi_v5 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -2
- data/lib/gandi_v5/data.rb +2 -2
- data/lib/gandi_v5/email/mailbox.rb +1 -1
- data/lib/gandi_v5/version.rb +1 -1
- data/spec/.rubocop.yml +3 -50
- data/spec/features/list_domain_renewals_spec.rb +1 -1
- data/spec/features/list_email_addresses_spec.rb +3 -3
- metadata +70 -70
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bfa3d695cec03737e8e5c3639c7744300babd00d59081f4edf14f013d2e9787
|
4
|
+
data.tar.gz: ce687383ed1d014889d22e9d33a068dad8a8dc8ec2a73a38c9150014195a3f0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2752f84704fbd326503b2bada3e3193d2215abc6c19e1b71198b29eabaf4e67f473249d076aa806ca2c937195a35c7d2a8c490e1f586d0c3f121be5900c1ae5
|
7
|
+
data.tar.gz: 398dc026b251a700432dee898e23c207bee4fa10c5bcc879f706f0e9c0ed0793d3b670861b97221bd4f64bfbfd27c32a589b5b7eeb911662b95623461ec90f59
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Gandi V5 API Gem Changelog
|
2
2
|
|
3
|
+
## Version 0.9.1
|
4
|
+
|
5
|
+
* Add testing against ruby 2.7.2 and 3.0.0
|
6
|
+
|
3
7
|
## Version 0.9.0
|
4
8
|
|
5
9
|
* Add transferring a domain to Gandi (I don't have any domains outside Gandi to test this myself so it's possible I've misread the docs and a bug is waiting to be found, please add an issue if I have):
|
data/README.md
CHANGED
@@ -8,8 +8,9 @@ This gem supports the following versions of ruby, it may work on other versions
|
|
8
8
|
|
9
9
|
* ruby:
|
10
10
|
* 2.6.0 - 2.6.6
|
11
|
-
* 2.7.0 - 2.7.
|
12
|
-
*
|
11
|
+
* 2.7.0 - 2.7.2
|
12
|
+
* 3.0.0
|
13
|
+
* truffleruby 20.1.0 - 20.2.0
|
13
14
|
* jruby, once it's reached parity with ruby 2.6.x
|
14
15
|
* rubinius, once it's reached parity with ruby 2.6.x
|
15
16
|
|
data/lib/gandi_v5/data.rb
CHANGED
@@ -150,8 +150,8 @@ class GandiV5
|
|
150
150
|
return nil if data.nil?
|
151
151
|
|
152
152
|
new(
|
153
|
-
translate_gandi(data).transform_keys(&:to_sym)
|
154
|
-
|
153
|
+
**translate_gandi(data).transform_keys(&:to_sym)
|
154
|
+
.select { |k, _v| data_member?(k) }
|
155
155
|
)
|
156
156
|
end
|
157
157
|
|
@@ -265,7 +265,7 @@ class GandiV5
|
|
265
265
|
def self.crypt_password(password)
|
266
266
|
# You can also send a hashed password in sha512-crypt ie: {SHA512-CRYPT}$6$xxxx$yyyy
|
267
267
|
salt = SecureRandom.random_number(36**8).to_s(36)
|
268
|
-
password.crypt(
|
268
|
+
password.crypt("$6$#{salt}")
|
269
269
|
end
|
270
270
|
private_class_method :crypt_password
|
271
271
|
|
data/lib/gandi_v5/version.rb
CHANGED
data/spec/.rubocop.yml
CHANGED
@@ -2,57 +2,10 @@ require:
|
|
2
2
|
- rubocop-performance
|
3
3
|
AllCops:
|
4
4
|
TargetRubyVersion: 2.6.0
|
5
|
-
|
6
|
-
Enabled: true
|
5
|
+
NewCops: enable
|
7
6
|
Layout/LineLength:
|
8
7
|
Max: 125
|
9
|
-
|
10
|
-
Enabled:
|
11
|
-
Lint/DeprecatedOpenSSLConstant:
|
12
|
-
Enabled: true
|
13
|
-
Lint/MixedRegexpCaptureTypes:
|
14
|
-
Enabled: true
|
15
|
-
Lint/RaiseException:
|
16
|
-
Enabled: true
|
17
|
-
Lint/StructNewOverride:
|
18
|
-
Enabled: true
|
8
|
+
Lint/ConstantDefinitionInBlock:
|
9
|
+
Enabled: false
|
19
10
|
Metrics/BlockLength:
|
20
11
|
Max: 750
|
21
|
-
Performance/AncestorsInclude:
|
22
|
-
Enabled: true
|
23
|
-
Performance/BigDecimalWithNumericArgument:
|
24
|
-
Enabled: true
|
25
|
-
Performance/RedundantSortBlock:
|
26
|
-
Enabled: true
|
27
|
-
Performance/RedundantStringChars:
|
28
|
-
Enabled: true
|
29
|
-
Performance/ReverseFirst:
|
30
|
-
Enabled: true
|
31
|
-
Performance/SortReverse:
|
32
|
-
Enabled: true
|
33
|
-
Performance/Squeeze:
|
34
|
-
Enabled: true
|
35
|
-
Performance/StringInclude:
|
36
|
-
Enabled: true
|
37
|
-
Style/AccessorGrouping:
|
38
|
-
Enabled: true
|
39
|
-
Style/BisectedAttrAccessor:
|
40
|
-
Enabled: true
|
41
|
-
Style/ExponentialNotation:
|
42
|
-
Enabled: true
|
43
|
-
Style/HashEachMethods:
|
44
|
-
Enabled: true
|
45
|
-
Style/HashTransformKeys:
|
46
|
-
Enabled: true
|
47
|
-
Style/HashTransformValues:
|
48
|
-
Enabled: true
|
49
|
-
Style/RedundantAssignment:
|
50
|
-
Enabled: true
|
51
|
-
Style/RedundantFetchBlock:
|
52
|
-
Enabled: true
|
53
|
-
Style/RedundantRegexpCharacterClass:
|
54
|
-
Enabled: true
|
55
|
-
Style/RedundantRegexpEscape:
|
56
|
-
Enabled: true
|
57
|
-
Style/SlicingWithRange:
|
58
|
-
Enabled: true
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
describe 'Examples', :vcr do
|
4
4
|
it 'List domain renewals' do
|
5
|
-
expect(
|
5
|
+
expect($stdout).to receive(:puts).with("2021-03-12\t£8.87\texample.com")
|
6
6
|
|
7
7
|
# For each domain (sorted by assending renewal date) print <date>\t<cost>\t<fqdn>
|
8
8
|
GandiV5::Domain.list.each do |domain|
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
describe 'Examples', :vcr do
|
4
4
|
it 'List email addresses' do
|
5
|
-
expect(
|
6
|
-
expect(
|
7
|
-
expect(
|
5
|
+
expect($stdout).to receive(:puts).with("alias@example.com\talias for user@example.com").ordered
|
6
|
+
expect($stdout).to receive(:puts).with("forward@example.com\tforwards to user@example.com").ordered
|
7
|
+
expect($stdout).to receive(:puts).with("user@example.com\tstandard mailbox (0% of 3GB used)").ordered
|
8
8
|
|
9
9
|
# For each domain:
|
10
10
|
# 1. Create an empty hash to store address => description
|
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.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Gauld
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -280,7 +280,7 @@ dependencies:
|
|
280
280
|
- - "~>"
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '3.6'
|
283
|
-
description:
|
283
|
+
description:
|
284
284
|
email:
|
285
285
|
- robert@robertgauld.uk
|
286
286
|
executables: []
|
@@ -447,7 +447,7 @@ metadata:
|
|
447
447
|
documentation_uri: https://rubydoc.info/github/robertgauld/gandi_v5/main
|
448
448
|
homepage_uri: https://github.com/robertgauld/gandi_v5
|
449
449
|
source_code_uri: https://github.com/robertgauld/gandi_v5
|
450
|
-
post_install_message:
|
450
|
+
post_install_message:
|
451
451
|
rdoc_options:
|
452
452
|
- "--title"
|
453
453
|
- gandi_v5 - Make use of Gandi's V5 API.
|
@@ -469,101 +469,101 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
469
469
|
- !ruby/object:Gem::Version
|
470
470
|
version: 2.6.14
|
471
471
|
requirements: []
|
472
|
-
rubygems_version: 3.
|
473
|
-
signing_key:
|
472
|
+
rubygems_version: 3.2.3
|
473
|
+
signing_key:
|
474
474
|
specification_version: 4
|
475
475
|
summary: Make use of Gandi's V5 API.
|
476
476
|
test_files:
|
477
|
-
- spec
|
478
|
-
- spec/
|
477
|
+
- spec/.rubocop.yml
|
478
|
+
- spec/features/list_domain_renewals_spec.rb
|
479
|
+
- spec/features/list_email_addresses_spec.rb
|
480
|
+
- spec/fixtures/bodies/GandiV5_Billing/info.yml
|
479
481
|
- spec/fixtures/bodies/GandiV5_Domain/fetch.yml
|
480
482
|
- spec/fixtures/bodies/GandiV5_Domain/fetch_contacts.yml
|
481
483
|
- spec/fixtures/bodies/GandiV5_Domain/fetch_glue_records.yml
|
482
484
|
- spec/fixtures/bodies/GandiV5_Domain/fetch_livedns.yml
|
485
|
+
- spec/fixtures/bodies/GandiV5_Domain/fetch_name_servers.yml
|
483
486
|
- spec/fixtures/bodies/GandiV5_Domain/fetch_renewal_info.yml
|
484
|
-
- spec/fixtures/bodies/GandiV5_Domain/list.yml
|
485
487
|
- spec/fixtures/bodies/GandiV5_Domain/fetch_restore_info.yml
|
486
|
-
- spec/fixtures/bodies/
|
488
|
+
- spec/fixtures/bodies/GandiV5_Domain/list.yml
|
489
|
+
- spec/fixtures/bodies/GandiV5_Domain_Availability/fetch.yml
|
487
490
|
- spec/fixtures/bodies/GandiV5_Domain_TLD/fetch.yml
|
488
491
|
- spec/fixtures/bodies/GandiV5_Domain_TLD/list.yml
|
489
|
-
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/fetch.yml
|
490
|
-
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/list.yml
|
491
|
-
- spec/fixtures/bodies/GandiV5_Organization/fetch.yml
|
492
|
-
- spec/fixtures/bodies/GandiV5_Organization/list.yml
|
493
|
-
- spec/fixtures/bodies/GandiV5_Email_Forward/list.yml
|
494
492
|
- spec/fixtures/bodies/GandiV5_Domain_TransferIn/fetch.yml
|
495
|
-
- spec/fixtures/bodies/
|
496
|
-
- spec/fixtures/bodies/
|
497
|
-
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/fetch.yml
|
498
|
-
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/list.yml
|
493
|
+
- spec/fixtures/bodies/GandiV5_Domain_TransferIn_Availability/fetch.yml
|
494
|
+
- spec/fixtures/bodies/GandiV5_Email_Forward/list.yml
|
499
495
|
- spec/fixtures/bodies/GandiV5_Email_Mailbox/fetch.yml
|
500
496
|
- spec/fixtures/bodies/GandiV5_Email_Mailbox/list.yml
|
497
|
+
- spec/fixtures/bodies/GandiV5_Email_Slot/fetch.yml
|
498
|
+
- spec/fixtures/bodies/GandiV5_Email_Slot/list.yml
|
501
499
|
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain/fetch.yml
|
502
500
|
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain/list.yml
|
503
|
-
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain/nameservers.yml
|
504
501
|
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain/list_tsig.yml
|
505
|
-
- spec/fixtures/bodies/
|
506
|
-
- spec/fixtures/bodies/GandiV5_Email_Slot/list.yml
|
507
|
-
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/fetch.yml
|
508
|
-
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/list.yml
|
509
|
-
- spec/fixtures/bodies/GandiV5_Organization_Customer/list.yml
|
502
|
+
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain/nameservers.yml
|
510
503
|
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_DnssecKey/fetch.yml
|
511
504
|
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_DnssecKey/list.yml
|
512
|
-
- spec/fixtures/bodies/
|
513
|
-
- spec/fixtures/
|
505
|
+
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_Snapshot/fetch.yml
|
506
|
+
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_Snapshot/list.yml
|
507
|
+
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/fetch.yml
|
508
|
+
- spec/fixtures/bodies/GandiV5_LiveDNS_Domain_TsigKey/list.yml
|
509
|
+
- spec/fixtures/bodies/GandiV5_Organization/fetch.yml
|
510
|
+
- spec/fixtures/bodies/GandiV5_Organization/list.yml
|
511
|
+
- spec/fixtures/bodies/GandiV5_Organization_Customer/list.yml
|
512
|
+
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/fetch.yml
|
513
|
+
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance/list.yml
|
514
|
+
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/fetch.yml
|
515
|
+
- spec/fixtures/bodies/GandiV5_SimpleHosting_Instance_VirtualHost/list.yml
|
514
516
|
- spec/fixtures/vcr/Examples/List_domain_renewals.yml
|
515
|
-
- spec
|
516
|
-
- spec/features/list_domain_renewals_spec.rb
|
517
|
-
- spec/features/list_email_addresses_spec.rb
|
517
|
+
- spec/fixtures/vcr/Examples/List_email_addresses.yml
|
518
518
|
- spec/spec_helper.rb
|
519
|
-
- spec/
|
520
|
-
- spec/units/gandi_v5/
|
521
|
-
- spec/units/gandi_v5/
|
522
|
-
- spec/units/gandi_v5/
|
523
|
-
- spec/units/gandi_v5/
|
524
|
-
- spec/units/gandi_v5/
|
525
|
-
- spec/units/gandi_v5/
|
519
|
+
- spec/test.env
|
520
|
+
- spec/units/gandi_v5/billing/info/prepaid_spec.rb
|
521
|
+
- spec/units/gandi_v5/billing/info_spec.rb
|
522
|
+
- spec/units/gandi_v5/billing_spec.rb
|
523
|
+
- spec/units/gandi_v5/data/converter/array_of_spec.rb
|
524
|
+
- spec/units/gandi_v5/data/converter/integer_spec.rb
|
525
|
+
- spec/units/gandi_v5/data/converter/symbol_spec.rb
|
526
|
+
- spec/units/gandi_v5/data/converter/time_spec.rb
|
527
|
+
- spec/units/gandi_v5/data/converter_spec.rb
|
528
|
+
- spec/units/gandi_v5/data_spec.rb
|
529
|
+
- spec/units/gandi_v5/domain/auto_renew_spec.rb
|
530
|
+
- spec/units/gandi_v5/domain/availability/product/period_spec.rb
|
531
|
+
- spec/units/gandi_v5/domain/availability/product/price_spec.rb
|
532
|
+
- spec/units/gandi_v5/domain/availability/product_spec.rb
|
533
|
+
- spec/units/gandi_v5/domain/availability/tax_spec.rb
|
526
534
|
- spec/units/gandi_v5/domain/availability_spec.rb
|
527
535
|
- spec/units/gandi_v5/domain/contact_spec.rb
|
536
|
+
- spec/units/gandi_v5/domain/contract_spec.rb
|
537
|
+
- spec/units/gandi_v5/domain/dates_spec.rb
|
538
|
+
- spec/units/gandi_v5/domain/live_dns_spec.rb
|
539
|
+
- spec/units/gandi_v5/domain/renewal_information_spec.rb
|
528
540
|
- spec/units/gandi_v5/domain/restore_information_spec.rb
|
529
541
|
- spec/units/gandi_v5/domain/tld_spec.rb
|
530
|
-
- spec/units/gandi_v5/domain/live_dns_spec.rb
|
531
542
|
- spec/units/gandi_v5/domain/transfer_in/availability_spec.rb
|
532
|
-
- spec/units/gandi_v5/domain/
|
533
|
-
- spec/units/gandi_v5/domain/renewal_information_spec.rb
|
534
|
-
- spec/units/gandi_v5/domain/dates_spec.rb
|
535
|
-
- spec/units/gandi_v5/domain/availability/product_spec.rb
|
536
|
-
- spec/units/gandi_v5/domain/availability/tax_spec.rb
|
537
|
-
- spec/units/gandi_v5/domain/availability/product/period_spec.rb
|
538
|
-
- spec/units/gandi_v5/domain/availability/product/price_spec.rb
|
539
|
-
- spec/units/gandi_v5/billing_spec.rb
|
543
|
+
- spec/units/gandi_v5/domain/transfer_in_spec.rb
|
540
544
|
- spec/units/gandi_v5/domain_spec.rb
|
541
|
-
- spec/units/gandi_v5/simple_hosting/instance_spec.rb
|
542
|
-
- spec/units/gandi_v5/simple_hosting/instance/language_spec.rb
|
543
|
-
- spec/units/gandi_v5/simple_hosting/instance/virtual_host_spec.rb
|
544
|
-
- spec/units/gandi_v5/simple_hosting/instance/virtual_host/linked_dns_zone_spec.rb
|
545
|
-
- spec/units/gandi_v5/simple_hosting/instance/database_spec.rb
|
546
|
-
- spec/units/gandi_v5/simple_hosting/instance/application_spec.rb
|
547
|
-
- spec/units/gandi_v5/simple_hosting/instance/upgrade_spec.rb
|
548
|
-
- spec/units/gandi_v5/organization/customer_spec.rb
|
549
|
-
- spec/units/gandi_v5/email/offer_spec.rb
|
550
|
-
- spec/units/gandi_v5/email/mailbox_spec.rb
|
551
545
|
- spec/units/gandi_v5/email/forward_spec.rb
|
552
546
|
- spec/units/gandi_v5/email/mailbox/responder_spec.rb
|
547
|
+
- spec/units/gandi_v5/email/mailbox_spec.rb
|
548
|
+
- spec/units/gandi_v5/email/offer_spec.rb
|
553
549
|
- spec/units/gandi_v5/email/slot_spec.rb
|
554
|
-
- spec/units/gandi_v5/
|
555
|
-
- spec/units/gandi_v5/
|
556
|
-
- spec/units/gandi_v5/
|
557
|
-
- spec/units/gandi_v5/
|
550
|
+
- spec/units/gandi_v5/error/gandi_error_spec.rb
|
551
|
+
- spec/units/gandi_v5/error_spec.rb
|
552
|
+
- spec/units/gandi_v5/live_dns/domain/dnssec_key_spec.rb
|
553
|
+
- spec/units/gandi_v5/live_dns/domain/record_spec.rb
|
554
|
+
- spec/units/gandi_v5/live_dns/domain/snapshot_spec.rb
|
555
|
+
- spec/units/gandi_v5/live_dns/domain/tsig_key_spec.rb
|
556
|
+
- spec/units/gandi_v5/live_dns/domain_spec.rb
|
558
557
|
- spec/units/gandi_v5/live_dns_spec.rb
|
558
|
+
- spec/units/gandi_v5/organization/customer_spec.rb
|
559
|
+
- spec/units/gandi_v5/organization_spec.rb
|
559
560
|
- spec/units/gandi_v5/sharing_space_spec.rb
|
560
|
-
- spec/units/gandi_v5/
|
561
|
-
- spec/units/gandi_v5/
|
562
|
-
- spec/units/gandi_v5/
|
563
|
-
- spec/units/gandi_v5/
|
564
|
-
- spec/units/gandi_v5/
|
565
|
-
- spec/units/gandi_v5/
|
566
|
-
- spec/units/gandi_v5/
|
567
|
-
- spec/units/gandi_v5/
|
561
|
+
- spec/units/gandi_v5/simple_hosting/instance/application_spec.rb
|
562
|
+
- spec/units/gandi_v5/simple_hosting/instance/database_spec.rb
|
563
|
+
- spec/units/gandi_v5/simple_hosting/instance/language_spec.rb
|
564
|
+
- spec/units/gandi_v5/simple_hosting/instance/upgrade_spec.rb
|
565
|
+
- spec/units/gandi_v5/simple_hosting/instance/virtual_host/linked_dns_zone_spec.rb
|
566
|
+
- spec/units/gandi_v5/simple_hosting/instance/virtual_host_spec.rb
|
567
|
+
- spec/units/gandi_v5/simple_hosting/instance_spec.rb
|
568
|
+
- spec/units/gandi_v5/simple_hosting_spec.rb
|
568
569
|
- spec/units/gandi_v5_spec.rb
|
569
|
-
- spec/test.env
|