Module: Rack

Defined in:
lib/rack/version.rb,
lib/rack.rb,
lib/rack/etag.rb,
lib/rack/file.rb,
lib/rack/head.rb,
lib/rack/lint.rb,
lib/rack/lock.rb,
lib/rack/mime.rb,
lib/rack/mock.rb,
lib/rack/files.rb,
lib/rack/utils.rb,
lib/rack/config.rb,
lib/rack/events.rb,
lib/rack/logger.rb,
lib/rack/server.rb,
lib/rack/static.rb,
lib/rack/urlmap.rb,
lib/rack/builder.rb,
lib/rack/cascade.rb,
lib/rack/chunked.rb,
lib/rack/handler.rb,
lib/rack/headers.rb,
lib/rack/lobster.rb,
lib/rack/request.rb,
lib/rack/runtime.rb,
lib/rack/deflater.rb,
lib/rack/reloader.rb,
lib/rack/response.rb,
lib/rack/sendfile.rb,
lib/rack/constants.rb,
lib/rack/directory.rb,
lib/rack/multipart.rb,
lib/rack/recursive.rb,
lib/rack/auth/basic.rb,
lib/rack/body_proxy.rb,
lib/rack/media_type.rb,
lib/rack/auth/digest.rb,
lib/rack/handler/cgi.rb,
lib/rack/null_logger.rb,
lib/rack/show_status.rb,
lib/rack/content_type.rb,
lib/rack/query_parser.rb,
lib/rack/common_logger.rb,
lib/rack/content_length.rb,
lib/rack/conditional_get.rb,
lib/rack/method_override.rb,
lib/rack/show_exceptions.rb,
lib/rack/tempfile_reaper.rb,
lib/rack/multipart/parser.rb,
lib/rack/rewindable_input.rb,
lib/rack/multipart/generator.rb,
lib/rack/auth/abstract/handler.rb,
lib/rack/auth/abstract/request.rb,
lib/rack/multipart/uploaded_file.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, Utils Classes: BodyProxy, Builder, Cascade, Chunked, CommonLogger, ConditionalGet, Config, ContentLength, ContentType, Deflater, Directory, ETag, Events, Files, ForwardRequest, Head, Headers, 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 collapse

File =
Files
VERSION =

The Rack protocol version number implemented.

[1, 3].freeze
VERSION_STRING =
VERSION.join(".").freeze
RELEASE =
"2.3.0"
HTTP_HOST =

Request env keys

'HTTP_HOST'
HTTP_PORT =
'HTTP_PORT'
HTTPS =
'HTTPS'
PATH_INFO =
'PATH_INFO'
REQUEST_METHOD =
'REQUEST_METHOD'
REQUEST_PATH =
'REQUEST_PATH'
SCRIPT_NAME =
'SCRIPT_NAME'
QUERY_STRING =
'QUERY_STRING'
SERVER_PROTOCOL =
'SERVER_PROTOCOL'
SERVER_NAME =
'SERVER_NAME'
SERVER_PORT =
'SERVER_PORT'
'HTTP_COOKIE'
CACHE_CONTROL =

Response Header Keys

'cache-control'
CONTENT_LENGTH =
'content-length'
CONTENT_TYPE =
'content-type'
ETAG =
'etag'
EXPIRES =
'expires'
'set-cookie'
TRANSFER_ENCODING =
'transfer-encoding'
GET =

HTTP method verbs

'GET'
POST =
'POST'
PUT =
'PUT'
PATCH =
'PATCH'
DELETE =
'DELETE'
HEAD =
'HEAD'
OPTIONS =
'OPTIONS'
'LINK'
'UNLINK'
TRACE =
'TRACE'
RACK_VERSION =

Rack environment variables

'rack.version'
RACK_TEMPFILES =
'rack.tempfiles'
RACK_ERRORS =
'rack.errors'
RACK_LOGGER =
'rack.logger'
RACK_INPUT =
'rack.input'
RACK_SESSION =
'rack.session'
RACK_SESSION_OPTIONS =
'rack.session.options'
RACK_SHOWSTATUS_DETAIL =
'rack.showstatus.detail'
RACK_URL_SCHEME =
'rack.url_scheme'
RACK_HIJACK =
'rack.hijack'
RACK_IS_HIJACK =
'rack.hijack?'
RACK_HIJACK_IO =
'rack.hijack_io'
RACK_RECURSIVE_INCLUDE =
'rack.recursive.include'
RACK_MULTIPART_BUFFER_SIZE =
'rack.multipart.buffer_size'
RACK_MULTIPART_TEMPFILE_FACTORY =
'rack.multipart.tempfile_factory'
RACK_REQUEST_FORM_INPUT =
'rack.request.form_input'
RACK_REQUEST_FORM_HASH =
'rack.request.form_hash'
RACK_REQUEST_FORM_VARS =
'rack.request.form_vars'
'rack.request.cookie_hash'
'rack.request.cookie_string'
RACK_REQUEST_QUERY_HASH =
'rack.request.query_hash'
RACK_REQUEST_QUERY_STRING =
'rack.request.query_string'
RACK_METHODOVERRIDE_ORIGINAL_METHOD =
'rack.methodoverride.original_method'

Class Method Summary collapse

Class Method Details

.releaseObject

Return the Rack release as a dotted string.


27
28
29
# File 'lib/rack/version.rb', line 27

def self.release
  RELEASE
end

.versionObject

Return the Rack protocol version as a dotted string.


20
21
22
# File 'lib/rack/version.rb', line 20

def self.version
  VERSION_STRING
end