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

[hp|storage] Use response_block param, as excon has deprecated implicit blocks

This commit is contained in:
Ferran Rodenas 2012-08-23 17:59:24 +02:00
parent ac072e4903
commit 09adbd69f0

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