summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/pristine_command.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
commitc00e84327f14845bd484e76b5ee5dfeb1fa9ce3d (patch)
tree9f558dafa363f4f0118d504a50cd4461e2821cd1 /lib/rubygems/commands/pristine_command.rb
parent6b05153a3a75b74b64553d6a46f501d9ee0f0376 (diff)
Merge rubygems master.
This is RC version of Rubygems 2.7.0. https://github.com/rubygems/rubygems/commit/688fb7e83c13c3fe7c2bb03c49a2db4c82852aee git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/pristine_command.rb')
-rw-r--r--lib/rubygems/commands/pristine_command.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb
index 6cab572b86..408672158f 100644
--- a/lib/rubygems/commands/pristine_command.rb
+++ b/lib/rubygems/commands/pristine_command.rb
@@ -125,14 +125,14 @@ extensions will be restored.
next
end
- unless spec.extensions.empty? or options[:extensions] then
+ unless spec.extensions.empty? or options[:extensions] or options[:only_executables] then
say "Skipped #{spec.full_name}, it needs to compile an extension"
next
end
gem = spec.cache_file
- unless File.exist? gem then
+ unless File.exist? gem or options[:only_executables] then
require 'rubygems/remote_fetcher'
say "Cached gem for #{spec.full_name} not found, attempting to fetch..."
@@ -157,16 +157,19 @@ extensions will be restored.
install_defaults.to_s['--env-shebang']
end
- installer = Gem::Installer.at(gem,
- :wrappers => true,
- :force => true,
- :install_dir => spec.base_dir,
- :env_shebang => env_shebang,
- :build_args => spec.build_args)
-
+ installer_options = {
+ :wrappers => true,
+ :force => true,
+ :install_dir => spec.base_dir,
+ :env_shebang => env_shebang,
+ :build_args => spec.build_args,
+ }
+
if options[:only_executables] then
+ installer = Gem::Installer.for_spec(spec, installer_options)
installer.generate_bin
else
+ installer = Gem::Installer.at(gem, installer_options)
installer.install
end