1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/terremark/bin.rb
Edward Muller 58e58cf213 minimal support for TMRK eCloud.
Fixed a small issue with ComputeCapacity not working.
2010-04-16 23:20:57 +08:00

27 lines
592 B
Ruby

module Terremark
class << self
if Fog.credentials[:terremark_password] && Fog.credentials[:terremark_username]
def initialized?
true
end
def [](service)
@@connections ||= Hash.new do |hash, key|
credentials = Fog.credentials.reject do |k,v|
![:terremark_username, :terremark_password].include?(k)
end
hash[key] = Fog::Terremark.new(credentials.merge(:terremark_service => key))
end
@@connections[service]
end
else
def initialized?
false
end
end
end
end