Top Level Namespace

Defined in:

Constant Summary

DEFAULT_CONFIGURATION_PATH = File.join(Dir.current, "configuration.yml")

Constant for the default configuration path.

DEFAULT_REDIS_HOST = "localhost"

The default Redis host name.

DEFAULT_REDIS_POOL_SIZE = 5

The default Redis pool size.

DEFAULT_REDIS_PORT = 6379

The default Redis port number.

Method Summary

Macro Summary

Method Detail

def create_redis_pool(configuration) : Redis::PooledClient #

Create a new Redis connection pool.


[View source]
def generate_group_id(redis) #

A method to help generate group ids.


[View source]
def load_configuration(path : String = DEFAULT_CONFIGURATION_PATH) #

Loads the application configuration file.


[View source]

Macro Detail

macro bad_request(cause, response = "Bad Request") #

A macro to raise an bad request HTTP exception.


[View source]
macro fail_request(env, code, error, message) #

A macro that encapsulates standard functionality for calling a halt to request processing on a request that has hit a problem.


[View source]
macro for_request(&block) #

A macro that provides the exception handling for processing a standard web request.


[View source]
macro forbidden(cause, response = "Forbidden") #

A macro to raise an forbidden HTTP exception.


[View source]
macro get_configuration(env) #

A macro to wrap the extraction of request configuration.


[View source]
macro get_redis(env) #

A macro to wrap the extraction of request configuration.


[View source]
macro handle_exception(env, exception) #

A macro to handle catching non-HTTP exceptions.


[View source]
macro handle_http_exception(env, exception) #

A macro to simplify handling HTTPExceptions in code.


[View source]
macro internal_server_error(cause, response = "Internal Server Error") #

A macro to raise an internal server error HTTP exception.


[View source]
macro not_found(cause, response = "Not Found") #

A macro to raise an not found HTTP exception.


[View source]
macro optional_parameter(name, parameters, alternative = nil, type = String) #

A macro to encapsulate handling for optional parameters.


[View source]
macro required_parameter(name, parameters, type = String) #

A macro to encapsulate handling for required parameters.


[View source]
macro unauthorized(cause, response = "Unauthorized") #

A macro to raise an unauthorized HTTP exception.


[View source]