summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-01-08 16:11:52 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2020-01-08 18:00:32 +0900
commit13f4f07f215ca66cc727c75e0c3d77389c261e14 (patch)
treeebc5d3ad100f4e48773757460ddee256f0035fcb /lib
parentf518b608d64d08024139e8259f5c7b77e630bfff (diff)
Merge bundler-2.1.4
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2822
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/install.rb5
-rw-r--r--lib/bundler/gem_helper.rb5
-rw-r--r--lib/bundler/inline.rb2
-rw-r--r--lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb22
-rw-r--r--lib/bundler/version.rb2
5 files changed, 7 insertions, 29 deletions
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'
##
@@ -774,23 +769,6 @@ class Bundler::Persistent::Net::HTTP::Persistent
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 <tt>net-http-pipeline</tt> was required before
- # <tt>net-http-persistent</tt> #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
def private_key= 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