Debug modularization and integration

This commit is contained in:
Chris Luo 2015-03-13 20:20:50 -04:00
parent 84d1b66bbc
commit 87fe99efd0
3 changed files with 1 additions and 30 deletions

View File

@ -81,7 +81,6 @@ require 'fog/bin/rage4'
require 'fog/bin/riakcs'
require 'fog/bin/openstack'
require 'fog/bin/ovirt'
require 'fog/bin/powerdns'
require 'fog/bin/profitbricks'
require 'fog/bin/sakuracloud'
require 'fog/bin/serverlove'

View File

@ -1,28 +0,0 @@
class PowerDNS < Fog::Bin
class << self
def class_for(key)
case key
when :dns
Fog::DNS::PowerDNS
else
raise ArgumentError, "Unsupported #{self} service: #{key}"
end
end
def [](service)
@@connections ||= Hash.new do |hash, key|
hash[key] = case key
when :dns
Fog::Logger.warning("PowerDNS[:dns] is not recommended, use DNS[:powerdns] for portability")
Fog::DNS.new(:provider => :powerdns)
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
end
end
@@connections[service]
end
def services
Fog::PowerDNS.services
end
end
end

View File

@ -136,7 +136,7 @@ describe Fog do
assert_includes Fog.available_providers, "OpenStack" if OpenStack.available?
assert_includes Fog.available_providers, "Openvz" if Openvz.available?
assert_includes Fog.available_providers, "Ovirt" if Ovirt.available?
assert_includes Fog.available_providers, "ProfitBricks" if PowerDNS.available?
assert_includes Fog.available_providers, "PowerDNS" if PowerDNS.available?
assert_includes Fog.available_providers, "ProfitBricks" if ProfitBricks.available?
assert_includes Fog.available_providers, "Rackspace" if Rackspace.available?
assert_includes Fog.available_providers, "Rage4" if Rage4.available?