Rack 0.4, a modular Ruby webserver interface

Hello,

Today I’m proud to release Rack 0.4.

= Rack, a modular Ruby webserver interface

Rack provides a minimal, modular and adaptable interface for developing
web applications in Ruby. By wrapping HTTP requests and responses in
the simplest way possible, it unifies and distills the API for web
servers, web frameworks, and software in between (the so-called
middleware) into a single method call.

The exact details of this are described in the Rack specification,
which all Rack applications should conform to.

== Future specification changes

PLEASE NOTE: In versions of Rack LATER than 0.4, the following
changes will be commited to the Rack specification:

  • 1xx, 204 and 304 status codes MUST not contain a Content-Type.
  • A valid Content-Length header MUST be provided for non 1xx, 204 and
    304
    responses with a Transfer-Encoding of “identity” (default).
    The Content-Length MUST be the same as the sum of the byte-sizes of
    the chunks.
  • The REQUEST_METHOD may be any HTTP token.

Internal Rack modules have been updated to follow this behavior, but
the Rack 0.4 Lint does NOT check it yet for compatibility reasons.
Please update your libraries accordingly.

== Changes

  • August 21st, 2008: Fourth public release 0.4.
    • New middleware, Rack::Deflater, by Christoffer S…
    • OpenID authentication now needs ruby-openid 2.
    • New Memcache sessions, by blink.
    • Explicit EventedMongrel handler, by Joshua Peek.
    • Rack::Reloader is not loaded in rackup development mode.
    • rackup can daemonize with -D.
    • Many bugfixes, especially for pool sessions, URLMap, thread safety
      and tempfile handling.
    • Improved tests.
    • Rack moved to Git.

== Where can I get it?

You can download Rack 0.4 at

    http://chneukirchen.org/releases/rack-0.4.0.tar.gz
              http://rubyforge.org/projects/rack

Alternatively, you can checkout from the development repository with:

git clone git://github.com/chneukirchen/rack.git
cd rack && git checkout rack-0.4   # for this release

== Supported web servers

The included handlers connect all kinds of web servers to Rack:

  • Mongrel
  • EventedMongrel
  • WEBrick
  • FCGI
  • CGI
  • SCGI
  • LiteSpeed

These web servers include Rack handlers in their distributions:

  • Ebb
  • Fuzed
  • Phusion Passenger (which is mod_rack for Apache)
  • Thin

Any valid Rack app will run the same on all these handlers, without
changing anything.

== Supported web frameworks

The included adapters connect Rack with existing Ruby web frameworks:

  • Camping

These frameworks include Rack adapters in their distributions:

  • Coset
  • Halcyon
  • Mack
  • Maveric
  • Merb
  • Racktools::SimpleApplication
  • Ramaze
  • Sinatra
  • Vintage
  • Waves

Ruby on Rails can be run with the adapter included with Thin, which
will be merged into a later Rack version.

Current links to these projects can be found at

== Available middleware

Between the server and the framework, Rack can be customized to your
applications needs using middleware, for example:

  • Rack::URLMap, to route to multiple applications inside the same
    process.
  • Rack::CommonLogger, for creating Apache-style logfiles.
  • Rack::ShowException, for catching unhandled exceptions and
    presenting them in a nice and helpful way with clickable backtrace.
  • Rack::File, for serving static files.
  • …many others!

All these components use the same interface, which is described in
detail in the Rack specification. These optional components can be
used in any way you wish.

== Convenience

If you want to develop outside of existing frameworks, implement your
own ones, or develop middleware, Rack provides many helpers to create
Rack applications quickly and without doing the same web stuff all
over:

  • Rack::Request, which also provides query string parsing and
    multipart handling.
  • Rack::Response, for convenient generation of HTTP replies and
    cookie handling.
  • Rack::MockRequest and Rack::MockResponse for efficient and quick
    testing of Rack application without real HTTP round-trips.

== rackup

rackup is a useful tool for running Rack applications, which uses the
Rack::Builder DSL to configure middleware and build up applications
easily.

rackup automatically figures out the environment it is run in, and
runs your application as FastCGI, CGI, or standalone with Mongrel or
WEBrick—all from the same configuration.

== Installing with RubyGems

A Gem of Rack is available. You can install it with:

gem install rack

I also provide a local mirror of the gems (and development snapshots)
at my site:

gem install rack --source http://chneukirchen.org/releases/gems

== Contact

Please mail bugs, suggestions and patches to
mailto:[email protected].

Mailing list archives are available at
http://groups.google.com/group/rack-devel.

Git repository (branches rebased on master are most welcome):

You are also welcome to join the #rack channel on irc.freenode.net.

== Thanks to

  • blink for the Pool sessions, Memcache sessions, OpenID support, many
    tweaks, patches and bugreports.
  • Michael F., for the helpful discussion, bugfixes and a better
    Rack::Request interface.
  • Adrian M., for the LiteSpeed handler.
  • Christoffer S., for the first Rails adapter and Rack::Deflater.
  • Tim F., for the HTTP authentication code.
  • Luc H. for the Cookie sessions, the static file handler and
    bugfixes.
  • Armin Ronacher, for the logo and racktools.
  • Aredridel, for bug fixing.
  • Stephen B., for bug reports and documentation.
  • Gary W., for proposing a better Rack::Response interface.
  • Jonathan B., for improvements regarding Rack::Response.
  • Armin Röhrl, for tracking down bugs in the Cookie generator.
  • Alexander Kellett for testing the Gem and reviewing the announce.
  • Marcus Rückert, for help with configuring and debugging lighttpd.
  • The WSGI team for the well-done and documented work they’ve done and
    Rack builds up on.
  • All bug reporters and patch contributers not mentioned above.

== Copyright

Copyright (C) 2007, 2008 Christian N.
http://purl.org/net/chneukirchen

Rack is freely distributable under the terms of an MIT-style license.

== Links

Rack:: http://rack.rubyforge.org/
Rack’s Rubyforge project:: http://rubyforge.org/projects/rack
rack-devel mailing list:: http://groups.google.com/group/rack-devel

Christian N.:: http://chneukirchen.org/

Happy hacking and have a nice day,
Christian N.

65a19e53a0dc661f4055d043126585b49a0b618d rack-0.4.0.tar.gz
90df61eb1dbc05678bf13b99ec61e27b546a07a1 rack-0.4.0.gem