Skip to content

Instantly share code, notes, and snippets.

@glennfu
Created March 3, 2016 22:57
Show Gist options
  • Save glennfu/aafd03c21748ee265a5a to your computer and use it in GitHub Desktop.
Save glennfu/aafd03c21748ee265a5a to your computer and use it in GitHub Desktop.
export S3_ENABLED=true
export THIS_THING="asdf"
# initializers/pow.rb
# originally found at this url which no longer exists:
# http://sanguinerane.com/auto-load-powenv-environment-variables/
# Load pow environment variables into development and test environments
if File.exist?(".powenv")
IO.foreach('.powenv') do |line|
next if !line.include?('export') || line.blank?
key, value = line.gsub('export','').split('=',2)
ENV[key.strip] = value.delete('"\'').strip
end
end if Rails.env.development?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment