Commit 31b0097b authored by Lin Jen-Shin's avatar Lin Jen-Shin

Setup Faraday middleware before adapter

This eliminate the warnings:

WARNING: Unexpected middleware set after the adapter. This won't be supported from Faraday 1.0.
parent a63d7470
No related merge requests found
......@@ -52,6 +52,8 @@ module ContainerRegistry
conn.request(:authorization, :bearer, options[:token].to_s)
end
yield(conn) if block_given?
conn.adapter :net_http
end
......@@ -80,8 +82,7 @@ module ContainerRegistry
def faraday
@faraday ||= Faraday.new(@base_uri) do |conn|
initialize_connection(conn, @options)
accept_manifest(conn)
initialize_connection(conn, @options, &method(:accept_manifest))
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment