aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2013-04-19 19:31:09 +0200
committerHarald Eilertsen <haraldei@anduin.net>2013-04-19 19:31:09 +0200
commit4062a84cb2c9a961201238adce4a5851e377f713 (patch)
treebfed9fae3f4ec5ef9a2249b1d36f8942406db181 /config
parent7f0a41078d24fcf5bef577e74f0d30e02a6af4aa (diff)
downloadhmnoweb-4062a84cb2c9a961201238adce4a5851e377f713.tar.gz
hmnoweb-4062a84cb2c9a961201238adce4a5851e377f713.tar.bz2
hmnoweb-4062a84cb2c9a961201238adce4a5851e377f713.zip
Fix deploy scripts.
Require the scripts in config/deploy directory so they will hook into the deploy process. Fixed deploy:refinery:setup recipe, now produces a valid config and puts it in the right spot.
Diffstat (limited to 'config')
-rw-r--r--config/deploy.rb.example7
-rw-r--r--config/deploy/refinery_setup.rb8
2 files changed, 11 insertions, 4 deletions
diff --git a/config/deploy.rb.example b/config/deploy.rb.example
index 7e10cdb..8d1303d 100644
--- a/config/deploy.rb.example
+++ b/config/deploy.rb.example
@@ -1,5 +1,7 @@
require 'bundler/capistrano'
-require File.join(File.dirname(__FILE__), 'deploy', 'database')
+Dir.glob(File.join(File.dirname(__FILE__), 'deploy', '*.rb')) do |f|
+ require f
+end
set :application, "set your application name here"
set :repository, "set your repository location here"
@@ -7,7 +9,8 @@ set :repository, "set your repository location here"
set :scm, :git
set :branch, 'master' unless exists?(:branch)
-set :deply_to, "path on server"
+set :deploy_to, "path on server"
+set :user, "username on server"
# On FreeBSD uncomment the following lines
#set :use_sudo, false
diff --git a/config/deploy/refinery_setup.rb b/config/deploy/refinery_setup.rb
index da6616a..6dd0a1c 100644
--- a/config/deploy/refinery_setup.rb
+++ b/config/deploy/refinery_setup.rb
@@ -1,4 +1,5 @@
require 'securerandom'
+require 'active_support/inflector'
unless Capistrano::Configuration.respond_to?(:instance)
abort "This extension requires Capistrano 2"
@@ -14,13 +15,16 @@ Capistrano::Configuration.instance.load do
DESC
task :setup, :except => { :no_release => true } do
+ # Change this to your app name
+ site_name = "Beta";
+
default_template = <<-EOF
# encoding: utf-8
Refinery::Core.configure do |config|
config.rescue_not_found = Rails.env.production?
config.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)
- config.site_name = "Company Name"
- config.base_cache_key = #{config.site_name.parameterize('_').to_sym}
+ config.site_name = "#{site_name}"
+ config.base_cache_key = "#{ActiveSupport::Inflector::parameterize(site_name, '_')}"
config.authenticity_token_on_frontend = true
config.dragonfly_secret = "#{SecureRandom.hex(24)}"
config.ie6_upgrade_message_enabled = true