Class: RecordStore::Provider::DNSimple
- Inherits:
-
RecordStore::Provider
- Object
- RecordStore::Provider
- RecordStore::Provider::DNSimple
- Defined in:
- lib/record_store/provider/dnsimple.rb
Class Method Summary collapse
- .empty_non_terminal_over_wildcard? ⇒ Boolean
- .record_types ⇒ Object
-
.retrieve_current_records(zone:, stdout: $stdout) ⇒ Object
returns an array of Record objects that match the records which exist in the provider.
- .supports_alias? ⇒ Boolean
-
.zones ⇒ Object
Returns an array of the zones managed by provider as strings.
Methods inherited from RecordStore::Provider
apply_changeset, build_zone, freezable?, provider_for, thawable?, to_s
Class Method Details
.empty_non_terminal_over_wildcard? ⇒ Boolean
16 17 18 |
# File 'lib/record_store/provider/dnsimple.rb', line 16 def empty_non_terminal_over_wildcard? false end |
.record_types ⇒ Object
8 9 10 |
# File 'lib/record_store/provider/dnsimple.rb', line 8 def record_types super | Set.new(%w(PTR SSHFP)) end |
.retrieve_current_records(zone:, stdout: $stdout) ⇒ Object
returns an array of Record objects that match the records which exist in the provider
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/record_store/provider/dnsimple.rb', line 21 def retrieve_current_records(zone:, stdout: $stdout) retry_on_connection_errors do session.zones.all_zone_records(account_id, zone).data.map do |record| build_from_api(record, zone) rescue StandardError stdout.puts "Cannot build record: #{record}" raise end.compact end end |
.supports_alias? ⇒ Boolean
12 13 14 |
# File 'lib/record_store/provider/dnsimple.rb', line 12 def supports_alias? true end |
.zones ⇒ Object
Returns an array of the zones managed by provider as strings
33 34 35 36 37 |
# File 'lib/record_store/provider/dnsimple.rb', line 33 def zones retry_on_connection_errors do session.zones.all_zones(account_id).data.map(&:name) end end |