Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 57 lines (42 sloc) 2.205 kb
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
1 = Contributed Rack Middleware and Utilities
2
3 This package includes a variety of add-on components for Rack, a Ruby web server
4 interface:
5
6 * Rack::ETag - Automatically sets the ETag header on all String bodies.
7 * Rack::JSONP - Adds JSON-P support by stripping out the callback param
8 and padding the response with the appropriate callback format.
9 * Rack::LighttpdScriptNameFix - Fixes how lighttpd sets the SCRIPT_NAME
10 and PATH_INFO variables in certain configurations.
11 * Rack::Locale - Detects the client locale using the Accept-Language request
12 header and sets a rack.locale variable in the environment.
13 * Rack::MailExceptions - Rescues exceptions raised from the app and
14 sends a useful email with the exception, stacktrace, and contents of the
15 environment.
16 * Rack::PostBodyContentTypeParser - Adds support for JSON request bodies. The
17 Rack parameter hash is populated by deserializing the JSON data provided in
18 the request body when the Content-Type is application/json.
b1a4195 @rtomayko Rack::ProcTitle - request status in $0
rtomayko authored
19 * Rack::ProcTitle - Displays request information in process title ($0) for
20 monitoring/inspection with ps(1).
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
21 * Rack::Profiler - Uses ruby-prof to measure request time.
22 * Rack::Sendfile - Enables X-Sendfile support for bodies that can be served
23 from file.
24 * Rack::TimeZone - Detects the clients timezone using JavaScript and sets
25 a variable in Rack's environment with the offset from UTC.
26
27 === Use
28
29 Git is the quickest way to the rack-contrib sources:
30
31 git clone git://github.com/rtomayko/rack-contrib.git
32
33 Gems are currently available from GitHub clones:
34
35 gem install rtomayko-rack-contrib --source=http://gems.github.com/
36
37 Requiring 'rack/contrib' will add autoloads to the Rack modules for all of the
38 components included. The following example shows what a simple rackup
39 (+config.ru+) file might look like:
40
41 require 'rack'
42 require 'rack/contrib'
43
44 use Rack::Profiler if ENV['RACK_ENV'] == 'development'
45
46 use Rack::ETag
47 use Rack::MailExceptions
48
49 run theapp
50
51 === Links
52
53 rack-contrib on GitHub:: <http://github.com/rtomayko/rack-contrib>
54 Rack:: <http://rack.rubyforge.org/>
55 Rack On GitHub:: <http://github.org/chneukirchen/rack>
56 rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
Something went wrong with that request. Please try again.