diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2013-01-26 01:11:09 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2013-01-26 01:11:09 +0100 |
commit | 996deb2d68baff186f8d0f521cd53cdb1f391949 (patch) | |
tree | 868cce543368e4745bc4d5b1c9fc8f7c3e87a016 /config | |
parent | 49ec7b8074d7fafda3c94c89d61d6ffd65c9ccbc (diff) | |
download | hmnoweb-996deb2d68baff186f8d0f521cd53cdb1f391949.tar.gz hmnoweb-996deb2d68baff186f8d0f521cd53cdb1f391949.tar.bz2 hmnoweb-996deb2d68baff186f8d0f521cd53cdb1f391949.zip |
Fix deploy scripts.
Diffstat (limited to 'config')
-rw-r--r-- | config/deploy/refinery_setup.rb | 6 | ||||
-rw-r--r-- | config/deploy/secret_token.rb | 2 |
2 files changed, 5 insertions, 3 deletions
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 |