lib/rubber/dns/aws.rb in rubber-2.12.2 vs lib/rubber/dns/aws.rb in rubber-2.13.0
- old
+ new
@@ -125,11 +125,11 @@
end
def find_hosts(opts = {})
opts = setup_opts(opts, [:host, :domain])
- result = []
+
zone = find_or_create_zone(opts[:domain])
host = opts_to_host(opts)
if opts[:host] && opts[:host] != '*'
found_host = zone.records.all(:name => host[:name], :type => host[:type], :max_items => 1).first
@@ -140,16 +140,17 @@
end
hosts = hosts.select {|h| h.name == host[:name] } if opts.has_key?(:host) && opts[:host] != '*'
hosts = hosts.select {|h| h.type == host[:type] } if opts.has_key?(:type) && opts[:type] != '*'
- return hosts
+ hosts
end
def find_host_records(opts = {})
hosts = find_hosts(opts)
result = hosts.collect {|h| host_to_opts(h).merge(:domain => opts[:domain]) }
- return result
+
+ result
end
def create_host_record(opts = {})
opts = setup_opts(opts, [:host, :data, :domain, :type, :ttl])
zone = find_or_create_zone(opts[:domain])