diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 10:13:50 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-25 10:13:50 +0000 |
commit | d478c7a7342478847cc1148f4134b5f0db04e1d9 (patch) | |
tree | 3bfca425683a94d1360ecdf5857d741b8eaac213 /lib/rubygems/dependency_installer.rb | |
parent | 788001a9c8473130bd357846785838045387b060 (diff) | |
download | ruby-d478c7a7342478847cc1148f4134b5f0db04e1d9.tar.gz |
Update to RubyGems 1.3.0 r1891
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/dependency_installer.rb')
-rw-r--r-- | lib/rubygems/dependency_installer.rb | 34 |
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 |