summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher.rb
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-03-14 09:35:16 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-03-14 09:35:16 +0900
commit8d67130757841916486b47a0cf914af8dc3f1f4c (patch)
tree50d1772c003ca34f2bf202d68d4bac35bfd2abed /lib/bundler/fetcher.rb
parentdaac5198330e960ea8f4747f00ba9be00fcff71d (diff)
downloadbundler-8d67130757841916486b47a0cf914af8dc3f1f4c.tar.gz
Unify the certificates for rubygems.org to rubygems store.
* Removed CertificateManager and related rake tasks. * Removed the certificates from bundler internal.
Diffstat (limited to 'lib/bundler/fetcher.rb')
-rw-r--r--lib/bundler/fetcher.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 272aac6882..808404f858 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -2,6 +2,7 @@
require "bundler/vendored_persistent"
require "cgi"
+require "rbconfig"
require "securerandom"
require "zlib"
@@ -295,7 +296,13 @@ module Bundler
end
else
store.set_default_paths
- certs = File.expand_path("../ssl_certs/*/*.pem", __FILE__)
+
+ rubygems_certs_dir = File.expand_path("../../rubygems/ssl_certs", __FILE__)
+ unless File.exists?(rubygems_certs_dir)
+ rubygems_certs_dir = File.join(RbConfig::CONFIG["rubylibdir"], "rubygems", "ssl_certs")
+ end
+ certs = File.join(rubygems_certs_dir, "*", "*.pem")
+
Dir.glob(certs).each {|c| store.add_file c }
end
store