Rack middleware replacing responses with relevant pictures of cats, based on the status code.
The pictures are made/collected by girliemac on Flickr
There is also an apache module.
gem install status_cats
Place inside your rackup file:
require 'status_cats' use StatusCats
This will also replace valid responses, even
200, basically making your application useless.
You can manage which status codes should be replaced with cats, by using the
options, which take arrays or ranges.
use StatusCats, :only => [ 403, 404, 500 ] # or ... use StatusCats, :except => 200...300
You can run the demo application:
bundle exec rackup
The application will trigger the response code depending on the path you visit, so visiting http://localhost:9292/418 will respond with a teapot.
Status code 100 (Continue) cannot have a response body. Triggering it will cause Rack to throw up.
The Ruby code in this project is released under the MIT License.