module RConfig::Constants

Constants

CNF_FILE_TYPES

conf, properties => <key=value> based config files

CONFIG_FILE_TYPES

The type of file used for config. Valid choices include (yml, yaml, xml, conf, config, properties)

CONFIG_ROOT

Sets CONFIG_ROOT to RAILS_ROOT/config unless it has already been defined (i.e. in rails env, or calling ruby app).

EMPTY_ARRAY

Used in place of undefined but expected arrays, to prevent creating a bunch of unecesary arrays in memory. See ConfigCore.fire_on_load

ENV_TIER

ENV TIER i.e. (development, integration, staging, or production) Defaults to Rails.env (or RAILS_ENV) if running in Rails, otherwise, it checks ENV for 'RACK_ENV', or 'CONFIG_ENV'. If neither is present, it assumes production. In apps that are not Rails or Rack-based, CONFIG_ENV can be set to provide RConfig with a environment other than prodution.

HOSTNAME

Use CONFIG_HOSTNAME environment variable to test host-based configurations.

HOSTNAME_SHORT

Short Hostname: removes all chars from HOSTNAME, after first “.” Used to specify machine-specific config files.

SUFFIXES

This is an array of filename suffixes facilitates cascading configuration overrides (i.e. 'services_local', 'services_development'). These files get loaded in the order of the array. Meaning the last file loaded overrides everything before it. So config files suffixed with hostname has the highest precedence, and therefore overrides everything. Example:

database_local.yml overrides database.yml
database_staging.yml overrides database_local.yml
database_appsvr01.yml overrides database_integration.yml
XML_FILE_TYPES

xml => self-explanatory

YML_FILE_TYPES

yml, yaml => yaml files, parsable by YAML library