[vcloud|compute] stopgap fix for test data files

stopgap for #638
This commit is contained in:
geemus 2011-12-02 10:00:41 -06:00
parent 498df2e159
commit e62b69fb19
1 changed files with 7 additions and 1 deletions

View File

@ -4,8 +4,14 @@ module Fog
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
''
end
Excon::Response.new(
:body => File.read(File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_')))),
:body => body,
:status => 200,
:header => '')
end