Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 344
- Log:
Massive changeset which brings the old, ROOL customised Instiki
version up to date, but without any ROOL customisations in this
latest checked-in version (which is 0.19.1). This is deliberate,
so that it's easy to see the changes made for the ROOL version
in a subsequent changeset. The 'app/views/shared' directory is not
part of Instiki but is kept to maintain the change history with
updated ROOL customisations, some of which involve the same files
in that same directory.
- Author:
- rool
- Date:
- Sat Mar 19 19:52:13 +0000 2011
- Size:
- 14059 Bytes
1 | = Rack, a modular Ruby webserver interface |
2 | |
3 | Rack provides a minimal, modular and adaptable interface for developing |
4 | web applications in Ruby. By wrapping HTTP requests and responses in |
5 | the simplest way possible, it unifies and distills the API for web |
6 | servers, web frameworks, and software in between (the so-called |
7 | middleware) into a single method call. |
8 | |
9 | The exact details of this are described in the Rack specification, |
10 | which all Rack applications should conform to. |
11 | |
12 | == Supported web servers |
13 | |
14 | The included *handlers* connect all kinds of web servers to Rack: |
15 | * Mongrel |
16 | * EventedMongrel |
17 | * SwiftipliedMongrel |
18 | * WEBrick |
19 | * FCGI |
20 | * CGI |
21 | * SCGI |
22 | * LiteSpeed |
23 | * Thin |
24 | |
25 | These web servers include Rack handlers in their distributions: |
26 | * Ebb |
27 | * Fuzed |
28 | * Glassfish v3 |
29 | * Phusion Passenger (which is mod_rack for Apache and for nginx) |
30 | * Rainbows! |
31 | * Unicorn |
32 | * Zbatery |
33 | |
34 | Any valid Rack app will run the same on all these handlers, without |
35 | changing anything. |
36 | |
37 | == Supported web frameworks |
38 | |
39 | These frameworks include Rack adapters in their distributions: |
40 | * Camping |
41 | * Coset |
42 | * Halcyon |
43 | * Mack |
44 | * Maveric |
45 | * Merb |
46 | * Racktools::SimpleApplication |
47 | * Ramaze |
48 | * Ruby on Rails |
49 | * Rum |
50 | * Sinatra |
51 | * Sin |
52 | * Vintage |
53 | * Waves |
54 | * Wee |
55 | * ... and many others. |
56 | |
57 | Current links to these projects can be found at |
58 | http://wiki.ramaze.net/Home#other-frameworks |
59 | |
60 | == Available middleware |
61 | |
62 | Between the server and the framework, Rack can be customized to your |
63 | applications needs using middleware, for example: |
64 | * Rack::URLMap, to route to multiple applications inside the same process. |
65 | * Rack::CommonLogger, for creating Apache-style logfiles. |
66 | * Rack::ShowException, for catching unhandled exceptions and |
67 | presenting them in a nice and helpful way with clickable backtrace. |
68 | * Rack::File, for serving static files. |
69 | * ...many others! |
70 | |
71 | All these components use the same interface, which is described in |
72 | detail in the Rack specification. These optional components can be |
73 | used in any way you wish. |
74 | |
75 | == Convenience |
76 | |
77 | If you want to develop outside of existing frameworks, implement your |
78 | own ones, or develop middleware, Rack provides many helpers to create |
79 | Rack applications quickly and without doing the same web stuff all |
80 | over: |
81 | * Rack::Request, which also provides query string parsing and |
82 | multipart handling. |
83 | * Rack::Response, for convenient generation of HTTP replies and |
84 | cookie handling. |
85 | * Rack::MockRequest and Rack::MockResponse for efficient and quick |
86 | testing of Rack application without real HTTP round-trips. |
87 | |
88 | == rack-contrib |
89 | |
90 | The plethora of useful middleware created the need for a project that |
91 | collects fresh Rack middleware. rack-contrib includes a variety of |
92 | add-on components for Rack and it is easy to contribute new modules. |
93 | |
94 | * http://github.com/rack/rack-contrib |
95 | |
96 | == rackup |
97 | |
98 | rackup is a useful tool for running Rack applications, which uses the |
99 | Rack::Builder DSL to configure middleware and build up applications |
100 | easily. |
101 | |
102 | rackup automatically figures out the environment it is run in, and |
103 | runs your application as FastCGI, CGI, or standalone with Mongrel or |
104 | WEBrick---all from the same configuration. |
105 | |
106 | == Quick start |
107 | |
108 | Try the lobster! |
109 | |
110 | Either with the embedded WEBrick starter: |
111 | |
112 | ruby -Ilib lib/rack/lobster.rb |
113 | |
114 | Or with rackup: |
115 | |
116 | bin/rackup -Ilib example/lobster.ru |
117 | |
118 | By default, the lobster is found at http://localhost:9292. |
119 | |
120 | == Installing with RubyGems |
121 | |
122 | A Gem of Rack is available at gemcutter.org. You can install it with: |
123 | |
124 | gem install rack |
125 | |
126 | I also provide a local mirror of the gems (and development snapshots) |
127 | at my site: |
128 | |
129 | gem install rack --source http://chneukirchen.org/releases/gems/ |
130 | |
131 | == Running the tests |
132 | |
133 | Testing Rack requires the bacon testing framework: |
134 | |
135 | gem install bacon |
136 | |
137 | There are two rake-based test tasks: |
138 | |
139 | rake test tests all the fast tests (no Handlers or Adapters) |
140 | rake fulltest runs all the tests |
141 | |
142 | The fast testsuite has no dependencies outside of the core Ruby |
143 | installation and bacon. |
144 | |
145 | To run the test suite completely, you need: |
146 | |
147 | * fcgi |
148 | * memcache-client |
149 | * mongrel |
150 | * thin |
151 | |
152 | The full set of tests test FCGI access with lighttpd (on port |
153 | 9203) so you will need lighttpd installed as well as the FCGI |
154 | libraries and the fcgi gem: |
155 | |
156 | Download and install lighttpd: |
157 | |
158 | http://www.lighttpd.net/download |
159 | |
160 | Installing the FCGI libraries: |
161 | |
162 | curl -O http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz |
163 | tar xzvf fcgi-2.4.0.tar.gz |
164 | cd fcgi-2.4.0 |
165 | ./configure --prefix=/usr/local |
166 | make |
167 | sudo make install |
168 | cd .. |
169 | |
170 | Installing the Ruby fcgi gem: |
171 | |
172 | gem install fcgi |
173 | |
174 | Furthermore, to test Memcache sessions, you need memcached (will be |
175 | run on port 11211) and memcache-client installed. |
176 | |
177 | == History |
178 | |
179 | * March 3rd, 2007: First public release 0.1. |
180 | |
181 | * May 16th, 2007: Second public release 0.2. |
182 | * HTTP Basic authentication. |
183 | * Cookie Sessions. |
184 | * Static file handler. |
185 | * Improved Rack::Request. |
186 | * Improved Rack::Response. |
187 | * Added Rack::ShowStatus, for better default error messages. |
188 | * Bug fixes in the Camping adapter. |
189 | * Removed Rails adapter, was too alpha. |
190 | |
191 | * February 26th, 2008: Third public release 0.3. |
192 | * LiteSpeed handler, by Adrian Madrid. |
193 | * SCGI handler, by Jeremy Evans. |
194 | * Pool sessions, by blink. |
195 | * OpenID authentication, by blink. |
196 | * :Port and :File options for opening FastCGI sockets, by blink. |
197 | * Last-Modified HTTP header for Rack::File, by blink. |
198 | * Rack::Builder#use now accepts blocks, by Corey Jewett. |
199 | (See example/protectedlobster.ru) |
200 | * HTTP status 201 can contain a Content-Type and a body now. |
201 | * Many bugfixes, especially related to Cookie handling. |
202 | |
203 | * August 21st, 2008: Fourth public release 0.4. |
204 | * New middleware, Rack::Deflater, by Christoffer Sawicki. |
205 | * OpenID authentication now needs ruby-openid 2. |
206 | * New Memcache sessions, by blink. |
207 | * Explicit EventedMongrel handler, by Joshua Peek <josh@joshpeek.com> |
208 | * Rack::Reloader is not loaded in rackup development mode. |
209 | * rackup can daemonize with -D. |
210 | * Many bugfixes, especially for pool sessions, URLMap, thread safety |
211 | and tempfile handling. |
212 | * Improved tests. |
213 | * Rack moved to Git. |
214 | |
215 | * January 6th, 2009: Fifth public release 0.9. |
216 | * Rack is now managed by the Rack Core Team. |
217 | * Rack::Lint is stricter and follows the HTTP RFCs more closely. |
218 | * Added ConditionalGet middleware. |
219 | * Added ContentLength middleware. |
220 | * Added Deflater middleware. |
221 | * Added Head middleware. |
222 | * Added MethodOverride middleware. |
223 | * Rack::Mime now provides popular MIME-types and their extension. |
224 | * Mongrel Header now streams. |
225 | * Added Thin handler. |
226 | * Official support for swiftiplied Mongrel. |
227 | * Secure cookies. |
228 | * Made HeaderHash case-preserving. |
229 | * Many bugfixes and small improvements. |
230 | |
231 | * January 9th, 2009: Sixth public release 0.9.1. |
232 | * Fix directory traversal exploits in Rack::File and Rack::Directory. |
233 | |
234 | * April 25th, 2009: Seventh public release 1.0.0. |
235 | * SPEC change: Rack::VERSION has been pushed to [1,0]. |
236 | * SPEC change: header values must be Strings now, split on "\n". |
237 | * SPEC change: Content-Length can be missing, in this case chunked transfer |
238 | encoding is used. |
239 | * SPEC change: rack.input must be rewindable and support reading into |
240 | a buffer, wrap with Rack::RewindableInput if it isn't. |
241 | * SPEC change: rack.session is now specified. |
242 | * SPEC change: Bodies can now additionally respond to #to_path with |
243 | a filename to be served. |
244 | * NOTE: String bodies break in 1.9, use an Array consisting of a |
245 | single String instead. |
246 | * New middleware Rack::Lock. |
247 | * New middleware Rack::ContentType. |
248 | * Rack::Reloader has been rewritten. |
249 | * Major update to Rack::Auth::OpenID. |
250 | * Support for nested parameter parsing in Rack::Response. |
251 | * Support for redirects in Rack::Response. |
252 | * HttpOnly cookie support in Rack::Response. |
253 | * The Rakefile has been rewritten. |
254 | * Many bugfixes and small improvements. |
255 | |
256 | * October 18th, 2009: Eighth public release 1.0.1. |
257 | * Bump remainder of rack.versions. |
258 | * Support the pure Ruby FCGI implementation. |
259 | * Fix for form names containing "=": split first then unescape components |
260 | * Fixes the handling of the filename parameter with semicolons in names. |
261 | * Add anchor to nested params parsing regexp to prevent stack overflows |
262 | * Use more compatible gzip write api instead of "<<". |
263 | * Make sure that Reloader doesn't break when executed via ruby -e |
264 | * Make sure WEBrick respects the :Host option |
265 | * Many Ruby 1.9 fixes. |
266 | |
267 | * January 3rd, 2010: Ninth public release 1.1.0. |
268 | * Moved Auth::OpenID to rack-contrib. |
269 | * SPEC change that relaxes Lint slightly to allow subclasses of the |
270 | required types |
271 | * SPEC change to document rack.input binary mode in greator detail |
272 | * SPEC define optional rack.logger specification |
273 | * File servers support X-Cascade header |
274 | * Imported Config middleware |
275 | * Imported ETag middleware |
276 | * Imported Runtime middleware |
277 | * Imported Sendfile middleware |
278 | * New Logger and NullLogger middlewares |
279 | * Added mime type for .ogv and .manifest. |
280 | * Don't squeeze PATH_INFO slashes |
281 | * Use Content-Type to determine POST params parsing |
282 | * Update Rack::Utils::HTTP_STATUS_CODES hash |
283 | * Add status code lookup utility |
284 | * Response should call #to_i on the status |
285 | * Add Request#user_agent |
286 | * Request#host knows about forwared host |
287 | * Return an empty string for Request#host if HTTP_HOST and |
288 | SERVER_NAME are both missing |
289 | * Allow MockRequest to accept hash params |
290 | * Optimizations to HeaderHash |
291 | * Refactored rackup into Rack::Server |
292 | * Added Utils.build_nested_query to complement Utils.parse_nested_query |
293 | * Added Utils::Multipart.build_multipart to complement |
294 | Utils::Multipart.parse_multipart |
295 | * Extracted set and delete cookie helpers into Utils so they can be |
296 | used outside Response |
297 | * Extract parse_query and parse_multipart in Request so subclasses |
298 | can change their behavior |
299 | * Enforce binary encoding in RewindableInput |
300 | * Set correct external_encoding for handlers that don't use RewindableInput |
301 | |
302 | * June 13th, 2010: Tenth public release 1.2.0. |
303 | * Removed Camping adapter: Camping 2.0 supports Rack as-is |
304 | * Removed parsing of quoted values |
305 | * Add Request.trace? and Request.options? |
306 | * Add mime-type for .webm and .htc |
307 | * Fix HTTP_X_FORWARDED_FOR |
308 | * Various multipart fixes |
309 | * Switch test suite to bacon |
310 | |
311 | * June 15th, 2010: Eleventh public release 1.2.1. |
312 | * Make CGI handler rewindable |
313 | * Rename spec/ to test/ to not conflict with SPEC on lesser |
314 | operating systems |
315 | |
316 | == Contact |
317 | |
318 | Please post bugs, suggestions and patches to |
319 | the bug tracker at <http://github.com/rack/rack/issues>. |
320 | |
321 | Mailing list archives are available at |
322 | <http://groups.google.com/group/rack-devel>. |
323 | |
324 | Git repository (send Git patches to the mailing list): |
325 | * http://github.com/rack/rack |
326 | * http://git.vuxu.org/cgi-bin/gitweb.cgi?p=rack-github.git |
327 | |
328 | You are also welcome to join the #rack channel on irc.freenode.net. |
329 | |
330 | == Thanks |
331 | |
332 | The Rack Core Team, consisting of |
333 | |
334 | * Christian Neukirchen (chneukirchen) |
335 | * James Tucker (raggi) |
336 | * Josh Peek (josh) |
337 | * Michael Fellinger (manveru) |
338 | * Ryan Tomayko (rtomayko) |
339 | * Scytrin dai Kinthra (scytrin) |
340 | |
341 | would like to thank: |
342 | |
343 | * Adrian Madrid, for the LiteSpeed handler. |
344 | * Christoffer Sawicki, for the first Rails adapter and Rack::Deflater. |
345 | * Tim Fletcher, for the HTTP authentication code. |
346 | * Luc Heinrich for the Cookie sessions, the static file handler and bugfixes. |
347 | * Armin Ronacher, for the logo and racktools. |
348 | * Alex Beregszaszi, Alexander Kahn, Anil Wadghule, Aredridel, Ben |
349 | Alpert, Dan Kubb, Daniel Roethlisberger, Matt Todd, Tom Robinson, |
350 | Phil Hagelberg, S. Brent Faulkner, Bosko Milekic, Daniel Rodríguez |
351 | Troitiño, Genki Takiuchi, Geoffrey Grosenbach, Julien Sanchez, Kamal |
352 | Fariz Mahyuddin, Masayoshi Takahashi, Patrick Aljordm, Mig, Kazuhiro |
353 | Nishiyama, Jon Bardin, Konstantin Haase, Larry Siden, Matias |
354 | Korhonen, Sam Ruby, Simon Chiang, Tim Connor, Timur Batyrshin, and |
355 | Zach Brock for bug fixing and other improvements. |
356 | * Eric Wong, Hongli Lai, Jeremy Kemper for their continuous support |
357 | and API improvements. |
358 | * Yehuda Katz and Carl Lerche for refactoring rackup. |
359 | * Brian Candler, for Rack::ContentType. |
360 | * Graham Batty, for improved handler loading. |
361 | * Stephen Bannasch, for bug reports and documentation. |
362 | * Gary Wright, for proposing a better Rack::Response interface. |
363 | * Jonathan Buch, for improvements regarding Rack::Response. |
364 | * Armin Röhrl, for tracking down bugs in the Cookie generator. |
365 | * Alexander Kellett for testing the Gem and reviewing the announcement. |
366 | * Marcus Rückert, for help with configuring and debugging lighttpd. |
367 | * The WSGI team for the well-done and documented work they've done and |
368 | Rack builds up on. |
369 | * All bug reporters and patch contributers not mentioned above. |
370 | |
371 | == Copyright |
372 | |
373 | Copyright (C) 2007, 2008, 2009, 2010 Christian Neukirchen <http://purl.org/net/chneukirchen> |
374 | |
375 | Permission is hereby granted, free of charge, to any person obtaining a copy |
376 | of this software and associated documentation files (the "Software"), to |
377 | deal in the Software without restriction, including without limitation the |
378 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
379 | sell copies of the Software, and to permit persons to whom the Software is |
380 | furnished to do so, subject to the following conditions: |
381 | |
382 | The above copyright notice and this permission notice shall be included in |
383 | all copies or substantial portions of the Software. |
384 | |
385 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
386 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
387 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
388 | THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
389 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
390 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
391 | |
392 | == Links |
393 | |
394 | Rack:: <http://rack.rubyforge.org/> |
395 | Rack's Rubyforge project:: <http://rubyforge.org/projects/rack> |
396 | Official Rack repositories:: <http://github.com/rack> |
397 | Rack Lighthouse Bug Tracking:: <http://rack.lighthouseapp.com/> |
398 | rack-devel mailing list:: <http://groups.google.com/group/rack-devel> |
399 | |
400 | Christian Neukirchen:: <http://chneukirchen.org/> |
401 |