Overview
-
module Utopia
Utopia is a web application framework built on top of Rack.
-
class Content
A middleware which serves dynamically generated content based on markup files.
-
class UnbalancedTagError
This error is raised if a tag doesn't match up when parsing.
-
class Document
A single request through content middleware. We use a struct to hide instance varibles since we instance_exec within this context.
-
class State
The state of a single tag being rendered within a document instance.
-
class Link
Represents a link to some content with associated metadata.
-
class Links
-
class Resolver
Represents a list of
class Utopia::Content::Link
instances relating to the structure of the content. They are formed from thelinks.yaml
file and the actual directory structure on disk.
-
class SymbolicHash
A hash which forces all keys to be symbols and fails with KeyError when strings are used.
-
class MarkupParser
Provides a high level interface for parsing markup.
-
class ParsedTag
A tag generated by parsing markup.
-
class UnbalancedTagError
The name of a closing tag fails to match up with the corresponding opening tag.
-
-
module Namespace
A namespace which contains tags which can be rendered within a
class Utopia::Content::Document
. -
class Node
Represents an immutable node within the content hierarchy.
-
class Response
A basic content response, including useful defaults for typical HTML5 content.
-
module Tags
Tags which provide intrinsic behaviour within the content middleware.
-
tag
Invokes a node and renders a single node to the output stream.
-
-
-
Provider
-
class ContentLength
A faster implementation of Rack::ContentLength which doesn't rewrite body, but does expect it to either be an Array or an object that responds to #bytesize.
-
class Controller
A middleware which loads controller classes and invokes functionality based on the requested path.
-
module Actions
A controller layer which invokes functinality based on the request path.
-
class Action
A nested action lookup hash table.
-
module ClassMethods
Exposed to the controller class.
-
-
class Base
The base implementation of a controller class.
-
module Respond
A controller layer which provides a convenient way to respond to different requested content types. The order in which you add converters matters, as it determines how the incoming Accept: header is mapped, e.g. the first converter is also defined as matching the media range /.
-
module Rewrite
This controller layer rewrites the path before executing controller actions. When the rule matches, the supplied block is executed.
-
class Rule
A abstract rule which can match against a request path.
-
class ExtractPrefixRule
A rule which extracts a prefix pattern from the request path.
-
class Rewriter
Rewrite a request path based on a set of defined rules.
-
module ClassMethods
Exposed to the controller class.
-
-
class Variables
Provides a stack-based instance variable lookup mechanism. It can flatten a stack of controllers into a single hash.
-
-
module Exceptions
Middleware for handling exceptional situations.
-
class Handler
A middleware which catches exceptions and performs an internal redirect.
-
class Mailer
A middleware which catches all exceptions raised from the app it wraps and sends a useful email with the exception, stacktrace, and contents of the environment.
-
-
module Extensions
-
module ArraySplit
-
module TimeDateComparison
Provides comparison operator extensions.
-
module DateTimeComparison
Provides comparison operator extensions.
-
-
module HTTP
HTTP protocol implementation.
-
class Status
A small HTTP status wrapper that verifies the status code within a given range.
-
class Localization
A middleware which attempts to find localized content.
-
class Wrapper
A wrapper to provide easy access to locale related data in the request.
-
-
class Path
Represents a path as an array of path components. Useful for efficient URL manipulation.
-
class Matcher
Performs structured, efficient, matches against
class Utopia::Path
instances. Supports regular expressions, type-casts and constants.-
class MatchData
The result of matching against a
class Utopia::Path
.
-
-
-
module Redirection
A middleware which assists with redirecting from one path to another.
-
class RequestFailure
An error handler fails to redirect to a valid page.
-
class Errors
A middleware which performs internal redirects based on error status codes.
-
class ClientRedirect
A basic client-side redirect.
-
class DirectoryIndex
Redirect urls that end with a
/
, e.g. directories. -
class Rewrite
Rewrite requests that match the given pattern to a single destination.
-
class Moved
Rewrite requests that match the given pattern to a new prefix.
-
-
class Responder
-
class Session
A middleware which provides a secure client-side session storage using a private symmetric encrpytion key.
-
class LazyHash
A simple hash table which fetches it's values only when required.
-
class Serialization
-
class PayloadError
-
-
class Setup
Used for setting up a Utopia web application, typically via
config/environment.rb
-
class Shell
This is designed to be used with the corresponding bake task.
-
class Static
A middleware which serves static files from the specified root directory.
-
class LocalFile
Represents a local file on disk which can be served directly, or passed upstream to sendfile.
-
class MimeTypeLoader
A class to assist with loading mime-type metadata.
-
-