Skip to content

Instantly share code, notes, and snippets.

@paulmars
Created October 29, 2014 18:22
Show Gist options
  • Select an option

  • Save paulmars/5a5aa87d763c4aeb2397 to your computer and use it in GitHub Desktop.

Select an option

Save paulmars/5a5aa87d763c4aeb2397 to your computer and use it in GitHub Desktop.
Load pow env variables in dev
# 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