mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
parent
498df2e159
commit
e62b69fb19
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue