Skip to content

Commit

Permalink
Merge pull request rubber#116 from akremer/zerigo_fix
Browse files Browse the repository at this point in the history
Fix zerigo DNS
  • Loading branch information
wr0ngway committed Feb 7, 2012
2 parents a56730a + 67ec498 commit 9fb5753
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/rubber/dns/fog.rb
Expand Up @@ -60,7 +60,7 @@ def find_hosts(opts = {})
fqdn << "#{opts[:domain]}"
end

hosts = fqdn ? zone.records.find(fqdn) : zone.records.all
hosts = fqdn ? (zone.records.find(fqdn) rescue []) : zone.records.all
hosts.each do |h|
keep = true

Expand Down
13 changes: 5 additions & 8 deletions lib/rubber/dns/zerigo.rb
@@ -1,20 +1,17 @@
require 'rubygems'
require 'fog'
require 'rubber/dns/fog'

module Rubber
module Dns

class Zerigo < Fog

def initialize(env)
super(env)

@client = Fog::DNS.new({
:provider => 'zerigo',
:zerigo_email => provider_env.email,
:zerigo_token => provider_env.token
})
super(env.merge({"credentials" => { "provider" => 'zerigo', "zerigo_email" => env.email, "zerigo_token" => env.token }}))
end


end

end
end

0 comments on commit 9fb5753

Please sign in to comment.