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

Merge pull request #1112 from frodenas/excon-response-block

[hp|storage] Use response_block param, as excon has deprecated implicit blocks
This commit is contained in:
Wesley Beary 2012-08-23 09:26:44 -07:00
commit 3b66fd928b

View file

@ -10,12 +10,18 @@ module Fog
# * object<~String> - Name of object to look for
#
def get_object(container, object, &block)
response = request({
params = {}
if block_given?
params[:response_block] = Proc.new
end
response = request(params.merge!({
:block => block,
:expects => 200,
:method => 'GET',
:path => "#{Fog::HP.escape(container)}/#{Fog::HP.escape(object)}"
}, false, &block)
}), false)
response
end