Overview
-
module Utopia-
class Application < Protocol::HTTP::MiddlewareThe protocol-facing entrypoint for a Utopia application.
-
class ComponentsInstalls JavaScript packages into the public components directory. Package contents are copied from
distwhen it exists, otherwise from the package root. -
module ContentBuilds middleware for serving filesystem-backed dynamic content.
-
class Builder < XRB::BuilderA builder for rendering Utopia content that extends XRB::Builder with Utopia-specific functionality.
-
class UnbalancedTagError < StandardErrorThis error is raised if a tag doesn't match up when parsing.
-
class Document < ResponseA single request through content middleware. We use a struct to hide instance varibles since we instance_exec within this context.
-
class LinkRepresents a link to some content with associated metadata.
-
class LinksA collection of links resolved from the filesystem content hierarchy.
-
class ResolverRepresents a list of
class Utopia::Content::Linkinstances relating to the structure of the content. They are formed from thelinks.yamlfile and the actual directory structure on disk.
-
class SymbolicHash < HashA hash which forces all keys to be symbols and fails with KeyError when strings are used.
-
class MarkupParserProvides a high level interface for parsing markup.
-
class ParsedTagA tag generated by parsing markup.
-
class UnbalancedTagError < StandardErrorThe name of a closing tag fails to match up with the corresponding opening tag.
-
-
class Middleware < Protocol::HTTP::MiddlewareA middleware which serves dynamically generated content based on markup files.
-
Provider -
module NamespaceA namespace which contains tags which can be rendered within a
class Utopia::Content::Document. -
class NodeRepresents an immutable node within the content hierarchy.
-
class Context < StructThis is a special context in which a limited set of well defined methods are exposed in the content view.
-
class ResponseA basic content response, including useful defaults for typical HTML5 content.
-
module TagsTags which provide intrinsic behaviour within the content middleware.
-
tagInvokes a node and renders a single node to the output stream.
-
-
-
module ControllerA middleware which loads controller classes and invokes functionality based on the requested path.
-
module ActionsA controller layer which invokes functinality based on the request path.
-
class Action < HashA nested action lookup hash table.
-
module ClassMethodsExposed to the controller class.
-
class BaseThe base implementation of a controller class.
-
class Middleware < Protocol::HTTP::MiddlewareDispatches requests to filesystem-backed controller classes.
-
module RespondA 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 ClassMethodsDefines response handlers on controller classes.
-
module Handlers-
module JSONSerializes controller values as JSON responses.
-
module PassthroughPasses response values through without transformation.
-
-
class ResponderNegotiates response content types and invokes the matching handler.
-
class Handler < StructA content-type handler and its response block.
-
-
module RewriteThis controller layer rewrites the path before executing controller actions. When the rule matches, the supplied block is executed.
-
class RuleA abstract rule which can match against a request path.
-
class ExtractPrefixRule < RuleA rule which extracts a prefix pattern from the request path.
-
class RewriterRewrite a request path based on a set of defined rules.
-
module ClassMethodsExposed to the controller class.
-
class VariablesProvides a stack-based instance variable lookup mechanism. It can flatten a stack of controllers into a single hash.
-
-
module ExceptionsMiddleware for handling exceptional situations.
-
class Handler < Protocol::HTTP::MiddlewareA middleware which catches exceptions and performs an internal redirect.
-
class Mailer < Protocol::HTTP::MiddlewareA middleware which catches application exceptions and sends an email containing the exception, backtrace, request, and application state.
-
-
module Extensions-
module ArraySplitAdds splitting helpers to arrays.
-
module TimeDateComparisonProvides comparison operator extensions.
-
module DateTimeComparisonProvides comparison operator extensions.
-
-
module HTTPHTTP protocol implementation.
-
class StatusA small HTTP status wrapper that verifies the status code within a given range.
-
class ImportMapRepresents an import map for JavaScript modules with support for URI and relative path resolution.
-
class BuilderBuilder class for constructing import maps with scoped base URIs.
-
-
module LocalizationComputes request localization preferences and resolves localized resources.
-
class LocalesMatches configured locales against language ranges.
-
class Middleware < Protocol::HTTP::MiddlewareComputes localization preferences and rewrites locale-prefixed paths.
-
class PreferencesImmutable localization preferences for a request or resolved resource.
-
module ResolverResolves localized resources from immutable request preferences.
-
-
class PathRepresents a path as an array of path components. Useful for efficient URL manipulation.
-
class MatcherPerforms structured, efficient, matches against
class Utopia::Pathinstances. Supports regular expressions, type-casts and constants.-
class MatchDataThe result of matching against a
class Utopia::Path.
-
-
-
module RedirectionA middleware which assists with redirecting from one path to another.
-
class ClientRedirect < Protocol::HTTP::MiddlewareA basic client-side redirect.
-
class DirectoryIndex < ClientRedirectRedirect urls that end with a
/, e.g. directories. -
class Errors < Protocol::HTTP::MiddlewareA middleware which performs internal redirects based on error status codes.
-
class Moved < ClientRedirectRewrite requests that match the given pattern to a new prefix.
-
class RequestFailure < StandardErrorAn error handler fails to redirect to a valid page.
-
class Rewrite < ClientRedirectRewrite requests that match the given pattern to a single destination.
-
class RequestUtopia's application-facing request wrapper.
-
module ResponseResponse helpers for Utopia applications.
-
module SessionProvides cookie-backed session middleware.
-
class LazyHashA simple hash table which fetches it's values only when required.
-
class Middleware < Protocol::HTTP::MiddlewareA middleware which provides a secure client-side session storage using a private symmetric encrpytion key.
-
class PayloadError < StandardErrorRaised when payload processing fails.
-
-
class SerializationEncodes and decodes session values using MessagePack.
-
-
class SetupUsed for setting up a Utopia web application, typically via
config/environment.rb -
class ShellThis is designed to be used with the corresponding bake task.
-
module StaticA middleware which serves static files from the specified root directory.
-
class LocalFileRepresents a local static resource and constructs responses for it.
-
class Middleware < Protocol::HTTP::MiddlewareA middleware which serves static files from the specified root directory.
-
Provider -
class MimeTypeLoaderA class to assist with loading mime-type metadata.
-
class ExpansionError < ArgumentErrorRaised when expansion processing fails.
-
-