method
add_found_dependencies
v1_9_3_125 -
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 159 def add_found_dependencies to_do, dependency_list seen = {} dependencies = Hash.new { |h, name| h[name] = Gem::Dependency.new name } until to_do.empty? do spec = to_do.shift next if spec.nil? or seen[spec.name] seen[spec.name] = true deps = spec.runtime_dependencies deps |= spec.development_dependencies if @development deps.each do |dep| dependencies[dep.name] = dependencies[dep.name].merge dep results = find_gems_with_sources(dep).reverse results.reject! do |dep_spec,| to_do.push dep_spec # already locally installed Gem::Specification.any? do |installed_spec| dep.name == installed_spec.name and dep.requirement.satisfied_by? installed_spec.version end end results.each do |dep_spec, source_uri| @specs_and_sources << [dep_spec, source_uri] dependency_list.add dep_spec end end end dependency_list.remove_specs_unsatisfied_by dependencies end