Created
October 29, 2014 18:22
-
-
Save paulmars/5a5aa87d763c4aeb2397 to your computer and use it in GitHub Desktop.
Load pow env variables in dev
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 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? || Rails.env.test? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment