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:
parent
ac072e4903
commit
09adbd69f0
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue