Project

doh

0.0
No commit activity in last 3 years
No release in over 3 years
Generate a customizable sinatra app that generates a response code mapping to the url endpoint.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.4
~> 0.17
 Project Readme

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request