mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Simplify and remove some unused code
When `install_with_build_args` was added inbe96283985
, there were two versions of the method: the default version in the base class that still used the locking `with_build_args`, and an override in the `Future` class (for Rubygems 2.0 and up) that yielded without calling `with_build_args`. The `with_build_args` version of the method was removed in8a5b71e3e8
while removing a bunch of the old Rubygems compatibility code. This commit removes `with_build_args`, since it no longer appears to be used (the build args are passed as a keyword argument to `spec.source.install` instead, sincebe96283985
). The commit also removes `install_with_build_args` and the conditional around it, since the method wasn't doing anything different than `install`, and it had a comment that was no longer accurate. https://github.com/rubygems/rubygems/commit/ba543a60eb
This commit is contained in:
parent
a1c4cab11d
commit
7394514bde
2 changed files with 1 additions and 22 deletions
|
@ -13,7 +13,7 @@ module Bundler
|
|||
end
|
||||
|
||||
def install_from_spec
|
||||
post_install_message = spec_settings ? install_with_settings : install
|
||||
post_install_message = install
|
||||
Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
|
||||
generate_executable_stubs
|
||||
return true, post_install_message
|
||||
|
@ -54,11 +54,6 @@ module Bundler
|
|||
spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => Array(spec_settings))
|
||||
end
|
||||
|
||||
def install_with_settings
|
||||
# Build arguments are global, so this is mutexed
|
||||
Bundler.rubygems.install_with_build_args([spec_settings]) { install }
|
||||
end
|
||||
|
||||
def out_of_space_message
|
||||
"#{install_error_message}\nYour disk is out of space. Free some space to be able to install your bundle."
|
||||
end
|
||||
|
|
|
@ -232,18 +232,6 @@ module Bundler
|
|||
EXT_LOCK
|
||||
end
|
||||
|
||||
def with_build_args(args)
|
||||
ext_lock.synchronize do
|
||||
old_args = build_args
|
||||
begin
|
||||
self.build_args = args
|
||||
yield
|
||||
ensure
|
||||
self.build_args = old_args
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def spec_from_gem(path, policy = nil)
|
||||
require "rubygems/security"
|
||||
require_relative "psyched_yaml"
|
||||
|
@ -550,10 +538,6 @@ module Bundler
|
|||
Gem::REPOSITORY_SUBDIRECTORIES
|
||||
end
|
||||
|
||||
def install_with_build_args(args)
|
||||
yield
|
||||
end
|
||||
|
||||
def path_separator
|
||||
Gem.path_separator
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue