Created
April 16, 2011 04:29
-
-
Save dewski/922868 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load application configuration | |
require 'ostruct' | |
require 'yaml' | |
config_path = File.expand_path('config/settings.yml', Rails.root) | |
begin | |
config = YAML.load_file(config_path) | |
rescue Errno::ENOENT | |
raise "Make sure the settings file #{config_path} exists." | |
end | |
Settings = OpenStruct.new(config[Rails.env]) | |
# Settings.email['webmaster'] # => [email protected] | |
# Settings.fb_app_id # => 12334155661 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults: &defaults | |
host: 'localhost' | |
fb_app_id: 12334155661 | |
email: | |
webmaster: '[email protected]' | |
careers: '[email protected]' | |
development: | |
<<: *defaults | |
host: 'bkwld.dev' | |
staging: | |
<<: *defaults | |
host: 'staging.bkwld.com' | |
test: | |
<<: *defaults | |
production: | |
<<: *defaults | |
host: 'bkwld.com' | |
fb_app_id: 12345678910 | |
email: | |
webmaster: '[email protected]' | |
careers: '[email protected]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment