Introducing a new gem I released called metrical. It executes MetricFu separate from your project's dependencies.

This article is quite old.Time flies when you're having fun. I've been writing for my blog for a long time. Stuff changes fast, especially in the Ruby world. That's why I've put this warning on old posts. The article might still be valid, though.

Easier MetricFu with Metrical

TL;DR: I've just released metrical. It is a tiny wrapper around metric_fu.

MetricFu is awesome. It helps me keep my code clean by identifying problem spots in my code. Unfortunately, it's difficult to get running. MetricFu requires to be run with Rake. But by doing that, it becomes part of your project's dependencies. Especially if you're using Bundler.

Enter Metrical

Metrical is a wrapper around MetricFu, that allows it to be run as an executable on any project. Just install it, and run it. No setup or adjustments to your project should be required. It's that easy!

cd /path/to/project/
gem install metrical
metrical

If you want to configure MetricFu, you can add a file called .metrics, in which you can add your regular configuration. For all configuration options, you can visit the MetricFu homepage. All I've done is add a small tweak to the rcov options, so it'll run RSpec without problems.

So, give it a spin and tell me what you think of it!

comments powered byDisqus