diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2014-06-20 19:56:29 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2014-06-20 19:56:29 +0200 |
commit | 5058ef3e041e9e1b8ed1c5cf74b0441cf5d3c9cd (patch) | |
tree | 8669a50e0e91b7adb08f7b165e707b9e1045360e /config/deploy/refinery_setup.rb | |
parent | 84de1a7117742463138c188a4d2c9e2b2e814fef (diff) | |
download | hmnoweb-5058ef3e041e9e1b8ed1c5cf74b0441cf5d3c9cd.tar.gz hmnoweb-5058ef3e041e9e1b8ed1c5cf74b0441cf5d3c9cd.tar.bz2 hmnoweb-5058ef3e041e9e1b8ed1c5cf74b0441cf5d3c9cd.zip |
Remove old capistrano config.
Diffstat (limited to 'config/deploy/refinery_setup.rb')
-rw-r--r-- | config/deploy/refinery_setup.rb | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/config/deploy/refinery_setup.rb b/config/deploy/refinery_setup.rb deleted file mode 100644 index 69c75b4..0000000 --- a/config/deploy/refinery_setup.rb +++ /dev/null @@ -1,53 +0,0 @@ -require 'securerandom' -require 'active_support/inflector' - -unless Capistrano::Configuration.respond_to?(:instance) - abort "This extension requires Capistrano 2" -end - -Capistrano::Configuration.instance.load do - - namespace :deploy do - namespace :refinery do - - desc <<-DESC - Creates the refinery core config for the application. - DESC - task :setup, :except => { :no_release => true } do - - # Change this to your app name - site_name = "Heavymetal.no"; - - 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 = "#{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 - config.show_internet_explorer_upgrade_message = false - config.menu_hide_children = true - end - EOF - - run "mkdir -p #{shared_path}/config/refinery" - 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/initializers/refinery/core.rb" - end - - end - - after "deploy:setup", "deploy:refinery:setup" unless fetch(:skip_refinery_setup, false) - after "deploy:finalize_update", "deploy:refinery:symlink" - end - -end |