Changeset 112

Show
Ignore:
Timestamp:
06/28/07 11:22:14 (2 years ago)
Author:
mbailey
Message:

if you don't keep database.yml in source control and want to have it symlinked after you deploy put the following into deploy.rb

set :generate_database_yml, false

You can generate shared/config/database.yml with
'cap generate_database_yml'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1-7-stable/lib/deprec/generators/deprec/templates/deploy.rb

    r86 r112  
    3434# Automatically symlink these directories from current/public to shared/public. 
    3535# set :app_symlinks, %w{photo, document, asset} 
     36 
     37# ============================================================================= 
     38# SPECIAL OPTIONS 
     39# ============================================================================= 
     40# These options allow you to tweak deprec behaviour 
     41 
     42# If you do not keep database.yml in source control, set this to false. 
     43# After new code is deployed, deprec will symlink current/config/database.yml  
     44# to shared/config/database.yml 
     45# 
     46# You can generate shared/config/database.yml with 'cap generate_database_yml' 
     47# 
     48# set :database_yml_in_scm, true 
    3649 
    3750# ============================================================================= 
  • branches/1-7-stable/lib/deprec/recipes/rails.rb

    r105 r112  
    11Capistrano.configuration(:must_exist).load do 
     2   
     3  set :database_yml_in_scm, true 
    24 
    35  # database.yml stuff 
     
    3335 
    3436 
    35   task :gen_db_yml, :roles => :app do     
     37  task :generate_database_yml, :roles => :app do     
    3638    database_configuration = render :template => <<-EOF 
    3739#{rails_env}: 
     
    4850   
    4951  task :after_update_code, :roles => :app do 
    50     symlink_database_yml 
     52    symlink_database_yml unless database_yml_in_scm 
    5153  end 
    5254