ędepend
Mind that this Gem is experimental, a work in progress. If you happen to encounter bugs or like to discuss the output or it's use cases, please open an issue in the issue tracker.
It generates a graph visualization of the dependencies in your codebase.
A lot of incoming links is good, as it is a sign of code re-use and DRY code. A lot of outgoing links is bad, as that is a sign of a lot of dependencies.
See http://www.whiteboxtest.com/information-flow-metrics.php
Installation
This Gem depends on Graphviz, http://www.graphviz.org/
Add this line to your application's Gemfile:
gem 'rdepend'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rdepend
Usage
Rdepend.with_trace do
# your code
end
or
Rdepend.trace
# your code
Don't even think about using this Gem in a production environment. You can use it in your integration test suite for instance. But don't use it in a test environment where you use stubs, mocks and doubles etc.
Oh, and it can take a very long time, even on a simple Rails project.
Contributing
- Fork it ( https://github.com/suhrawardi/rdepend/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request