gandi_v5 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.travis.yml +1 -0
  4. data/CHANGELOG.md +44 -2
  5. data/Guardfile +5 -6
  6. data/README.md +5 -5
  7. data/doc/GandiV5/Billing/Info/Prepaid.html +817 -0
  8. data/doc/GandiV5/Billing/Info.html +641 -0
  9. data/doc/GandiV5/Billing.html +293 -0
  10. data/doc/GandiV5/Data/ClassMethods.html +223 -0
  11. data/doc/GandiV5/Data/Converter/ArrayOf.html +413 -0
  12. data/doc/GandiV5/Data/Converter/Symbol.html +322 -0
  13. data/doc/GandiV5/Data/Converter/Time.html +330 -0
  14. data/doc/GandiV5/Data/Converter.html +433 -0
  15. data/doc/GandiV5/Data.html +785 -0
  16. data/doc/GandiV5/Domain/AutoRenew.html +1237 -0
  17. data/doc/GandiV5/Domain/Availability/Product/Period.html +220 -0
  18. data/doc/GandiV5/Domain/Availability/Product/Price.html +1031 -0
  19. data/doc/GandiV5/Domain/Availability/Product.html +988 -0
  20. data/doc/GandiV5/Domain/Availability/Tax.html +440 -0
  21. data/doc/GandiV5/Domain/Availability.html +1020 -0
  22. data/doc/GandiV5/Domain/Contact.html +4459 -0
  23. data/doc/GandiV5/Domain/Contract.html +520 -0
  24. data/doc/GandiV5/Domain/Dates.html +1313 -0
  25. data/doc/GandiV5/Domain/RenewalInformation.html +1147 -0
  26. data/doc/GandiV5/Domain/RestoreInformation.html +339 -0
  27. data/doc/GandiV5/Domain/SharingSpace.html +437 -0
  28. data/doc/GandiV5/Domain/TLD.html +1565 -0
  29. data/doc/GandiV5/Domain.html +16847 -0
  30. data/doc/GandiV5/Email/Mailbox/Responder.html +1560 -0
  31. data/doc/GandiV5/Email/Mailbox.html +6307 -0
  32. data/doc/GandiV5/Email/Offer.html +514 -0
  33. data/doc/GandiV5/Email/Slot.html +4244 -0
  34. data/doc/GandiV5/Email.html +144 -0
  35. data/doc/GandiV5/Error/GandiError.html +270 -0
  36. data/doc/GandiV5/Error.html +151 -0
  37. data/doc/GandiV5/LiveDNS/Domain.html +2984 -0
  38. data/doc/GandiV5/LiveDNS/RecordSet.html +1593 -0
  39. data/doc/GandiV5/LiveDNS/Zone/Snapshot.html +1556 -0
  40. data/doc/GandiV5/LiveDNS/Zone.html +8891 -0
  41. data/doc/GandiV5/LiveDNS.html +300 -0
  42. data/doc/GandiV5/Organization.html +2341 -0
  43. data/doc/GandiV5.html +1183 -0
  44. data/doc/_index.html +474 -0
  45. data/doc/class_list.html +51 -0
  46. data/doc/css/common.css +1 -0
  47. data/doc/css/full_list.css +58 -0
  48. data/doc/css/style.css +496 -0
  49. data/doc/file.README.html +175 -0
  50. data/doc/file_list.html +56 -0
  51. data/doc/frames.html +17 -0
  52. data/doc/index.html +175 -0
  53. data/doc/js/app.js +303 -0
  54. data/doc/js/full_list.js +216 -0
  55. data/doc/js/jquery.js +4 -0
  56. data/doc/method_list.html +2427 -0
  57. data/doc/top-level-namespace.html +110 -0
  58. data/gandi_v5.gemspec +1 -1
  59. data/lib/gandi_v5/billing.rb +2 -2
  60. data/lib/gandi_v5/data.rb +2 -0
  61. data/lib/gandi_v5/domain/auto_renew.rb +4 -4
  62. data/lib/gandi_v5/domain/availability/product/period.rb +24 -0
  63. data/lib/gandi_v5/domain/availability/product/price.rb +36 -0
  64. data/lib/gandi_v5/domain/availability/product.rb +52 -0
  65. data/lib/gandi_v5/domain/availability/tax.rb +20 -0
  66. data/lib/gandi_v5/domain/availability.rb +49 -0
  67. data/lib/gandi_v5/domain/tld.rb +57 -0
  68. data/lib/gandi_v5/domain.rb +41 -86
  69. data/lib/gandi_v5/email/mailbox/responder.rb +43 -2
  70. data/lib/gandi_v5/email/mailbox.rb +32 -21
  71. data/lib/gandi_v5/email/offer.rb +2 -2
  72. data/lib/gandi_v5/email/slot.rb +42 -16
  73. data/lib/gandi_v5/error/gandi_error.rb +2 -2
  74. data/lib/gandi_v5/live_dns/domain.rb +59 -45
  75. data/lib/gandi_v5/live_dns/zone/snapshot.rb +27 -8
  76. data/lib/gandi_v5/live_dns/zone.rb +63 -59
  77. data/lib/gandi_v5/live_dns.rb +20 -0
  78. data/lib/gandi_v5/organization.rb +2 -2
  79. data/lib/gandi_v5/version.rb +1 -1
  80. data/lib/gandi_v5.rb +25 -5
  81. data/spec/features/domain_spec.rb +1 -1
  82. data/spec/fixtures/bodies/{GandiV5_Domain/availability.yaml → GandiV5_Domain_Availability/fetch.yaml} +0 -0
  83. data/spec/fixtures/bodies/{GandiV5_Domain/tld.yaml → GandiV5_Domain_TLD/fetch.yaml} +0 -0
  84. data/spec/fixtures/bodies/{GandiV5_Domain/tlds.yaml → GandiV5_Domain_TLD/list.yaml} +0 -0
  85. data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone_Snapshot/{get.yaml → fetch.yaml} +0 -0
  86. data/spec/fixtures/bodies/GandiV5_LiveDNS_Zone_Snapshot/list.yaml +3 -0
  87. data/spec/units/gandi_v5/billing_spec.rb +2 -2
  88. data/spec/units/gandi_v5/domain/auto_renew_spec.rb +5 -5
  89. data/spec/units/gandi_v5/domain/availability/product/period_spec.rb +4 -0
  90. data/spec/units/gandi_v5/domain/availability/product/price_spec.rb +4 -0
  91. data/spec/units/gandi_v5/domain/availability/product_spec.rb +4 -0
  92. data/spec/units/gandi_v5/domain/availability/tax_spec.rb +4 -0
  93. data/spec/units/gandi_v5/domain/availability_spec.rb +43 -0
  94. data/spec/units/gandi_v5/domain/tld_spec.rb +29 -0
  95. data/spec/units/gandi_v5/domain_spec.rb +89 -81
  96. data/spec/units/gandi_v5/email/mailbox/responder_spec.rb +52 -0
  97. data/spec/units/gandi_v5/email/mailbox_spec.rb +56 -27
  98. data/spec/units/gandi_v5/email/offer_spec.rb +1 -1
  99. data/spec/units/gandi_v5/email/slot_spec.rb +101 -13
  100. data/spec/units/gandi_v5/live_dns/domain_spec.rb +70 -40
  101. data/spec/units/gandi_v5/live_dns/zone/snapshot_spec.rb +32 -3
  102. data/spec/units/gandi_v5/live_dns/zone_spec.rb +68 -50
  103. data/spec/units/gandi_v5/live_dns_spec.rb +24 -0
  104. data/spec/units/gandi_v5/organization_spec.rb +1 -1
  105. data/spec/units/gandi_v5_spec.rb +37 -12
  106. metadata +72 -9
  107. data/TODO.md +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d32f073e157edcd88519f82b4dd082943d4ea049e0232de31dc80d6585070fd7
