Created
October 3, 2014 11:24
-
-
Save melnikaite/f0730dc6ade93ec83527 to your computer and use it in GitHub Desktop.
create yml file from ENV variable
This file contains 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
# remove all unused environments from applicationюньд and generate hash | |
ruby -e 'require "yaml"; puts YAML.load(File.read("config/application.yml"))' | |
# run script to create yml file | |
application_yml='{"test"=>{"protocol"=>"https", "host"=>"example.com"}}' ruby -e 'require "yaml"; File.open("config/application.yml", "w") {|f| f.write(eval(ENV["application_yml"]).to_yaml) }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment