summaryrefslogtreecommitdiff
path: root/lib/rubygems/dependency_installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/dependency_installer.rb')
-rw-r--r--lib/rubygems/dependency_installer.rb34
1 files changed, 19 insertions, 15 deletions
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index 8406844e79..9ae2659536 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -38,9 +38,17 @@ class Gem::DependencyInstaller
# :ignore_dependencies:: Don't install any dependencies.
# :install_dir:: See Gem::Installer#install.
# :security_policy:: See Gem::Installer::new and Gem::Security.
+ # :user_install:: See Gem::Installer.new
# :wrappers:: See Gem::Installer::new
def initialize(options = {})
+ if options[:install_dir] then
+ spec_dir = options[:install_dir], 'specifications'
+ @source_index = Gem::SourceIndex.from_gems_in spec_dir
+ else
+ @source_index = Gem.source_index
+ end
+
options = DEFAULT_OPTIONS.merge options
@bin_dir = options[:bin_dir]
@@ -51,19 +59,13 @@ class Gem::DependencyInstaller
@format_executable = options[:format_executable]
@ignore_dependencies = options[:ignore_dependencies]
@security_policy = options[:security_policy]
+ @user_install = options[:user_install]
@wrappers = options[:wrappers]
@installed_gems = []
@install_dir = options[:install_dir] || Gem.dir
@cache_dir = options[:cache_dir] || @install_dir
-
- if options[:install_dir] then
- spec_dir = File.join @install_dir, 'specifications'
- @source_index = Gem::SourceIndex.from_gems_in spec_dir
- else
- @source_index = Gem.source_index
- end
end
##
@@ -232,15 +234,17 @@ class Gem::DependencyInstaller
end
inst = Gem::Installer.new local_gem_path,
- :env_shebang => @env_shebang,
- :force => @force,
- :format_executable => @format_executable,
+ :bin_dir => @bin_dir,
+ :development => @development,
+ :env_shebang => @env_shebang,
+ :force => @force,
+ :format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
- :install_dir => @install_dir,
- :security_policy => @security_policy,
- :wrappers => @wrappers,
- :bin_dir => @bin_dir,
- :development => @development
+ :install_dir => @install_dir,
+ :security_policy => @security_policy,
+ :source_index => @source_index,
+ :user_install => @user_install,
+ :wrappers => @wrappers
spec = inst.install