Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 61 lines (46 sloc) 2.519 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.
86a2ced @mislav Add Rack::NestedParams; based on Rails UrlEncodedPairParser
mislav authored
16 * Rack::NestedParams - parses form params with subscripts (e.g., * "post[title]=Hello")
17 into a nested/recursive Hash structure (based on Rails' implementation).
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
18 * Rack::PostBodyContentTypeParser - Adds support for JSON request bodies. The
19 Rack parameter hash is populated by deserializing the JSON data provided in
20 the request body when the Content-Type is application/json.
b1a4195 @rtomayko Rack::ProcTitle - request status in $0
rtomayko authored
21 * Rack::ProcTitle - Displays request information in process title ($0) for
22 monitoring/inspection with ps(1).
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
23 * Rack::Profiler - Uses ruby-prof to measure request time.
24 * Rack::Sendfile - Enables X-Sendfile support for bodies that can be served
25 from file.
26 * Rack::TimeZone - Detects the clients timezone using JavaScript and sets
27 a variable in Rack's environment with the offset from UTC.
ec0fb58 @lifo Add Rack::Callbacks. Example :
lifo authored
28 * Rack::Evil - Lets the rack application return a response to the client from any place.
29 * Rack::Callbacks - Implements DLS for pure before/after filter like Middlewares.
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
30
31 === Use
32
33 Git is the quickest way to the rack-contrib sources:
34
b5218fe @rtomayko README and gemspec update (project URL change, mostly)
rtomayko authored
35 git clone git://github.com/rack/rack-contrib.git
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
36
37 Gems are currently available from GitHub clones:
38
b5218fe @rtomayko README and gemspec update (project URL change, mostly)
rtomayko authored
39 gem install rack-rack-contrib --source=http://gems.github.com/
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
40
41 Requiring 'rack/contrib' will add autoloads to the Rack modules for all of the
42 components included. The following example shows what a simple rackup
43 (+config.ru+) file might look like:
44
45 require 'rack'
46 require 'rack/contrib'
47
48 use Rack::Profiler if ENV['RACK_ENV'] == 'development'
49
50 use Rack::ETag
51 use Rack::MailExceptions
52
53 run theapp
54
55 === Links
56
b5218fe @rtomayko README and gemspec update (project URL change, mostly)
rtomayko authored
57 rack-contrib on GitHub:: <http://github.com/rack/rack-contrib>
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
58 Rack:: <http://rack.rubyforge.org/>
b5218fe @rtomayko README and gemspec update (project URL change, mostly)
rtomayko authored
59 Rack On GitHub:: <http://github.org/rack/rack>
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
60 rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
Something went wrong with that request. Please try again.