1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

options not used. return nil unless we find a matching url in response

This commit is contained in:
Shawn Catanzarite 2013-09-25 12:21:20 -07:00
parent 113dadd48d
commit cccb3775bb

View file

@ -38,8 +38,9 @@ module Fog
def get(record_id)
requires :zone
list = service.get_all_records(zone.domain, options).body['data']
list = service.get_all_records(zone.domain, {}).body['data']
url = list.detect { |e| e =~ /\/#{record_id}$/ }
return unless url
(_, _, t, _, fqdn, id) = url.split('/')
type = t.gsub(/Record$/, '')
record = service.get_record(type, zone.domain, fqdn, 'record_id' => id).body['data']