4
- data.tar.gz: ed3c8d5156a3efed4980f62775affc680e73c59890c3430740e41e27dca04763
3
+ metadata.gz: d77e35cfcd8e9488848bc9a988b8b2e79dea364fc014f0ae6e07335adb0e0b95
4
+ data.tar.gz: aa3a9b67338ccd330286db829bd593b77a423372175495e30c8098da95713495
5
5
  SHA512:
6
- metadata.gz: a15a87d90b92a53b37544862adb13cf11d21fa7d3737300f2b392b2abc9fa28cc150da48d40d0bb1d63c9a7f5b65dbf13cde7ed8d002e51ab78aac084fb17567
7
- data.tar.gz: 91812fc13dabdb21e84164a478376d411271aaec1a30be651f1c9af78c9c1d0e521a5af5f6b4162adb1e5a46ff1cd0bc6ce6231bc80e41cd86d2a33d45060f38
6
+ metadata.gz: ca79e34d1c4ca0b1cc2b54c58c27b6b7326d5a0568f201229270a89487d641221f4b26deac15494a22869ef91e9e5efe00d50b7652db6249febd31f5abf78514
7
+ data.tar.gz: 4e87456cd5fde75b7ba2c9fc4076da647c311cfa25ed35e8f85d5406e3766fdd2197210d86e5f81d323c9364cfe79e856e0c7f562a550ff8e8684513ef9f73f8
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ AllCops:
5
5
  Gemspec/RequiredRubyVersion:
