Kevin and I have both built code quality tools for Ruby already (Reek and Roodi respectively), so I pinged him to suggest we could have a go. The CRAP (Change Risk Analysis and Predictions) metric is a function of cyclomatic complexity and coverage. I already knew how to calculate cyclomatic complexity from Roodi, and Rcov was an obvious choice to get coverage information from.

After a couple of hours, we came up with crap4r. It's pretty rough, but it basically works. Here's what it looks like: