Rewrite to avoid long lines

This commit is contained in:
Greg Karékinian 2018-05-09 15:55:00 +02:00
parent 0ec76c8140
commit 709f63555d

View File

@ -18,8 +18,10 @@ module RemoteStorage
def do_put_request(url, data, content_type) def do_put_request(url, data, content_type)
deal_with_unauthorized_requests do deal_with_unauthorized_requests do
md5 = Digest::MD5.base64digest(data) md5 = Digest::MD5.base64digest(data)
authorization_headers = authorization_headers_for("PUT", url, md5, content_type) authorization_headers = authorization_headers_for(
RestClient.put(url, data, authorization_headers.merge({ "Content-Type" => content_type, "Content-Md5" => md5})) "PUT", url, md5, content_type
).merge({ "Content-Type" => content_type, "Content-Md5" => md5 })
RestClient.put(url, data, authorization_headers)
end end
end end