diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-03-16 15:39:02 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-03-16 15:39:02 +0000 |
commit | 30476e39af14940cd4cf87f2941ab2879479c19a (patch) | |
tree | 4ee2f4b2eef4b7cbb2166adec0432e3f87f24054 /lib | |
parent | 0b849e8d30ee662e84f72b853820a94a60f2276b (diff) | |
parent | 31b0097be06fcbb1f1586fbf868ecb9c4bcfb1b0 (diff) | |
download | gitlab-ce-30476e39af14940cd4cf87f2941ab2879479c19a.tar.gz |
Merge branch '44126-setup-middleware-before-adapter' into 'master'
Eliminate Faraday warnings
Closes #44126
See merge request gitlab-org/gitlab-ce!17795
Diffstat (limited to 'lib')
-rw-r--r-- | lib/container_registry/client.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/container_registry/client.rb b/lib/container_registry/client.rb index c7263f302ab..010ca1ec27b 100644 --- a/lib/container_registry/client.rb +++ b/lib/container_registry/client.rb @@ -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 |