public
Description: Forking implementation of rackup -- because reloading always sucks.
Homepage:
Clone URL: git://github.com/rtomayko/shotgun.git
daigoro (author)
Sat Oct 31 04:58:17 -0700 2009
rtomayko (committer)
Sat Oct 31 09:52:58 -0700 2009
name age message
file .gitignore Sat Feb 21 01:17:22 -0800 2009 README, gemspec, and Rakefile [rtomayko]
file COPYING Sat Feb 21 01:31:52 -0800 2009 Add license (MIT) [rtomayko]
file README Sat Feb 21 01:49:29 -0800 2009 run Sinatra apps directly (i.e., without rackup... [rtomayko]
file Rakefile Sun Mar 22 05:26:26 -0700 2009 rename publish:gem rake task to release [rtomayko]
directory bin/ Sat Oct 31 09:52:58 -0700 2009 Clickable server address [daigoro]
file deps.rip Sun Sep 06 16:25:43 -0700 2009 rip deps Signed-off-by: Ryan Tomayko <rtomayko... [josh]
directory lib/ Sun Aug 09 23:45:43 -0700 2009 handle case where app fails to boot in child pr... [rtomayko]
file shotgun.gemspec Thu Aug 13 15:18:51 -0700 2009 0.4 release [rtomayko]
directory test/ Sat Feb 21 00:18:28 -0800 2009 add a few simple specs [rtomayko]
README
                                    Shotgun

This is an automatic reloading version of the rackup command that's shipped with
Rack. It can be used as an alternative to the complex reloading logic provided
by web frameworks or in environments that don't support application reloading.

The shotgun command starts one of Rack's supported servers (e.g., mongrel, thin,
webrick) and listens for requests but does not load any part of the actual
application. Each time a request is received, it forks, loads the application in
the child process, processes the request, and exits the child process. The
result is clean, application-wide reloading of all source files and templates on
each request.

Usage
-----

Installation:

    gem install shotgun

Starting a server with a rackup file:

    shotgun config.ru

Using Thin and starting on port 6000 instead of 9393 (default):

    shotgun --server=thin --port=6000 config.ru

Running Sinatra apps:

    shotgun hello.rb

See 'shotgun --help' for more advanced usage.

Links
-----

Shotgun:       http://github.com/rtomayko/shotgun
Rack:          http://rack.rubyforge.org/
Sinatra:       http://www.sinatrarb.com/

The reloading system in Ian Bicking's webware framework served as inspiration
for the approach taken in Shotgun. Ian lays down the pros and cons of this
approach in the following article:

http://ianbicking.org/docs/Webware_reload.html