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

[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

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