Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve documentation of DependencyInstaller

  • Loading branch information...
commit 4e7f0bc779d2a53dae5c5b9a8511c5ce4ec7a575 1 parent 4cee7ab
@drbrain drbrain authored
Showing with 22 additions and 9 deletions.
  1. +22 −9 lib/rubygems/dependency_installer.rb
View
31 lib/rubygems/dependency_installer.rb
@@ -16,7 +16,7 @@ class Gem::DependencyInstaller
include Gem::UserInteraction
- DEFAULT_OPTIONS = {
+ DEFAULT_OPTIONS = { # :nodoc:
:env_shebang => false,
:document => %w[ri],
:domain => :both, # HACK dup
@@ -35,9 +35,19 @@ class Gem::DependencyInstaller
attr_reader :document
+ ##
+ # Errors from SpecFetcher while searching for remote specifications
+
attr_reader :errors
- attr_reader :gems_to_install
+ ##
+ #--
+ # TODO remove, no longer used
+
+ attr_reader :gems_to_install # :nodoc:
+
+ ##
+ # List of gems installed by #install in alphabetic order
attr_reader :installed_gems
@@ -98,13 +108,14 @@ def initialize options = {}
@cache_dir = options[:cache_dir] || @install_dir
- # Set with any errors that SpecFetcher finds while search through
- # gemspecs for a dep
@errors = nil
end
+ ##
+ #--
+ # TODO remove, no longer used
- def add_found_dependencies to_do, dependency_list
+ def add_found_dependencies to_do, dependency_list # :nodoc:
seen = {}
dependencies = Hash.new { |h, name| h[name] = Gem::Dependency.new name }
@@ -190,7 +201,7 @@ def consider_remote?
# sources. Gems are sorted with newer gems preferred over older gems, and
# local gems preferred over remote gems.
- def find_gems_with_sources dep
+ def find_gems_with_sources dep # :nodoc:
set = Gem::AvailableSet.new
if consider_local?
@@ -273,8 +284,10 @@ def find_spec_by_name_and_version gem_name,
##
# Gathers all dependencies necessary for the installation from local and
# remote sources unless the ignore_dependencies was given.
+ #--
+ # TODO remove, no longer used
- def gather_dependencies
+ def gather_dependencies # :nodoc:
specs = @available.all_specs
# these gems were listed by the user, always install them
@@ -306,7 +319,7 @@ def gather_dependencies
@gems_to_install = dependency_list.dependency_order.reverse
end
- def in_background what
+ def in_background what # :nodoc:
fork_happened = false
if @build_docs_in_background and Process.respond_to?(:fork)
begin
@@ -371,7 +384,7 @@ def install dep_or_name, version = Gem::Requirement.default
@installed_gems
end
- def install_development_deps
+ def install_development_deps # :nodoc:
if @development and @dev_shallow then
:shallow
elsif @development then
Please sign in to comment.
Something went wrong with that request. Please try again.