From 13f4f07f215ca66cc727c75e0c3d77389c261e14 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 8 Jan 2020 16:11:52 +0900 Subject: Merge bundler-2.1.4 --- lib/bundler/cli/install.rb | 5 +++-- lib/bundler/gem_helper.rb | 5 ++--- lib/bundler/inline.rb | 2 +- .../net-http-persistent/lib/net/http/persistent.rb | 22 ---------------------- lib/bundler/version.rb | 2 +- 5 files changed, 7 insertions(+), 29 deletions(-) (limited to 'lib/bundler') diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index d823fb632f..ecd474971d 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -38,7 +38,8 @@ module Bundler if Bundler.feature_flag.deployment_means_frozen? Bundler.settings.set_command_option :deployment, true else - Bundler.settings.set_command_option :frozen, true + Bundler.settings.set_command_option :deployment, true if options[:deployment] + Bundler.settings.set_command_option :frozen, true if options[:frozen] end end @@ -169,7 +170,7 @@ module Bundler def normalize_settings Bundler.settings.set_command_option :path, nil if options[:system] Bundler.settings.temporary(:path_relative_to_cwd => false) do - Bundler.settings.set_command_option :path, "vendor/bundle" if options[:deployment] + Bundler.settings.set_command_option :path, "vendor/bundle" if Bundler.settings[:deployment] && Bundler.settings[:path].nil? end Bundler.settings.set_command_option_if_given :path, options[:path] Bundler.settings.temporary(:path_relative_to_cwd => false) do diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 7d4e382be8..204dd24052 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -73,7 +73,7 @@ module Bundler def build_gem file_name = nil - sh("#{gem_command} build -V #{spec_path}".shellsplit) do + sh("#{gem_command} build -V #{spec_path.shellescape}".shellsplit) do file_name = File.basename(built_gem_path) SharedHelpers.filesystem_access(File.join(base, "pkg")) {|p| FileUtils.mkdir_p(p) } FileUtils.mv(built_gem_path, "pkg") @@ -130,9 +130,8 @@ module Bundler def perform_git_push(options = "") cmd = "git push #{options}" - out, status = sh_with_status(cmd) + out, status = sh_with_status(cmd.shellsplit) return if status.success? - cmd = cmd.shelljoin if cmd.respond_to?(:shelljoin) raise "Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n" end diff --git a/lib/bundler/inline.rb b/lib/bundler/inline.rb index 5b2ddb7db6..f1f77a7a9c 100644 --- a/lib/bundler/inline.rb +++ b/lib/bundler/inline.rb @@ -78,7 +78,7 @@ def gemfile(install = false, options = {}, &gemfile) if old_gemfile ENV["BUNDLE_GEMFILE"] = old_gemfile else - ENV.delete("BUNDLE_GEMFILE") + ENV["BUNDLE_GEMFILE"] = "" end end end diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb index e9c4c3e89e..f9d1401062 100644 --- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb @@ -3,11 +3,6 @@ require_relative '../../../../uri/lib/uri' require 'cgi' # for escaping require_relative '../../../../connection_pool/lib/connection_pool' -begin - require 'net/http/pipeline' -rescue LoadError -end - autoload :OpenSSL, 'openssl' ## @@ -773,23 +768,6 @@ class Bundler::Persistent::Net::HTTP::Persistent (uri =~ /^https?:/) ? uri : "http://#{uri}" end - ## - # Pipelines +requests+ to the HTTP server at +uri+ yielding responses if a - # block is given. Returns all responses received. - # - # See - # Net::HTTP::Pipeline[http://docs.seattlerb.org/net-http-pipeline/Net/HTTP/Pipeline.html] - # for further details. - # - # Only if net-http-pipeline was required before - # net-http-persistent #pipeline will be present. - - def pipeline uri, requests, &block # :yields: responses - connection_for uri do |connection| - connection.http.pipeline requests, &block - end - end - ## # Sets this client's SSL private key diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb index b63e39b8d2..85704816e4 100644 --- a/lib/bundler/version.rb +++ b/lib/bundler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false module Bundler - VERSION = "2.1.2".freeze + VERSION = "2.1.4".freeze def self.bundler_major_version @bundler_major_version ||= VERSION.split(".").first.to_i -- cgit v1.2.3