diaspora/lib/tasks/heroku.rake
2011-09-14 18:46:03 -07:00

11 lines
387 B
Ruby

namespace :heroku do
task :config do
puts "Reading config/application.yml and sending config vars to Heroku..."
CONFIG = YAML.load_file('config/application.yml')['production'] rescue {}
command = "heroku config:add"
CONFIG.each {|key, val| command << " #{key}=#{val} " if val }
command << " HEROKU=true "
command << " DB=postgres "
system command
end
end