1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Remove duplicate Mock class definition

This commit is contained in:
James Herdman 2012-05-24 16:14:20 -04:00
parent ebe7af8f94
commit a3c92dcd6a

View file

@ -123,32 +123,6 @@ module Fog
request :update_resource_count
request :update_virtual_machine
class Mock
def self.data
@data ||= Hash.new do |hash, key|
hash[key] = {}
end
end
def self.reset
@data = nil
end
def initialize(options={})
@cloudstack_api_key = options[:cloudstack_api_key]
end
def data
self.class.data[@cloudstack_api_key]
end
def reset_data
self.class.data.delete(@cloudstack_api_key)
end
end
class Real
def initialize(options={})
@ -267,6 +241,10 @@ module Fog
end # Real
class Mock
def initialize(options={})
@cloudstack_api_key = options[:cloudstack_api_key]
end
def self.data
@data ||= begin
rc_options = Fog.credentials[:cloudstack] || {}
@ -437,12 +415,16 @@ module Fog
end
def self.reset
@data= nil
@data = nil
end
def data
self.class.data
end
def reset_data
self.class.data.delete(@cloudstack_api_key)
end
end
end # Cloudstack
end # Compute