digitalocean/resource_kit — pull request #9 by davidcelis (2014-10-01 17:29:31+00:00)
Title: Allow specifying a default handler for all codes

If `default_handler` or `handler` is called with only a block and
without a status code passed, it will add a handler that will be called
for all status codes that don't have their own handler specified:

```ruby
class DropletKit < ResourceKit::Resource
default_handler { 'Something unexpected happened!' }

action :all, 'GET /droplets' do
handler(:ok) { |response| Droplet.from_json(response) }
end
end
```

If anything but a 200 is returned from `GET /droplets`, the specified
string will be returned.

Signed-off-by: David Celis