digitaloceancloud/resource_kit — pull request #2 by bobbytables (2014-08-27 17:32:19+00:00)
Title: Action hooks + Other niceties

### This adds a few enhancements to Resource Kit. Namely:

* **Before request hooks** - This allows users to set things such as headers before a request is actually performed.
* **Blocks are eval'ed against the resource instance** - This means that when you have a `handler(200) {}`, the block is now evaluated against the instance of the resource. Meaning you can define methods on your resource and use those in blocks. This works for `path`, `handler`, `before_request`, and `body` for actions.
* **Basic Integration Tests** - This adds a couple of tests to make sure everything in resource kit is hooked up and operational as expected.

### Breaking Changes:

* `ActionInvoker` is now instantiated with the instance of the resource. Previously you instantiate the invoker with a connection object. Since resource instances always have a connection, it makes it more flexible to pass in the resource and delegate.