leftathome/depgraph — pull request #3 by tknerr (2013-07-15 07:34:49+00:00)
Title: Add version labels to nodes

adds a `-version` flag to the commandline parameters and, if that flag is set, shows the dependency version in addition to only the name.

Currently this is only supported for the cookbook node finder. If other node finders want to add that capability they must implement three things:

1. an [`attr_accessor :show_versions`](https://github.com/tknerr/depgraph/blob/f499b1458d64312bf85a8db58da3eff6c6c65b0d/lib/nodefinders/cookbook_node_finder.rb#L7) to turn that behaviour on/off
2. a [method](https://github.com/tknerr/depgraph/blob/f499b1458d64312bf85a8db58da3eff6c6c65b0d/lib/nodefinders/cookbook_node_finder.rb#L78-88) which reads dependency version
3. [add](https://github.com/tknerr/depgraph/blob/f499b1458d64312bf85a8db58da3eff6c6c65b0d/lib/nodefinders/cookbook_node_finder.rb#L43-45) the dependency version to the newly created node