Skip to content

Gem simplify configs in CG Projects.

Notifications You must be signed in to change notification settings

cgservices/cg_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CG Config

Gem simplify configs in CG Projects.

Installation

In Gemfile

gem 'cg_config', :git => "[email protected]:cgservices/cg_config.git"

Usage

The gem looks in config/yml for all yml files and loads them into CgConfig::[FILENAME] as a hash with symbols as keys

Yml files

If the yml file contains the Rails environment as the first key then the config is loaded by environment, otherwise the config is loaded as a whole.

Example my_config.yml

development:
  url: www.myurl.com
  username: myname
  password: mysecretpassword
production:
  url: www.myproductionurl.com
  username: myothername
  password: mysupersecretpassword

Example usage

CgConfig::MY_CONFIG[:url]

Planned for the future

Cg_config looks in config/yml for the yml files Next step is to make the folder configurable by setting CgConfig::CG_CONFIG_FOLDER

About

Gem simplify configs in CG Projects.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages