관리-도구
편집 파일: page-README_rdoc.ri
U:RDoc::TopLevel[ i I"README.rdoc:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document:@parts[�S:RDoc::Markup::Heading: leveli: textI"Rack, a modular Ruby webserver interface {<img src="https://secure.travis-ci.org/rack/rack.svg" alt="Build Status" />}[http://travis-ci.org/rack/rack] {<img src="https://gemnasium.com/rack/rack.svg" alt="Dependency Status" />}[https://gemnasium.com/rack/rack];To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[ I"MRack provides a minimal, modular and adaptable interface for developing ;TI"Kweb applications in Ruby. By wrapping HTTP requests and responses in ;TI"Hthe simplest way possible, it unifies and distills the API for web ;TI"Eservers, web frameworks, and software in between (the so-called ;TI"+middleware) into a single method call.;T@ o; ;[I"HThe exact details of this are described in the Rack specification, ;TI"3which all Rack applications should conform to.;T@ S; ; i;I"Supported web servers;T@ o; ;[I"FThe included *handlers* connect all kinds of web servers to Rack:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"Mongrel;To;;0;[o; ;[I"EventedMongrel;To;;0;[o; ;[I"SwiftipliedMongrel;To;;0;[o; ;[I"WEBrick;To;;0;[o; ;[I" FCGI;To;;0;[o; ;[I"CGI;To;;0;[o; ;[I" SCGI;To;;0;[o; ;[I"LiteSpeed;To;;0;[o; ;[I" Thin;T@ o; ;[I"DThese web servers include Rack handlers in their distributions:;To;;;;[o;;0;[o; ;[I"Ebb;To;;0;[o; ;[I" Fuzed;To;;0;[o; ;[I"Glassfish v3;To;;0;[o; ;[I"CPhusion Passenger (which is mod_rack for Apache and for nginx);To;;0;[o; ;[I" Puma;To;;0;[o; ;[I"Rainbows!;To;;0;[o; ;[I" Reel;To;;0;[o; ;[I"Unicorn;To;;0;[o; ;[I" unixrack;To;;0;[o; ;[I" uWSGI;To;;0;[o; ;[I" yahns;To;;0;[o; ;[I"Zbatery;T@ o; ;[I"IAny valid Rack app will run the same on all these handlers, without ;TI"changing anything.;T@ S; ; i;I"Supported web frameworks;T@ o; ;[I"CThese frameworks include Rack adapters in their distributions:;To;;;;[o;;0;[o; ;[I"Camping;To;;0;[o; ;[I" Coset;To;;0;[o; ;[I" Espresso;To;;0;[o; ;[I"Halcyon;To;;0;[o; ;[I" Mack;To;;0;[o; ;[I"Maveric;To;;0;[o; ;[I" Merb;To;;0;[o; ;[I"!Racktools::SimpleApplication;To;;0;[o; ;[I"Ramaze;To;;0;[o; ;[I"Ruby on Rails;To;;0;[o; ;[I"Rum;To;;0;[o; ;[I"Sinatra;To;;0;[o; ;[I"Sin;To;;0;[o; ;[I"Vintage;To;;0;[o; ;[I" Waves;To;;0;[o; ;[I"Wee;To;;0;[o; ;[I"... and many others.;T@ S; ; i;I"Available middleware;T@ o; ;[I"JBetween the server and the framework, Rack can be customized to your ;TI"6applications needs using middleware, for example:;To;;;;[ o;;0;[o; ;[I"MRack::URLMap, to route to multiple applications inside the same process.;To;;0;[o; ;[I"<Rack::CommonLogger, for creating Apache-style logfiles.;To;;0;[o; ;[I"@Rack::ShowException, for catching unhandled exceptions and ;TI"Hpresenting them in a nice and helpful way with clickable backtrace.;To;;0;[o; ;[I"*Rack::File, for serving static files.;To;;0;[o; ;[I"...many others!;T@ o; ;[I"HAll these components use the same interface, which is described in ;TI"Idetail in the Rack specification. These optional components can be ;TI"used in any way you wish.;T@ S; ; i;I"Convenience;T@ o; ;[ I"KIf you want to develop outside of existing frameworks, implement your ;TI"Kown ones, or develop middleware, Rack provides many helpers to create ;TI"HRack applications quickly and without doing the same web stuff all ;TI" over:;To;;;;[o;;0;[o; ;[I"ARack::Request, which also provides query string parsing and ;TI"multipart handling.;To;;0;[o; ;[I"CRack::Response, for convenient generation of HTTP replies and ;TI"cookie handling.;To;;0;[o; ;[I"FRack::MockRequest and Rack::MockResponse for efficient and quick ;TI"?testing of Rack application without real HTTP round-trips.;T@ S; ; i;I"rack-contrib;T@ o; ;[I"KThe plethora of useful middleware created the need for a project that ;TI"Icollects fresh Rack middleware. rack-contrib includes a variety of ;TI"Iadd-on components for Rack and it is easy to contribute new modules.;T@ o;;;;[o;;0;[o; ;[I")https://github.com/rack/rack-contrib;T@ S; ; i;I"rackup;T@ o; ;[I"Krackup is a useful tool for running Rack applications, which uses the ;TI"IRack::Builder DSL to configure middleware and build up applications ;TI"easily.;T@ o; ;[I"Hrackup automatically figures out the environment it is run in, and ;TI"Jruns your application as FastCGI, CGI, or standalone with Mongrel or ;TI"/WEBrick---all from the same configuration.;T@ S; ; i;I"Quick start;T@ o; ;[I"Try the lobster!;T@ o; ;[I".Either with the embedded WEBrick starter:;T@ o:RDoc::Markup::Verbatim;[I"$ruby -Ilib lib/rack/lobster.rb ;T:@format0o; ;[I"Or with rackup:;T@ o;;[I")bin/rackup -Ilib example/lobster.ru ;T;0o; ;[I"?By default, the lobster is found at http://localhost:9292.;T@ S; ; i;I"Installing with RubyGems;T@ o; ;[I"JA Gem of Rack is available at rubygems.org. You can install it with:;T@ o;;[I"gem install rack ;T;0o; ;[I"KI also provide a local mirror of the gems (and development snapshots) ;TI"at my site:;T@ o;;[I"Fgem install rack --source http://chneukirchen.org/releases/gems/ ;T;0S; ; i;I"Running the tests;T@ o; ;[I"7Testing Rack requires the bacon testing framework:;T@ o;;[I"Gbundle install --without extra # to be able to run the fast tests ;T;0o; ;[I"Or:;T@ o;;[I"Nbundle install # this assumes that you have installed native extensions! ;T;0o; ;[I")There are two rake-based test tasks:;T@ o;;[I"Hrake test tests all the fast tests (no Handlers or Adapters) ;TI"(rake fulltest runs all the tests ;T;0o; ;[I"EThe fast testsuite has no dependencies outside of the core Ruby ;TI"installation and bacon.;T@ o; ;[I"0To run the test suite completely, you need:;T@ o;;[ I"* fcgi ;TI"* memcache-client ;TI"* mongrel ;TI"* thin ;T;0o; ;[I"CThe full set of tests test FCGI access with lighttpd (on port ;TI"C9203) so you will need lighttpd installed as well as the FCGI ;TI" libraries and the fcgi gem:;T@ o; ;[I"#Download and install lighttpd:;T@ o;;[I"&http://www.lighttpd.net/download ;T;0o; ;[I"#Installing the FCGI libraries:;T@ o;;[I";curl -O http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz ;TI" tar xzvf fcgi-2.4.0.tar.gz ;TI"cd fcgi-2.4.0 ;TI"%./configure --prefix=/usr/local ;TI" make ;TI"sudo make install ;TI"cd .. ;T;0o; ;[I""Installing the Ruby fcgi gem:;T@ o;;[I"gem install fcgi ;T;0o; ;[I"IFurthermore, to test Memcache sessions, you need memcached (will be ;TI"6run on port 11211) and memcache-client installed.;T@ S; ; i;I"Configuration;T@ o; ;[I"SSeveral parameters can be modified on Rack::Utils to configure Rack behaviour.;T@ o; ;[I" e.g:;T@ o;;[I"'Rack::Utils.key_space_limit = 128 ;T;0S; ; i;I"key_space_limit;T@ o; ;[I"MThe default number of bytes to allow a single parameter key to take up. ;TI"?This helps prevent a rogue client from flooding a Request.;T@ o; ;[I"7Default to 65536 characters (4 kiB in worst case).;T@ S; ; i;I"multipart_part_limit;T@ o; ;[I"8The maximum number of parts a request can contain. ;TI"PAccepting too many part can lead to the server running out of file handles.;T@ o; ;[I"dThe default is 128, which means that a single request can't upload more than 128 files at once.;T@ o; ;[I"Set to 0 for no limit.;T@ o; ;[I"LCan also be set via the RACK_MULTIPART_PART_LIMIT environment variable.;T@ S; ; i;I"History;T@ o; ;[I".See <https://github.com/rack/HISTORY.md>.;T@ S; ; i;I"Contact;T@ o; ;[I"2Please post bugs, suggestions and patches to ;TI">the bug tracker at <https://github.com/rack/rack/issues>.;T@ o; ;[ I"KPlease post security related bugs and suggestions to the core team at ;TI"U<https://groups.google.com/group/rack-core> or rack-core@googlegroups.com. This ;TI"Tlist is not public. Due to wide usage of the library, it is strongly preferred ;TI"Mthat we manage timing in order to provide viable patches at the time of ;TI"Gdisclosure. Your assistance in this matter is greatly appreciated.;T@ o; ;[I",Mailing list archives are available at ;TI"2<https://groups.google.com/group/rack-devel>.;T@ o; ;[I";Git repository (send Git patches to the mailing list):;To;;;;[o;;0;[o; ;[I"!https://github.com/rack/rack;To;;0;[o; ;[I"=http://git.vuxu.org/cgi-bin/gitweb.cgi?p=rack-github.git;T@ o; ;[I"HYou are also welcome to join the #rack channel on irc.freenode.net.;T@ S; ; i;I"Thanks;T@ o; ;[I"&The Rack Core Team, consisting of;T@ o;;;;[ o;;0;[o; ;[I"(Christian Neukirchen (chneukirchen);To;;0;[o; ;[I"James Tucker (raggi);To;;0;[o; ;[I"Josh Peek (josh);To;;0;[o; ;[I"José Valim (josevalim);To;;0;[o; ;[I" Michael Fellinger (manveru);To;;0;[o; ;[I"!Aaron Patterson (tenderlove);To;;0;[o; ;[I"$Santiago Pastorino (spastorino);To;;0;[o; ;[I"Konstantin Haase (rkh);T@ o; ;[I"and the Rack Alumnis;T@ o;;;;[o;;0;[o; ;[I"Ryan Tomayko (rtomayko);To;;0;[o; ;[I""Scytrin dai Kinthra (scytrin);T@ o; ;[I"would like to thank:;T@ o;;;;[o;;0;[o; ;[I".Adrian Madrid, for the LiteSpeed handler.;To;;0;[o; ;[I"IChristoffer Sawicki, for the first Rails adapter and Rack::Deflater.;To;;0;[o; ;[I"4Tim Fletcher, for the HTTP authentication code.;To;;0;[o; ;[I"PLuc Heinrich for the Cookie sessions, the static file handler and bugfixes.;To;;0;[o; ;[I"0Armin Ronacher, for the logo and racktools.;To;;0;[o; ;[ I"EAlex Beregszaszi, Alexander Kahn, Anil Wadghule, Aredridel, Ben ;TI"GAlpert, Dan Kubb, Daniel Roethlisberger, Matt Todd, Tom Robinson, ;TI"IPhil Hagelberg, S. Brent Faulkner, Bosko Milekic, Daniel Rodríguez ;TI"KTroitiño, Genki Takiuchi, Geoffrey Grosenbach, Julien Sanchez, Kamal ;TI"JFariz Mahyuddin, Masayoshi Takahashi, Patrick Aljordm, Mig, Kazuhiro ;TI"BNishiyama, Jon Bardin, Konstantin Haase, Larry Siden, Matias ;TI"HKorhonen, Sam Ruby, Simon Chiang, Tim Connor, Timur Batyrshin, and ;TI"6Zach Brock for bug fixing and other improvements.;To;;0;[o; ;[I"GEric Wong, Hongli Lai, Jeremy Kemper for their continuous support ;TI"and API improvements.;To;;0;[o; ;[I"8Yehuda Katz and Carl Lerche for refactoring rackup.;To;;0;[o; ;[I"*Brian Candler, for Rack::ContentType.;To;;0;[o; ;[I"0Graham Batty, for improved handler loading.;To;;0;[o; ;[I"9Stephen Bannasch, for bug reports and documentation.;To;;0;[o; ;[I"BGary Wright, for proposing a better Rack::Response interface.;To;;0;[o; ;[I">Jonathan Buch, for improvements regarding Rack::Response.;To;;0;[o; ;[I"BArmin Röhrl, for tracking down bugs in the Cookie generator.;To;;0;[o; ;[I"JAlexander Kellett for testing the Gem and reviewing the announcement.;To;;0;[o; ;[I"GMarcus Rückert, for help with configuring and debugging lighttpd.;To;;0;[o; ;[I"JThe WSGI team for the well-done and documented work they've done and ;TI"Rack builds up on.;To;;0;[o; ;[I"BAll bug reporters and patch contributors not mentioned above.;T@ S; ; i;I"Copyright;T@ o; ;[I"aCopyright (C) 2007, 2008, 2009, 2010 Christian Neukirchen <http://purl.org/net/chneukirchen>;T@ o; ;[I"RPermission is hereby granted, free of charge, to any person obtaining a copy ;TI"Nof this software and associated documentation files (the "Software"), to ;TI"Pdeal in the Software without restriction, including without limitation the ;TI"Qrights to use, copy, modify, merge, publish, distribute, sublicense, and/or ;TI"Psell copies of the Software, and to permit persons to whom the Software is ;TI"=furnished to do so, subject to the following conditions:;T@ o; ;[I"PThe above copyright notice and this permission notice shall be included in ;TI"8all copies or substantial portions of the Software.;T@ o; ;[I"PTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ;TI"NIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ;TI"MFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ;TI"NTHE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ;TI"MIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ;TI"OCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.;T@ S; ; i;I" Links;T@ o;;: NOTE;[o;;[I" Rack;T;[o; ;[I"<http://rack.github.io/>;To;;[I"Official Rack repositories;T;[o; ;[I"<https://github.com/rack>;To;;[I"Rack Bug Tracking;T;[o; ;[I"*<https://github.com/rack/rack/issues>;To;;[I"rack-devel mailing list;T;[o; ;[I"1<https://groups.google.com/group/rack-devel>;To;;[I"Rack's Rubyforge project;T;[o; ;[I")<http://rubyforge.org/projects/rack>;T@ o;;[I"Christian Neukirchen;T;[o; ;[I"<http://chneukirchen.org/>;T: @file@:0@omit_headings_from_table_of_contents_below0