aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Capfile2
-rw-r--r--config/deploy/refinery_setup.rb6
-rw-r--r--config/deploy/secret_token.rb2
3 files changed, 6 insertions, 4 deletions
diff --git a/Capfile b/Capfile
index 6a798eb..b46fd05 100644
--- a/Capfile
+++ b/Capfile
@@ -1,4 +1,4 @@
load 'deploy'
# Uncomment if you are using Rails' asset pipeline
- # load 'deploy/assets'
+load 'deploy/assets'
load 'config/deploy' # remove this line to skip loading any of the default tasks \ No newline at end of file
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