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
-
create_redis_pool(configuration) : Redis::PooledClient
Create a new Redis connection pool.
-
generate_group_id(redis)
A method to help generate group ids.
-
load_configuration(path : String = DEFAULT_CONFIGURATION_PATH)
Loads the application configuration file.
Macro Summary
-
bad_request(cause, response = "Bad Request")
A macro to raise an bad request HTTP exception.
-
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.
-
for_request(&block)
A macro that provides the exception handling for processing a standard web request.
-
forbidden(cause, response = "Forbidden")
A macro to raise an forbidden HTTP exception.
-
get_configuration(env)
A macro to wrap the extraction of request configuration.
-
get_redis(env)
A macro to wrap the extraction of request configuration.
-
handle_exception(env, exception)
A macro to handle catching non-HTTP exceptions.
-
handle_http_exception(env, exception)
A macro to simplify handling HTTPExceptions in code.
-
internal_server_error(cause, response = "Internal Server Error")
A macro to raise an internal server error HTTP exception.
-
not_found(cause, response = "Not Found")
A macro to raise an not found HTTP exception.
-
optional_parameter(name, parameters, alternative = nil, type = String)
A macro to encapsulate handling for optional parameters.
-
required_parameter(name, parameters, type = String)
A macro to encapsulate handling for required parameters.
-
unauthorized(cause, response = "Unauthorized")
A macro to raise an unauthorized HTTP exception.
Method Detail
Loads the application configuration file.
Macro Detail
A macro to raise an bad request HTTP exception.
A macro that encapsulates standard functionality for calling a halt to request processing on a request that has hit a problem.
A macro that provides the exception handling for processing a standard web request.
A macro to raise an internal server error HTTP exception.
A macro to encapsulate handling for optional parameters.
A macro to encapsulate handling for required parameters.
A macro to raise an unauthorized HTTP exception.