[vcloud|compute] properly namespace vcloud test to prevent breaking others

closes #638
This commit is contained in:
geemus 2011-12-04 13:42:19 -06:00
parent 33366c61e5
commit 473513e68a
1 changed files with 15 additions and 14 deletions

View File

@ -1,19 +1,20 @@
module Fog
class Connection
def initialize(url, persistent=false, params={})
end
def request(params, &block)
path = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_')))
if File.exists?(path)
body = File.read(path)
else
''
module Vcloud
class Compute < Fog::Service
class Real
def request(params, &block)
path = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_')))
if File.exists?(path)
body = File.read(path)
else
''
end
Excon::Response.new(
:body => body,
:status => 200,
:header => '')
end
end
Excon::Response.new(
:body => body,
:status => 200,
:header => '')
end
end
end