7May

Capistrano task to sync local comatose pages to production

I'm using the comatose gem as a light-weight cms for an app I'm building. There's always the problem with CMS based sites of having the production site not look like the development site. So here's a capistrano task to pull the production pages down to your local machine.

Enjoy.


desc "Retrieve production comatose pages"
task :get_comatose_pages do
  run "cd #{current_path}; rake RAILS_ENV=production comatose:data:export"
  system "scp #{user}@#{domain}:#{current_path}/db/comatose-pages.yml db/"
  system "rake comatose:data:import"
end

Leave a comment