public
Last active

  • Download Gist
amazon_s3.yml
YAML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# put following info at ~/config/app_config.yml
common:
s3_bucket_name: _enter_bucket_name_for_your_app_
s3_access_key_id: _enter_s3_access_key_id_
s3_secret_access_key: _enter_s3_secret_access_key_
 
 
# put following code as ~/config/initializers/001_app_congfig.rb
require 'ostruct'
require 'yaml'
 
appconfig = OpenStruct.new(YAML.load_file("#{Rails.root}/config/app_config.yml"))
env_config = appconfig.send(Rails.env) rescue nil
 
appconfig.common.update(env_config) unless env_config.nil?
 
AppConfig = OpenStruct.new(appconfig.common)
 
 

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.