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

.record_typesObject



7
8
9
# File 'lib/record_store/provider/dnsimple.rb', line 7

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



16
17
18
19
20
21
22
23
24
25
# File 'lib/record_store/provider/dnsimple.rb', line 16

def retrieve_current_records(zone:, stdout: $stdout)
  session.zones.all_records(, zone).data.map do |record|
    begin
      build_from_api(record, zone)
    rescue StandardError
      stdout.puts "Cannot build record: #{record}"
      raise
    end
  end.compact
end

.supports_alias?Boolean

Returns:

  • (Boolean)


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

def supports_alias?
  true
end

.zonesObject

Returns an array of the zones managed by provider as strings



28
29
30
# File 'lib/record_store/provider/dnsimple.rb', line 28

def zones
  session.zones.all_zones().data.map(&:name)
end