Metric Fu is Now a Gem

I just released version 0.7.6 of metric_fu and there's all sorts of new stuff:

First, MetricFu is now a Ruby gem on GitHub at:
http://github.com/jscruggs/metric_fu

Also, the Flog task can now flog any set of directories you like. Just put this into your Rakefile:

MetricFu::DIRECTORIES_TO_FLOG = ['cms/app', 'cms/lib']

And, the Flog reports are much nicer:


The Flog report generator now looks at a MD5 hash of the files its examining to determine if they files need to be re-Flogged -- which saves time.

The Saikuro report generator can also look at custom directories like so:

MetricFu::SAIKURO_OPTIONS = {"--input_directory" => '"cms/app | cms/lib"'}


MetricFu started its life as a Rails Plugin, but I'm trying to turn it into a flexible gem that can be used in any Ruby application (but still have defaults that enable easy use in a Rails project). Eventually I'd like to create something that could tell you about methods that have high complexity (Flog and Saikuro scores) but low test coverage. But that's going to be a challenge. Feel free to help, if you like.

I'd like to thank Sean Soper for contributing a ton of work to this project. He's responsible for the gemification, the new Flog reports, and the MD5 hashing. And David Chelimsky was nice enough to come over and personally show me around git and GitHub.

Try it out with:
sudo gem install jscruggs-metric_fu -s http://gems.github.com

Comments

Sean said…
great work jake! i will shamelessly plug this wherever the opportunity arises.

what else is on your todo list with this gem?
Jake Scruggs said…
Check out the TODO file in the source (I've added a bit to the list you started). Currently it reads:

* Sort Flog scores from worst to best
* Color code flog results with scale from: http://jakescruggs.blogspot.com/2008/08/whats-good-flog-score.html
* Get churn to work with git
* Extract functionality from rake files and put under test
* Change churn start_date to not rely on Rails 1.day.ago functionality (so metric_fu can be used in non-Rails apps)
* Make integration with RSpec better (use SpecTask?)
* Integrate Flog, Saikuro, and Coverage into one report so you can see methods that have high complexity and low coverage (this is a big one)
* Integrate MD5 hashing with remainder of reports

Popular posts from this blog

What's a Good Flog Score?

SICP Wasn’t Written for You

Point Inside a Polygon in Ruby