Module: Rack

Defined in:
lib/rack.rb,
lib/rack/lock.rb,
lib/rack/head.rb,
lib/rack/mime.rb,
lib/rack/mock.rb,
lib/rack/etag.rb,
lib/rack/lint.rb,
lib/rack/file.rb,
lib/rack/utils.rb,
lib/rack/config.rb,
lib/rack/static.rb,
lib/rack/urlmap.rb,
lib/rack/server.rb,
lib/rack/logger.rb,
lib/rack/handler.rb,
lib/rack/runtime.rb,
lib/rack/request.rb,
lib/rack/builder.rb,
lib/rack/lobster.rb,
lib/rack/chunked.rb,
lib/rack/cascade.rb,
lib/rack/sendfile.rb,
lib/rack/response.rb,
lib/rack/reloader.rb,
lib/rack/deflater.rb,
lib/rack/directory.rb,
lib/rack/recursive.rb,
lib/rack/multipart.rb,
lib/rack/auth/basic.rb,
lib/rack/nulllogger.rb,
lib/rack/showstatus.rb,
lib/rack/body_proxy.rb,
lib/rack/handler/cgi.rb,
lib/rack/content_type.rb,
lib/rack/session/pool.rb,
lib/rack/commonlogger.rb,
lib/rack/handler/thin.rb,
lib/rack/handler/lsws.rb,
lib/rack/handler/scgi.rb,
lib/rack/conditionalget.rb,
lib/rack/content_length.rb,
lib/rack/methodoverride.rb,
lib/rack/showexceptions.rb,
lib/rack/session/cookie.rb,
lib/rack/tempfile_reaper.rb,
lib/rack/auth/digest/md5.rb,
lib/rack/handler/mongrel.rb,
lib/rack/session/memcache.rb,
lib/rack/multipart/parser.rb,
lib/rack/rewindable_input.rb,
lib/rack/auth/digest/nonce.rb,
lib/rack/auth/digest/params.rb,
lib/rack/multipart/generator.rb,
lib/rack/session/abstract/id.rb,
lib/rack/auth/digest/request.rb,
lib/rack/auth/abstract/request.rb,
lib/rack/auth/abstract/handler.rb,
lib/rack/handler/evented_mongrel.rb,
lib/rack/multipart/uploaded_file.rb,
lib/rack/handler/swiftiplied_mongrel.rb,
lib/rack/handler/fastcgi.rb,
lib/rack/handler/webrick.rb

Overview

The Rack main module, serving as a namespace for all core Rack modules and classes.

All modules meant for use in your application are autoloaded here, so it should be enough just to require 'rack' in your code.

Defined Under Namespace

Modules: Auth, Handler, Mime, Multipart, Session, Utils Classes: BodyProxy, Builder, Cascade, Chunked, CommonLogger, ConditionalGet, Config, ContentLength, ContentType, Deflater, Directory, ETag, File, ForwardRequest, Head, Lint, Lobster, Lock, Logger, MethodOverride, MockRequest, MockResponse, NullLogger, Recursive, Reloader, Request, Response, RewindableInput, Runtime, Sendfile, Server, ShowExceptions, ShowStatus, Static, TempfileReaper, URLMap

Constant Summary

VERSION =

The Rack protocol version number implemented.

[1,3]
RELEASE =
"2.0.0.alpha"
HTTP_HOST =
'HTTP_HOST'.freeze
HTTP_VERSION =
'HTTP_VERSION'.freeze
HTTPS =
'HTTPS'.freeze
PATH_INFO =
'PATH_INFO'.freeze
REQUEST_METHOD =
'REQUEST_METHOD'.freeze
REQUEST_PATH =
'REQUEST_PATH'.freeze
SCRIPT_NAME =
'SCRIPT_NAME'.freeze
QUERY_STRING =
'QUERY_STRING'.freeze
SERVER_PROTOCOL =
'SERVER_PROTOCOL'.freeze
SERVER_NAME =
'SERVER_NAME'.freeze
SERVER_ADDR =
'SERVER_ADDR'.freeze
SERVER_PORT =
'SERVER_PORT'.freeze
CACHE_CONTROL =
'Cache-Control'.freeze
CONTENT_LENGTH =
'Content-Length'.freeze
CONTENT_TYPE =
'Content-Type'.freeze
'Set-Cookie'.freeze
'HTTP_COOKIE'.freeze
GET =
'GET'.freeze
POST =
'POST'.freeze
PUT =
'PUT'.freeze
PATCH =
'PATCH'.freeze
DELETE =
'DELETE'.freeze
HEAD =
'HEAD'.freeze
OPTIONS =
'OPTIONS'.freeze
'LINK'.freeze
'UNLINK'.freeze
TRACE =
'TRACE'.freeze

Class Method Summary collapse

Class Method Details

.releaseObject

Return the Rack release as a dotted string.



24
25
26
# File 'lib/rack.rb', line 24

def self.release
  RELEASE
end

.versionObject

Return the Rack protocol version as a dotted string.



17
18
19
# File 'lib/rack.rb', line 17

def self.version
  VERSION.join(".")
end