Skip to content

Commit 57e8ae7

Browse files
Move HTTP_ERRORS together with the other error constants
1 parent d84b29b commit 57e8ae7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bundler/lib/bundler/fetcher.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ def initialize(remote_uri)
7272
end
7373
end
7474

75+
HTTP_ERRORS = [
76+
Gem::Timeout::Error, EOFError, SocketError, Errno::ENETDOWN, Errno::ENETUNREACH,
77+
Errno::EINVAL, Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EAGAIN,
78+
Gem::Net::HTTPBadResponse, Gem::Net::HTTPHeaderSyntaxError, Gem::Net::ProtocolError,
79+
Gem::Net::HTTP::Persistent::Error, Zlib::BufError, Errno::EHOSTUNREACH
80+
].freeze
81+
7582
# Exceptions classes that should bypass retry attempts. If your password didn't work the
7683
# first time, it's not going to the third time.
7784
NET_ERRORS = [:HTTPBadGateway, :HTTPBadRequest, :HTTPFailedDependency,
@@ -293,13 +300,6 @@ def gemspec_cached_path(spec_file_name)
293300
paths.find {|path| File.file? path }
294301
end
295302

296-
HTTP_ERRORS = [
297-
Gem::Timeout::Error, EOFError, SocketError, Errno::ENETDOWN, Errno::ENETUNREACH,
298-
Errno::EINVAL, Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EAGAIN,
299-
Gem::Net::HTTPBadResponse, Gem::Net::HTTPHeaderSyntaxError, Gem::Net::ProtocolError,
300-
Gem::Net::HTTP::Persistent::Error, Zlib::BufError, Errno::EHOSTUNREACH
301-
].freeze
302-
303303
def bundler_cert_store
304304
store = OpenSSL::X509::Store.new
305305
ssl_ca_cert = Bundler.settings[:ssl_ca_cert] ||

0 commit comments

Comments
 (0)