6
6
  Enabled: false
7
7
  Metrics/AbcSize:
8
- Max: 17
8
+ Max: 20
9
9
  Metrics/ClassLength:
10
10
  Max: 200
11
11
  Metrics/LineLength:
data/.travis.yml CHANGED
@@ -3,6 +3,7 @@ rvm:
3
3
  - 2.6.0
4
4
  - 2.6.1
5
5
  - 2.6.2
6
+ - 2.6.3
6
7
  gemfile:
7
8
  - Gemfile
8
9
  branches:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,45 @@
1
- ## Version 0.0.1
1
+ # Gandi V5 API Gem Changelog
2
2
 
3
- * Initial release.
3
+ ## Version 0.2.0
4
+
5
+ * Enhancements to GandiV5::Domain
6
+ * .availability(fqdn, **options) moved to GandiV5::Domain::Availability.fetch(fqdn, **options)
7
+ * .create now returns created domain (except in dry-run mode)
8
+ * .tlds moved to GandiV5::Domain::TLD.list
9
+ * .tld(name) moved to GandiV5::Domain::TLD.fetch(name)
10
+ * #renewal_price(currency: 'GBP', period: 1) added
11
+ * Enhancements to GandiV5::Email::Mailbox
12
+ * .create now returns created mailbox
13
+ * .create now checks for available slots and a valid type has been passed
14
+ * Enhancements to GandiV5::Email::Mailbox::Responder
15
+ * Add #enable(message:, ends_at:, starts_at: Time.now) to enable the auto responder in Gandi
16
+ * Add #disable to disable the auto responder in Gandi
17
+ * Enhancements to GandiV5::Email::Slot
18
+ * .create now returns created slot
19
+ * #delete now checks for inactiveness and refundableness
20
+ * Enhancements to GandiV5::LiveDNS::Domain
21
+ * Add #zone and #fetch_zone
22
+ * Remove #replace_*_records_for methods
23
+ * Changes to #replace_records_for to allow calling with name, type, ttl and values. When calling with name and fecords records MUST be passed as an array.
24
+ * Enhancements to GandiV5::LiveDNS::Zone
25
+ * .create now returns created zone
26
+ * Remove #replace_*_records_for methods
27
+ * Changes to #replace_records_for to allow calling with name, type, ttl and values. When calling with name and fecords records MUST be passed as an array.
28
+ * Enhancements to GandiV5::LiveDNS::Zone::Snapshot
29
+ * Add .list
30
+ * Add .fetch
31
+ * Add #zone and #fetch_zone
32
+ * Add support for ruby 2.6.3
33
+ * Add aliasing methods:
34
+ * GandiV5.domains -> GandiV5::Domain.list
35
+ * GandiV5.domain -> GandiV5::Domain.fetch
36
+ * GandiV5.mailboxes -> GandiV5::Email::Mailbox.list
37
+ * GandiV5.mailbox_slots -> GandiV5::Email::Slot.list
38
+ * GandiV5::LiveDNS.domains -> GandiV5::LiveDNS::Domain.list
39
+ * GandiV5::LiveDNS.domain -> GandiV5::LiveDNS::Domain.fetch
40
+ * GandiV5::LiveDNS.zones -> GandiV5::LiveDNS::Zone.list
41
+ * GandiV5::LiveDNS.zone -> GandiV5::LiveDNS::Zone.fetch
42
+
43
+ ## Version 0.1.0
44
+
45
+ * Initial release.
data/Guardfile CHANGED
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  guard :bundler do
4
- watch(/^Gemfile(?:\.lock)$'/)
5
- watch(/^.+\.gemspec$'/)
4
+ watch(/^Gemfile(?:\.lock)$/)
5
+ watch(/^.+\.gemspec$/)
6
6
  end
7
7
 
8
8
  # rubocop:disable Metrics/BlockLength
9
9
  group :red_green_refactor, halt_on_fail: true do
10
10
  group :rspec do
11
11
  guard(
12
- 'rspec',
12
+ :rspec,
13
13
  all_on_start: true,
14
14
  all_after_pass: false,
15
15
  notification: :failed,
@@ -24,12 +24,11 @@ group :red_green_refactor, halt_on_fail: true do
24
24
 
25
25
  group :rubocop do
26
26
  guard(
27
- 'rubocop',
27
+ :rubocop,
28
28
  all_on_start: true,
29
29
  all_after_pass: false,
30
30
  notification: :failed,
31
- keep_failed: false,
32
- cmd: 'bundle exec rubocop'
31
+ keep_failed: false
33
32
  ) do
34
33
  watch(%r{^lib/(.+)\.rb$}) { |m| [m[0], "spec/units/#{m[1]}_spec.rb"] }
35
34
  watch(%r{^spec/.+?/(.+)_spec\.rb$}) { |m| [m[0], "lib/#{m[1]}.rb"] }
data/README.md CHANGED
@@ -22,7 +22,7 @@ Travis CI monitors two branches (versions) of the code:
22
22
  This gem supports the following versions of ruby, it may work on other versions but is not tested against them so don't rely on it.
23
23
 
24
24
  * ruby:
25
- * 2.6.0 - 2.6.2
25
+ * 2.6.0 - 2.6.3
26
26
  * jruby, once it's reached parity with ruby 2.6.x
27
27
 
28
28
 
@@ -38,8 +38,8 @@ But then you were going to be careful anyway as this gem is currently in the ver
38
38
 
39
39
  Details of the API can be found at:
40
40
 
41
- * (https://api.gandi.net/docs/)
42
- * (https://doc.livedns.gandi.net/)
41
+ * <https://api.gandi.net/docs/>
42
+ * <https://doc.livedns.gandi.net/>
43
43
 
44
44
 
45
45
  ## Installation
@@ -73,7 +73,7 @@ GandiV5.api_key = '…' # Unless you've set it in the environment variable GANDI
73
73
 
74
74
  ```ruby
75
75
  # Get an array of all your domains.
76
- domains = GandiV5::Domain.list
76
+ domains = GandiV5.domains
77
77
 
78
78
  # Since each domain has only basic information, lets get all of the information.
79
79
  domains.map!(&:refresh)
@@ -90,5 +90,5 @@ We follow the [Semantic Versioning](http://semver.org/) concept.
90
90
  | --------------- | ---------------------- |
91
91
  | 0.1.0 | 2019-05-16 |
92
92
 
93
- See (https://api.gandi.net/docs/reference#API-Changelog) to find out what
93
+ See <https://api.gandi.net/docs/reference#API-Changelog> to find out what
94
94
  Gandi changed on each date.