Skip to content

Instantly share code, notes, and snippets.

@muneebaahmad
Created February 20, 2019 21:28
Show Gist options
  • Save muneebaahmad/37d175537993ffc482d698e05ec531c2 to your computer and use it in GitHub Desktop.
Save muneebaahmad/37d175537993ffc482d698e05ec531c2 to your computer and use it in GitHub Desktop.
Converts Heroku configs to a format accepted by .env files
# Converts Heroku configs to a format accepted by .env files
class ConvertToEnv
File.open('sample_env.txt').each do |line|
line = line.sub(':', '=').delete(" \t\r\n")
print "#{line}\n"
end
end
ConvertToEnv.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment