Permalink
Browse files

fix some issues with deploy

  • Loading branch information...
danielvlopes committed Sep 20, 2010
1 parent a823781 commit 11755214e1ec7e2a4e837cdba97c1b93d2379f0e
Showing with 24 additions and 45 deletions.
  1. +2 −1 Capfile
  2. +15 −15 config/deploy/recipes/setup.rb
  3. +7 −29 template.rb
View
@@ -2,6 +2,7 @@ require 'bundler/capistrano'
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+
load 'config/deploy'
-Dir['config/recipes/*.rb'].each { |recipe| load(recipe) }
+Dir['config/deploy/recipes/*.rb'].each { |recipe| load(recipe) }
@@ -1,5 +1,5 @@
namespace :deploy do
- namespace :setup do
+ namespace :config do
namespace :mail do
desc "Write smtp.rb on shared"
@@ -80,12 +80,12 @@
or /config/deploy folders. The default template matches \
the template for config/database.yml file shipped with Rails.
- When this recipe is loaded, db:setup is automatically configured \
- to be invoked after deploy:setup. You can skip this task setting \
- the variable :skip_db_setup to true. This is especially useful \
- if you are using this recipe in combination with \
- capistrano-ext/multistaging to avoid multiple db:setup calls \
- when running deploy:setup for all stages one by one.
+ When this recipe is loaded, db:setup is automatically configured \
+ to be invoked after deploy:setup. You can skip this task setting \
+ the variable :skip_db_setup to true. This is especially useful \
+ if you are using this recipe in combination with \
+ capistrano-ext/multistaging to avoid multiple db:setup calls \
+ when running deploy:setup for all stages one by one.
DESC
task :create, :except => { :no_release => true } do
@@ -125,15 +125,15 @@
end
after "deploy:setup" do
- deploy.setup.mail.create unless fetch(:skip_mail_setup, false)
- deploy.setup.newrelic.create unless fetch(:skip_newrelic_setup, false)
- deploy.setup.hoptoad.create unless fetch(:skip_hoptoad_setup, false)
- deploy.setup.db.create unless fetch(:skip_db_setup, false)
+ deploy.config.mail.create unless fetch(:skip_mail_setup, false)
+ deploy.config.newrelic.create unless fetch(:skip_newrelic_setup, false)
+ deploy.config.hoptoad.create unless fetch(:skip_hoptoad_setup, false)
+ deploy.config.db.create unless fetch(:skip_db_setup, false)
end
after "deploy:finalize_update" do
- deploy.setup.newrelic.symlink
- deploy.setup.mail.symlink
- deploy.setup.hoptoad.symlink
- deploy.setup.db.symlink
+ deploy.config.newrelic.symlink
+ deploy.config.mail.symlink
+ deploy.config.hoptoad.symlink
+ deploy.config.db.symlink
end
View
@@ -7,23 +7,23 @@ def base_app_url
end
# bundler
-run "rm -Rf Gemfile"
-get_file "Gemfile"
-run "bundle install"
+# run "rm -Rf Gemfile"
+# get_file "Gemfile"
+# run "bundle install"
# capistrano
get_file "Capfile"
get_file "config/deploy.rb"
-run "mkdir config/deploy/templates"
+run "mkdir -p config/deploy/templates"
get_file "config/deploy/templates/database.yml.erb"
get_file "config/deploy/templates/hoptoad.rb.erb"
get_file "config/deploy/templates/maintenance.html.erb"
get_file "config/deploy/templates/newrelic.yml.erb"
get_file "config/deploy/templates/smtp.rb.erb"
-run "mkdir config/deploy/recipes"
+run "mkdir -p config/deploy/recipes"
get_file "config/deploy/recipes/log.rb"
get_file "config/deploy/recipes/setup.rb"
@@ -32,8 +32,6 @@ def base_app_url
# other downloads
get_file "config/locales/pt-BR.yml"
-get_file "lib/backup.rb"
-get_file "app/views/layouts/maintenance.html.erb"
get_file "app/views/layouts/application.html.erb"
get_file "app/helpers/application_helper.rb"
@@ -61,11 +59,11 @@ def base_app_url
run "mkdir public/javascripts/app public/javascripts/vendor"
get_file "public/javascripts/vendor/PIE.htc"
-get_file "public/javascripts/vendor/png.fix"
+get_file "public/javascripts/vendor/pngfix.js"
get_file "public/javascripts/vendor/jquery.placeholder.js"
# scaffold customization
-run "mkdir lib/templates/rails/scaffold_controller"
+run "mkdir -p lib/templates/rails/scaffold_controller"
get_file "lib/templates/rails/scaffold_controller/controller.rb"
# test
@@ -80,26 +78,6 @@ def base_app_url
GENERATORS
# git
-run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
-file '.gitignore', <<-END
-config/database.yml
-db/schema.rb
-db/schema.sql
-coverage/*
-doc/*
-log/*.log
-log/*.out
-log/*.pid
-tmp/**/*
-tmp/.*
-tmp/profile*
-uploads/*
-vendor/**/**/doc/*
-.DS_Store
-.project
-ssl/*
-Icon?
-END
git :init
git :add => '.'

0 comments on commit 1175521

Please sign in to comment.