V2 and MAPS Configuration

V2Master

Introduction

Main configuration items:

  1. Settings
  2. Database access
  3. Message catalogs

Application Settings Variables

Settings Variables

Application configuration are managed with the RailsConfig gem.

The file config/initializers/rails_config.rb (automatically generated when RailsConfig is installed) contains the definition of the top-level variable name for configuration settings. For MAPS and V2 it is set to Settings, as follows:

Settings are be defined as a hash of hashes, they define a hierarchical structure.

We further prefix all MAPS and V2 application configuration settings with the prefix SXS.

Setting Files

Settings are defined in the following files:

  1. General application settings file:
    • config/settings.yml

  2. Environment specific settings files:
    • config/settings/production.yml

    • config/settings/test.yml

    • config/settings/development.yml

  3. Instance specific settings:
    • config/settings.local.yml

  4. Rails also recognizes environment specific configuration files, which we are not using:
    • config/settings/#{environment}.local.yml

    • config/environments/#{environment}.local.yml

The settings variables can be accessed in Ruby code, including access by Ruby code embedded in .erb template files, as follows:

Other Configuration Files

  1. config/application.rb - Application basic settings, probably never needs to be changed

  2. config/database.yml - Defines the application database name and access mechanism

  3. config/authorization_rules.rb - Defines application roles and what controllers and actions they can perform

V2 Configuration

V2 Settings Variables

The following is a complete list of the V2 configuration settings:

Notes:

  1. to be completed

Default V2 Configuration

The following is the contents of config/settings.yml:

Example V2 Local Settings Configuration

The following is the contents of an example config/settings.local.yml file:

MAPS Configuration

MAPS Settings Variables

The following is a complete list of the MAPS configuration settings:

Notes:

  1. Even if SXS.ActionMailer.PerformDeliveries is set to false the other ActionMailer settings must also be set, in order to avoid undefined variable errors when email is sent.

  2. Note the use of lower case in the SXS.ActionMailer.Smtp sub-settings: address and domain. This is because config.action_mailer.smtp_settings requires these names in lower case. See the ActionMailer configuration setup at the end of the files config/environments/*.yml.

Default MAPS Configuration

The following is the contents of config/settings.yml:

Example MAPS Local Settings Configuration

The following is the contents of an example config/settings.local.yml file:

V2MapsConfiguration (last edited 2013-07-16 15:03:07 by vor)

Copyright 2008-2014, SoftXS GmbH, Switzerland