Skip to content
This repository
Browse code

Improve documentation of DependencyInstaller

  • Loading branch information...
commit 4e7f0bc779d2a53dae5c5b9a8511c5ce4ec7a575 1 parent 4cee7ab
Eric Hodel drbrain authored

Showing 1 changed file with 22 additions and 9 deletions. Show diff stats Hide diff stats

  1. +22 9 lib/rubygems/dependency_installer.rb
31 lib/rubygems/dependency_installer.rb
@@ -16,7 +16,7 @@ class Gem::DependencyInstaller
16 16
17 17 include Gem::UserInteraction
18 18
19   - DEFAULT_OPTIONS = {
  19 + DEFAULT_OPTIONS = { # :nodoc:
20 20 :env_shebang => false,
21 21 :document => %w[ri],
22 22 :domain => :both, # HACK dup
@@ -35,9 +35,19 @@ class Gem::DependencyInstaller
35 35
36 36 attr_reader :document
37 37
  38 + ##
  39 + # Errors from SpecFetcher while searching for remote specifications
  40 +
38 41 attr_reader :errors
39 42
40   - attr_reader :gems_to_install
  43 + ##
  44 + #--
  45 + # TODO remove, no longer used
  46 +
  47 + attr_reader :gems_to_install # :nodoc:
  48 +
  49 + ##
  50 + # List of gems installed by #install in alphabetic order
41 51
42 52 attr_reader :installed_gems
43 53
@@ -98,13 +108,14 @@ def initialize options = {}
98 108
99 109 @cache_dir = options[:cache_dir] || @install_dir
100 110
101   - # Set with any errors that SpecFetcher finds while search through
102   - # gemspecs for a dep
103 111 @errors = nil
104 112 end
105 113
  114 + ##
  115 + #--
  116 + # TODO remove, no longer used
106 117
107   - def add_found_dependencies to_do, dependency_list
  118 + def add_found_dependencies to_do, dependency_list # :nodoc:
108 119 seen = {}
109 120 dependencies = Hash.new { |h, name| h[name] = Gem::Dependency.new name }
110 121
@@ -190,7 +201,7 @@ def consider_remote?
190 201 # sources. Gems are sorted with newer gems preferred over older gems, and
191 202 # local gems preferred over remote gems.
192 203
193   - def find_gems_with_sources dep
  204 + def find_gems_with_sources dep # :nodoc:
194 205 set = Gem::AvailableSet.new
195 206
196 207 if consider_local?
@@ -273,8 +284,10 @@ def find_spec_by_name_and_version gem_name,
273 284 ##
274 285 # Gathers all dependencies necessary for the installation from local and
275 286 # remote sources unless the ignore_dependencies was given.
  287 + #--
  288 + # TODO remove, no longer used
276 289
277   - def gather_dependencies
  290 + def gather_dependencies # :nodoc:
278 291 specs = @available.all_specs
279 292
280 293 # these gems were listed by the user, always install them
@@ -306,7 +319,7 @@ def gather_dependencies
306 319 @gems_to_install = dependency_list.dependency_order.reverse
307 320 end
308 321
309   - def in_background what
  322 + def in_background what # :nodoc:
310 323 fork_happened = false
311 324 if @build_docs_in_background and Process.respond_to?(:fork)
312 325 begin
@@ -371,7 +384,7 @@ def install dep_or_name, version = Gem::Requirement.default
371 384 @installed_gems
372 385 end
373 386
374   - def install_development_deps
  387 + def install_development_deps # :nodoc:
375 388 if @development and @dev_shallow then
376 389 :shallow
377 390 elsif @development then

0 comments on commit 4e7f0bc

Please sign in to comment.
Something went wrong with that request. Please try again.