opscode/supermarket — pull request #696 by bcobb (2014-07-30 21:24:46+00:00)
Title: Refactor Curry::PullRequestAnnotator

:construction:

The diff stat looks scary but that's due to the myriad cassette changes. The idea is to take Curry's PR annotation logic and break it into three phases:

1. Analysis (what is the state of the world?)
2. Decision (how should Curry react to the state of the world?)
3. Execution (carry out those reactions)

One reason we might want to make these phases distinct is so that we can test them independently. This will be especially handy for exhaustively testing how Curry makes decisions without leaning on VCR and brittle assumptions about hard-coded GitHub repos.

Right now, the Decision and Execution phases are still coupled at the end of `Curry::PullRequestAnnotator#annotate`. If this approach looks good (cc: @brettchalupa @tristanoneil @raskchanky) I'll make the change to decouple them, and then split up the annotator tests to take advantage of the separation, leaving a few smoke tests behind for good measure.