Class | Gem::DependencyList
In: | lib/rubygems/dependency_list.rb
Parent: | Object

### Methods

add dependency_order find_name from_source_index new ok? ok_to_remove? remove_by_name spec_predecessors tsort_each_child tsort_each_node

### Included Modules

TSort

### Public Class methods

from_source_index(src_index)
new()

### Public Instance methods

add(*gemspecs)

Adds `gemspecs` to the dependency list.

dependency_order()

Return a list of the specifications in the dependency list, sorted in order so that no spec in the list depends on a gem earlier in the list.

This is useful when removing gems from a set of installed gems. By removing them in the returned order, you don‘t get into as many dependency issues.

If there are circular dependencies (yuck!), then gems will be returned in order until only the circular dependents and anything they reference are left. Then arbitrary gemspecs will be returned until the circular dependency is broken, after which gems will be returned in dependency order again.

find_name(full_name)
ok?()

Are all the dependencies in the list satisfied?

ok_to_remove?(full_name)

Is is ok to remove a gem from the dependency list?

If removing the gemspec creates breaks a currently ok dependency, then it is NOT ok to remove the gem.

remove_by_name(full_name)
spec_predecessors()

Return a hash of predecessors. `result[spec]` is an Array of gemspecs that have a dependency satisfied by the named spec.

tsort_each_child(node) {|spec| ...}
tsort_each_node(&block)

[Validate]