Module: Rack

Defined in:
lib/rack.rb,
lib/rack/lint.rb,
lib/rack/head.rb,
lib/rack/lock.rb,
lib/rack/mock.rb,
lib/rack/file.rb,
lib/rack/etag.rb,
lib/rack/mime.rb,
lib/rack/utils.rb,
lib/rack/config.rb,
lib/rack/logger.rb,
lib/rack/static.rb,
lib/rack/server.rb,
lib/rack/urlmap.rb,
lib/rack/request.rb,
lib/rack/runtime.rb,
lib/rack/builder.rb,
lib/rack/lobster.rb,
lib/rack/handler.rb,
lib/rack/chunked.rb,
lib/rack/cascade.rb,
lib/rack/response.rb,
lib/rack/deflater.rb,
lib/rack/sendfile.rb,
lib/rack/reloader.rb,
lib/rack/multipart.rb,
lib/rack/directory.rb,
lib/rack/recursive.rb,
lib/rack/media_type.rb,
lib/rack/auth/basic.rb,
lib/rack/body_proxy.rb,
lib/rack/show_status.rb,
lib/rack/handler/cgi.rb,
lib/rack/null_logger.rb,
lib/rack/content_type.rb,
lib/rack/handler/thin.rb,
lib/rack/session/pool.rb,
lib/rack/handler/lsws.rb,
lib/rack/query_parser.rb,
lib/rack/handler/scgi.rb,
lib/rack/common_logger.rb,
lib/rack/content_length.rb,
lib/rack/session/cookie.rb,
lib/rack/auth/digest/md5.rb,
lib/rack/method_override.rb,
lib/rack/tempfile_reaper.rb,
lib/rack/show_exceptions.rb,
lib/rack/conditional_get.rb,
lib/rack/rewindable_input.rb,
lib/rack/multipart/parser.rb,
lib/rack/session/memcache.rb,
lib/rack/auth/digest/nonce.rb,
lib/rack/auth/digest/params.rb,
lib/rack/auth/digest/request.rb,
lib/rack/multipart/generator.rb,
lib/rack/session/abstract/id.rb,
lib/rack/auth/abstract/handler.rb,
lib/rack/auth/abstract/request.rb,
lib/rack/multipart/uploaded_file.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, MediaType, MethodOverride, MockRequest, MockResponse, NullLogger, QueryParser, 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
TRANSFER_ENCODING =
'Transfer-Encoding'.freeze
'HTTP_COOKIE'.freeze
ETAG =
'ETag'.freeze
GET =

HTTP method verbs

'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
RACK_VERSION =

Rack environment variables

'rack.version'.freeze
RACK_TEMPFILES =
'rack.tempfiles'.freeze
RACK_ERRORS =
'rack.errors'.freeze
RACK_LOGGER =
'rack.logger'.freeze
RACK_INPUT =
'rack.input'.freeze
RACK_SESSION =
'rack.session'.freeze
RACK_SESSION_OPTIONS =
'rack.session.options'.freeze
RACK_SHOWSTATUS_DETAIL =
'rack.showstatus.detail'.freeze
RACK_MULTITHREAD =
'rack.multithread'.freeze
RACK_MULTIPROCESS =
'rack.multiprocess'.freeze
RACK_RUNONCE =
'rack.run_once'.freeze
RACK_URL_SCHEME =
'rack.url_scheme'.freeze
RACK_HIJACK =
'rack.hijack'.freeze
RACK_IS_HIJACK =
'rack.hijack?'.freeze
RACK_HIJACK_IO =
'rack.hijack_io'.freeze
RACK_RECURSIVE_INCLUDE =
'rack.recursive.include'.freeze
RACK_MULTIPART_BUFFER_SIZE =
'rack.multipart.buffer_size'.freeze
RACK_MULTIPART_TEMPFILE_FACTORY =
'rack.multipart.tempfile_factory'.freeze
RACK_REQUEST_FORM_INPUT =
'rack.request.form_input'.freeze
RACK_REQUEST_FORM_HASH =
'rack.request.form_hash'.freeze
RACK_REQUEST_FORM_VARS =
'rack.request.form_vars'.freeze
'rack.request.cookie_hash'.freeze
'rack.request.cookie_string'.freeze
RACK_REQUEST_QUERY_HASH =
'rack.request.query_hash'.freeze
RACK_REQUEST_QUERY_STRING =
'rack.request.query_string'.freeze
RACK_METHODOVERRIDE_ORIGINAL_METHOD =
'rack.methodoverride.original_method'.freeze
'rack.session.unpacked_cookie_data'.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