The DependencyCollector tests are really integration tests, while the
rest are closer to real unit tests. Split them up so that the tests can
be run in isolation on a per-class basis.
It is important that dep equality corresponds to the name attribute, but
we may want to use the Comparable interface to sort them by installation
order in the future. Code that needs to sort them alphabetically should
just use sort_by.
Inheriting from Array (and other core types) is problematic:
- It exposes a very wide interface with many methods that are not
really relevant to the subclass.
- It can cause some weird side effects, as many Array operations are
in C and have hardcoded return values; for example, combining two
array subclasses returns a new Array instead of the subclass.
Avoid these problems using delegation and the Enumerable module where
applicable.
To allow
depends_on :x11 => :optional
and friends to work as expected, make requirements record any tags and
add special handling to the X11Dependency to record both a minimum
version and additional tags.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>