2011-02-23 22:35:05 -05:00
|
|
|
class DNSimple < Fog::Bin
|
|
|
|
class << self
|
|
|
|
|
|
|
|
def class_for(key)
|
|
|
|
case key
|
|
|
|
when :dns
|
2011-06-15 20:25:01 -04:00
|
|
|
Fog::DNS::DNSimple
|
2011-02-23 22:35:05 -05:00
|
|
|
else
|
|
|
|
raise ArgumentError, "Unrecognized service: #{key}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
|
|
|
hash[key] = case key
|
2011-06-15 20:25:01 -04:00
|
|
|
when :dns
|
2011-09-02 13:30:10 -04:00
|
|
|
Fog::Logger.warning("DNSimple[:dns] is deprecated, use Storage[:dnsimple] instead")
|
2011-06-15 20:25:01 -04:00
|
|
|
Fog::DNS.new(:provider => 'DNSimple')
|
|
|
|
else
|
|
|
|
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
|
|
|
end
|
2011-02-23 22:35:05 -05:00
|
|
|
end
|
|
|
|
@@connections[service]
|
|
|
|
end
|
|
|
|
|
|
|
|
def services
|
|
|
|
Fog::DNSimple.services
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|