method
add_found_dependencies
v2_2_9 -
Show latest stable
-
0 notes -
Class: DependencyInstaller
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
add_found_dependencies(to_do, dependency_list)
public
Hide source
# File lib/rubygems/dependency_installer.rb, line 113 def add_found_dependencies to_do, dependency_list # :nodoc: seen = {} dependencies = Hash.new { |h, name| h[name] = Gem::Dependency.new name } until to_do.empty? do spec = to_do.shift # HACK why is spec nil? next if spec.nil? or seen[spec.name] seen[spec.name] = true deps = spec.runtime_dependencies if @development if @dev_shallow if @toplevel_specs.include? spec.full_name deps |= spec.development_dependencies end else deps |= spec.development_dependencies end end deps.each do |dep| dependencies[dep.name] = dependencies[dep.name].merge dep if @minimal_deps next if Gem::Specification.any? do |installed_spec| dep.name == installed_spec.name and dep.requirement.satisfied_by? installed_spec.version end end results = find_gems_with_sources(dep) results.sorted.each do |t| to_do.push t.spec end results.remove_installed! dep @available << results results.inject_into_list dependency_list end end dependency_list.remove_specs_unsatisfied_by dependencies end