---
title: enforcer and report_card
teaser:
tags: news,web,open source
author: Nick Quaranto
published_on: 2009-07-24
---

Over the past few weeks I've been hard at work on some internal tools here at
thoughtbot, and it's due time that we brought them out for the community to
enjoy as well. Without further ado...

## enforcer

[![''](http://img.skitch.com/20090724-fhe82iytfk4g1b1qcbwh6xnejs.png)](http://github.com/thoughtbot/enforcer)

Since we've been [hiring](https://thoughtbot.com/blog/thoughtbot-is-hiring)
lately, we've had to set up new people with all of our projects on GitHub. Now
that we've got 30+ repositories, this was starting to be a pain. Now, with
enforcer, we've got a simple <abbr title="Domain Specific Language">DSL</abbr>
to manage collaborators across all of them. Here's a small example:

    Enforcer "thoughtbot", "deadbeef" do
      project "shoulda", "sseagal", "jcvandamme", "cnorris"
    end

This snippet will log in as thoughtbot using deadbeef as an <abbr
title="Application Programming Interface">API</abbr> token, and then makes sure
the three users listed are collaborators for shoulda. Anyone else that isn't in
the list given to the Enforcer is removed.

Check out more examples this, including getting all of your projects from the
GitHub's <abbr title="Application Programming Interface">API</abbr>, on [the
README](http://github.com/thoughtbot/enforcer/tree/master).

## report\_card

Back [in
May](https://thoughtbot.com/blog/internbot-chronicles-4-ci-test-metrics) I
wrote about our metrics setup that used
[metric_fu](http://metric-fu.rubyforge.org) and
[Integrity](http://integrityapp.com) to whip up plenty of stats about how
<s>bad</s> good our code is. A single script probably wasn't going to be the
best way to manage this over time, so we wanted to turn it into a real, tested
library so we could trust in it and allow the community to use it with
confidence as well.

[![''](http://img.skitch.com/20090724-c27n3n8i232chcwujsdxt7d5ft.png)](http://metrics.thoughtbot.com)

Feel free to browse around [our metrics site](http://metrics.thoughtbot.com) to
see how it looks. report\_card manages generating metric\_fu sites for each
project in Integrity along with creating the nice <abbr title="HyperText Markup
Language">HTML</abbr> front page and notifying Campfire of the difference in
scores for each metric. Currently, we grade our projects every weekday morning
so we can get a fresh look at the code coverage, smells, flog/flay scores, and
more as the day starts. With the latest version of metric\_fu we get graphs now
too:

[![''](http://img.skitch.com/20090724-bf3bkfn8sirjtfmtd8hui37rkr.png)](http://metrics.thoughtbot.com/paperclip/output/reek.html)

There's plenty of information about how to install and configure your very own
report\_card [on GitHub](http://github.com/thoughtbot/report_card).

Visit our [Open Source page](https://thoughtbot.com/open-source) to learn more about our team's contributions.
