summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorEdouard CHIN <chin.edouard@gmail.com>2025-04-09 23:50:58 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-04-22 11:27:23 +0900
commitcba7408017e51e6ef119964f1b408e4938c8a2a4 (patch)
treec42796a0b2edfb8a9b01712cd37e8384ba4d12b7 /libexec
parentae308ae523a0af0e5566fff741395e48e5e877a2 (diff)
[rubygems/rubygems] Diagnose the bundler connection
https://github.com/rubygems/rubygems/commit/0aae094c89
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ssl_check.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/libexec/ssl_check.rb b/libexec/ssl_check.rb
index e4bfcb66cb..1066e1f29b 100644
--- a/libexec/ssl_check.rb
+++ b/libexec/ssl_check.rb
@@ -15,8 +15,6 @@ begin
rescue LoadError
end
-uri = URI("https://#{host}")
-
if defined?(RUBY_DESCRIPTION)
ruby_version = RUBY_DESCRIPTION
else
@@ -45,30 +43,6 @@ def show_ssl_certs
puts
end
-def error_reason(error)
- case error.message
- when /certificate verify failed/
- "certificate verification"
- when /read server hello A/
- "SSL/TLS protocol version mismatch"
- when /tlsv1 alert protocol version/
- "requested TLS version is too old"
- else
- error.message
- end
-end
-
-puts "Trying connections to #{uri.to_s}:"
-puts
-begin
- b_uri = defined?(Bundler::URI) ? Bundler::URI(uri.to_s) : uri
- Bundler::Fetcher.new(Bundler::Source::Rubygems::Remote.new(b_uri)).send(:connection).request(b_uri)
- bundler_status = "✅ success"
-rescue => error
- bundler_status = "❌ failed (#{error_reason(error)})"
-end
-puts "Bundler: #{bundler_status}"
-
begin
require 'rubygems/remote_fetcher'
Gem::RemoteFetcher.fetcher.fetch_path(uri)