middleman/middleman — pull request #1319 by tdreyno (2014-07-08 17:17:41+00:00)
Title: Separate Build from Thor

Finally, abstracted Builder from Thor.

Now, `Builder` take an `Application` and does all the work itself. Other code can listen for `events` and can read the list of changes when completed. They can also attached to the event loop for messaging.

The CLI now simply reads events from the Builder and outputs the messages.

`after_build` now gets an instance of `Builder` and can do things like check for identicals:

```
after_build do |builder|
builder.events[:identical].length
end
```

This, combined with the already merged Rack refactor, should give us a very nice pathway toward parallelization. /cc @karlfreeman