From 996deb2d68baff186f8d0f521cd53cdb1f391949 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 26 Jan 2013 01:11:09 +0100 Subject: Fix deploy scripts. --- config/deploy/refinery_setup.rb | 6 ++++-- config/deploy/secret_token.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/deploy/refinery_setup.rb b/config/deploy/refinery_setup.rb index 2ada124..6805dfe 100644 --- a/config/deploy/refinery_setup.rb +++ b/config/deploy/refinery_setup.rb @@ -1,3 +1,5 @@ +require 'securerandom' + unless Capistrano::Configuration.respond_to?(:instance) abort "This extension requires Capistrano 2" end @@ -27,14 +29,14 @@ Capistrano::Configuration.instance.load do EOF run "mkdir -p #{shared_path}/config/refinery" - IO.write("#{shared_path}/config/refinery/core.rb", default_template); + put default_template, "#{shared_path}/config/refinery/core.rb" end desc <<-DESC [internal] Updates the symlink for secret_token.rb file to the just deployed release. DESC task :symlink, :except => { :no_release => true } do - run "ln -nfs #{shared_path}/config/refinery/core.rb #{release_path}/config/refinery/core.rb" + run "ln -nfs #{shared_path}/config/refinery/core.rb #{release_path}/config/initializers/refinery/core.rb" end end diff --git a/config/deploy/secret_token.rb b/config/deploy/secret_token.rb index 80f2cd9..7c11ec0 100644 --- a/config/deploy/secret_token.rb +++ b/config/deploy/secret_token.rb @@ -17,7 +17,7 @@ Capistrano::Configuration.instance.load do EOF run "mkdir -p #{shared_path}/config" - IO.write("#{shared_path}/config/secret_token.rb", default_template); + put default_template, "#{shared_path}/config/secret_token.rb" end desc <<-DESC -- cgit v1.2.3