9 Commits

Author SHA1 Message Date
Jack Nagel
0b2c6e87f1 Implement equality for Dependencies collections 2014-02-13 16:31:12 -05:00
Jack Nagel
2d93935e6a Add type accessors to Dependencies 2013-05-10 23:45:06 -05:00
Jack Nagel
adf90691f1 Split dependency classes into separate files 2013-01-26 20:30:05 -06:00
Jack Nagel
8d03c760c2 Fix Dependencies -> Array conversion 2013-01-26 12:14:51 -06:00
Jack Nagel
fe4f39dcee Split up dependency test coverage
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.
2013-01-13 21:01:15 -06:00
Jack Nagel
e629f14d56 Remove <=> from Dependency interface
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.
2013-01-13 21:01:15 -06:00
Jack Nagel
900a5fec2d Beef up deps tests 2013-01-12 21:20:46 -06:00
Jack Nagel
429caf69a9 Remove Array subclassing
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.
2013-01-07 14:32:14 -06:00
Jack Nagel
d1f754c02e Allow requirements to record tags
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>
2012-10-25 14:28:53 -05:00