Doh - The Error Application
Doh creates a simple, customizable Sinatra application that returns the desired status code.
Want a 418? No problem. Start up Doh and hit localhost:9999/418
. Boom, teapot.
Installation
Add this line to your application's Gemfile:
gem 'doh'
And then execute:
$ bundle
Or install it yourself as:
$ gem install doh
Usage
Create a new Doh app with
doh new [app_name]
Open up the new application's directory and edit doh.rb
as needed. It's a basic Sinatra app, so customization is a breeze. Start the application up like any Rack app or with
doh start
The start
command will pass along flags and arguments to rackup
so any valid options for rackup
should work. If no port option -p PORT_NUMBER
is provided, 9999
will be used as a default.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request