Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 81 lines (66 sloc) 3.805 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::JSONP - Adds JSON-P support by stripping out the callback param
7 and padding the response with the appropriate callback format.
8 * Rack::LighttpdScriptNameFix - Fixes how lighttpd sets the SCRIPT_NAME
9 and PATH_INFO variables in certain configurations.
10 * Rack::Locale - Detects the client locale using the Accept-Language request
11 header and sets a rack.locale variable in the environment.
12 * Rack::MailExceptions - Rescues exceptions raised from the app and
13 sends a useful email with the exception, stacktrace, and contents of the
14 environment.
86a2ced @mislav Add Rack::NestedParams; based on Rails UrlEncodedPairParser
mislav authored
15 * Rack::NestedParams - parses form params with subscripts (e.g., * "post[title]=Hello")
16 into a nested/recursive Hash structure (based on Rails' implementation).
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
17 * Rack::PostBodyContentTypeParser - Adds support for JSON request bodies. The
18 Rack parameter hash is populated by deserializing the JSON data provided in
19 the request body when the Content-Type is application/json.
b1a4195 @rtomayko Rack::ProcTitle - request status in $0
rtomayko authored
20 * Rack::ProcTitle - Displays request information in process title ($0) for
21 monitoring/inspection with ps(1).
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
22 * Rack::Profiler - Uses ruby-prof to measure request time.
23 * Rack::Sendfile - Enables X-Sendfile support for bodies that can be served
24 from file.
4d28e24 @josh Add Signals middleware
josh authored
25 * Rack::Signals - Installs signal handlers that are safely processed after
26 a request
3f42d3a @anupom Rack::StaticCache - auto cache headers for URLs with asset timestamps
anupom authored
27 * Rack::StaticCache - Modifies the response headers to facilitiate client and proxy caching for
28 static files that minimizes http requests and improves overall load times for second time visitors.
4ad01fe @elitheeli A few minor text changes
elitheeli authored
29 * Rack::TimeZone - Detects the client's timezone using JavaScript and sets
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
30 a variable in Rack's environment with the offset from UTC.
ec0fb58 @lifo Add Rack::Callbacks. Example :
lifo authored
31 * Rack::Evil - Lets the rack application return a response to the client from any place.
3502c35 @elitheeli Domain-Specific Language
elitheeli authored
32 * Rack::Callbacks - Implements DSL for pure before/after filter like Middlewares.
01533a8 @jcrosby Add Rack::Config
jcrosby authored
33 * Rack::Config - Shared configuration for cooperative middleware.
31370b7 @jcrosby Add Rack::NotFound
jcrosby authored
34 * Rack::NotFound - A default 404 application.
fe510ef @cee-dub Add Rack::CSSHTTPRequest middleware
cee-dub authored
35 * Rack::CSSHTTPRequest - Adds CSSHTTPRequest support by encoding responses as
36 CSS for cross-site AJAX-style data loading
82951d3 @tj Added Rack::Deflect - DOS protection middleware
tj authored
37 * Rack::Deflect - Helps protect against DoS attacks.
43a508f @jeremyevans Add Rack::RelativeRedirect
jeremyevans authored
38 * Rack::ResponseCache - Caches responses to requests without query strings
39 to Disk or a user provider Ruby object. Similar to Rails' page caching.
40 * Rack::RelativeRedirect - Transforms relative paths in redirects to
41 absolute URLs.
3e1d5f2 @vangberg Rack::Backstage - maintenance page middleware
vangberg authored
42 * Rack::Backstage - Returns content of specified file if it exists, which makes
43 it convenient for putting up maintenance pages.
fae344f @mynyml Fix README typo (Rack::AcceptFormat)
mynyml authored
44 * Rack::AcceptFormat - Adds a format extension at the end of the URI when there is none, corresponding to the mime-type given in the Accept HTTP header.
988cd66 @jcrosby Add Rack::HostMeta
jcrosby authored
45 * Rack::HostMeta - Configures /host-meta using a block
94fde2b @josh Rack::Cookies
josh authored
46 * Rack::Cookies - Adds simple cookie jar hash to env
4ad01fe @elitheeli A few minor text changes
elitheeli authored
47 * Rack::Access - Limits access based on IP address
48 * Rack::ResponseHeaders - Manipulates response headers object at runtime
49 * Rack::SimpleEndpoint - Creates simple endpoints with routing rules, similar to Sinatra actions
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
50
51 === Use
52
53 Git is the quickest way to the rack-contrib sources:
54
b5218fe @rtomayko README and gemspec update (project URL change, mostly)
rtomayko authored
55 git clone git://github.com/rack/rack-contrib.git
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
56
1c22a73 @rtomayko update gem install instructions in README
rtomayko authored
57 Gems are available too:
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
58
1c22a73 @rtomayko update gem install instructions in README
rtomayko authored
59 gem install rack-contrib
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
60
61 Requiring 'rack/contrib' will add autoloads to the Rack modules for all of the
62 components included. The following example shows what a simple rackup
63 (+config.ru+) file might look like:
64
65 require 'rack'
66 require 'rack/contrib'
67
68 use Rack::Profiler if ENV['RACK_ENV'] == 'development'
69
70 use Rack::ETag
71 use Rack::MailExceptions
72
73 run theapp
74
75 === Links
76
b5218fe @rtomayko README and gemspec update (project URL change, mostly)
rtomayko authored
77 rack-contrib on GitHub:: <http://github.com/rack/rack-contrib>
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
78 Rack:: <http://rack.rubyforge.org/>
b5218fe @rtomayko README and gemspec update (project URL change, mostly)
rtomayko authored
79 Rack On GitHub:: <http://github.org/rack/rack>
3560ac0 @rtomayko Flesh out README a bit; rename to README.rdoc
rtomayko authored
80 rack-devel mailing list:: <http://groups.google.com/group/rack-devel>
Something went wrong with that request. Please try again.