Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: v0.0.1
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (28 sloc) 1.17 kB

Status Cats

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.

Usage

Install:

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 :only and :except options, which take arrays or ranges.

use StatusCats, :only => [ 403, 404, 500 ]

# or ...

use StatusCats, :except => 200...300

Known issues

Status code 100 (Continue) cannot have a response body. Triggering it will case Rack to throw up.

License

The Ruby code in this project is released under the MIT License.

The pictures of cats are by Flickr user girliemac, released under this Creative Commons License.

Jump to Line
Something went wrong with that request. Please try again.