lib/bundler/rubygems_integration.rb in bundler-2.3.6 vs lib/bundler/rubygems_integration.rb in bundler-2.3.7

- old
+ new

@@ -102,22 +102,10 @@ def path(obj) obj.to_s end - def configuration - require_relative "psyched_yaml" - Gem.configuration - rescue Gem::SystemExitException, LoadError => e - Bundler.ui.error "#{e.class}: #{e.message}" - Bundler.ui.trace e - raise - rescue ::Psych::SyntaxError => e - raise YamlSyntaxError.new(e, "Your RubyGems configuration, which is " \ - "usually located in ~/.gemrc, contains invalid YAML syntax.") - end - def ruby_engine Gem.ruby_engine end def read_binary(path) @@ -215,11 +203,11 @@ EXT_LOCK end def spec_from_gem(path, policy = nil) require "rubygems/security" - require_relative "psyched_yaml" + require "psych" gem_from_path(path, security_policies[policy]).spec rescue Exception, Gem::Exception, Gem::Security::Exception => e # rubocop:disable Lint/RescueException if e.is_a?(Gem::Security::Exception) || e.message =~ /unknown trust policy|unsigned gem/i || e.message =~ /couldn't verify (meta)?data signature/i @@ -520,10 +508,10 @@ raise Bundler::HTTPError, "Could not download gem from #{uri} due to underlying error <#{e.message}>" end def gem_remote_fetcher require "rubygems/remote_fetcher" - proxy = configuration[:http_proxy] + proxy = Gem.configuration[:http_proxy] Gem::RemoteFetcher.new(proxy) end def gem_from_path(path, policy = nil) require "rubygems/package"