lib/dnsdeploy/local.rb in dnsdeploy-0.0.3 vs lib/dnsdeploy/local.rb in dnsdeploy-0.0.4
- old
+ new
@@ -16,11 +16,12 @@
def records(domain)
all_records.select { |r| r.domain.name == domain.name }
end
def domains
- @domains ||= json.map do |record_set|
- domain = dnsimple_domain(record_set['zone'])
+ @domains ||= json.inject({}) do |memo, record_set|
+ memo[record_set['zone']] = dnsimple_domain(record_set['zone'])
+ memo
end
end
def create_records(domain, json_records)
json_records.map do |record|