Class: RecordStore::Provider::DNSimple

Inherits:
RecordStore::Provider show all
Defined in:
lib/record_store/provider/dnsimple.rb

Class Method Summary collapse

Methods inherited from RecordStore::Provider

apply_changeset, build_zone, freezable?, provider_for, thawable?, to_s

Class Method Details

.empty_non_terminal_over_wildcard?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/record_store/provider/dnsimple.rb', line 16

def empty_non_terminal_over_wildcard?
  false
end

.record_typesObject



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(, 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

Returns:

  • (Boolean)


12
13
14
# File 'lib/record_store/provider/dnsimple.rb', line 12

def supports_alias?
  true
end

.zonesObject

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().data.map(&:name)
  end
end