enum Azu::Environment

Overview

Allows to test which environment Azu is running in.

The current application environment is determined via the CRYSTAL_ENV variable from your .env file.

Defined in:

azu/environment.cr

Enum Members

Build = 0

Build environment ideal for building images and compiling

Development = 1

Development environment normally developer local development computer

Test = 2

Test environment for running unit tests and component integration tests

Integration = 3

Integration environment for running integration tests across network

Acceptance = 4

Acceptance/System test environment to evaluate the system's compliance with the business requirements and assess whether it is acceptable for delivery

Pipeline = 5

For running in a pipeline environment

Staging = 6

Staging environment nearly exact replica of a production environment for software testing

Production = 7

where software and other products are actually put into operation for their intended uses by end users

Instance Method Summary

Instance Method Detail

def acceptance? #

[View source]
def build? #

[View source]
def development? #

[View source]
def in?(environments : Array(Symbol)) #

Checks if the current environment is in any of the environment listed


[View source]
def in?(*environments : Environment) #

Checks if the current environment matches another environment


[View source]
def integration? #

[View source]
def pipeline? #

[View source]
def production? #

[View source]
def staging? #

[View source]
def test? #

[View source]