diff options
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/bundler.gemspec | 9 | ||||
-rw-r--r-- | lib/bundler/gem_helper.rb | 12 | ||||
-rw-r--r-- | lib/bundler/shared_helpers.rb | 2 |
3 files changed, 10 insertions, 13 deletions
diff --git a/lib/bundler/bundler.gemspec b/lib/bundler/bundler.gemspec index 50be960cab..30a21f155f 100644 --- a/lib/bundler/bundler.gemspec +++ b/lib/bundler/bundler.gemspec @@ -34,14 +34,11 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 2.3.0" s.required_rubygems_version = ">= 2.5.2" - # s.files = Dir.glob("{lib,man,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) } + s.files = (Dir.glob("lib/bundler/**/*", File::FNM_DOTMATCH) + Dir.glob("man/bundler*") + Dir.glob("libexec/bundle*")).reject {|f| File.directory?(f) } - # Include the CHANGELOG.md, LICENSE.md, README.md manually - # s.files += %w[CHANGELOG.md LICENSE.md README.md] - # include the gemspec itself because warbler breaks w/o it - s.files += %w[bundler.gemspec] + s.files += ["lib/bundler.rb"] - s.bindir = "exe" + s.bindir = "libexec" s.executables = %w[bundle bundler] s.require_paths = ["lib"] end diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index 68f5e636ff..d00c1894a8 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -75,8 +75,8 @@ module Bundler def build_gem file_name = nil - gem = ENV["BUNDLE_GEM"] ? ENV["BUNDLE_GEM"] : "gem" - sh(%W[#{gem} build -V #{spec_path}]) do + gem = ENV["GEM_COMMAND"] ? ENV["GEM_COMMAND"] : "gem" + sh("#{gem} build -V #{spec_path}".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") @@ -87,10 +87,10 @@ module Bundler def install_gem(built_gem_path = nil, local = false) built_gem_path ||= build_gem - gem = ENV["BUNDLE_GEM"] ? ENV["BUNDLE_GEM"] : "gem" - cmd = %W[#{gem} install #{built_gem_path}] - cmd << "--local" if local - out, status = sh_with_status(cmd) + gem = ENV["GEM_COMMAND"] ? ENV["GEM_COMMAND"] : "gem" + cmd = "#{gem} install #{built_gem_path}" + cmd += " --local" if local + out, status = sh_with_status(cmd.shellsplit) unless status.success? && out[/Successfully installed/] raise "Couldn't install gem, run `gem install #{built_gem_path}' for more detailed output" end diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index a9bfd57fae..e6e2b79344 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -268,7 +268,7 @@ module Bundler until !File.directory?(current) || current == previous if ENV["BUNDLE_SPEC_RUN"] # avoid stepping above the tmp directory when testing - gemspec = if ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"] + gemspec = if ENV["GEM_COMMAND"] # for Ruby Core "lib/bundler/bundler.gemspec" else |