Created
June 5, 2009 15:40
-
-
Save mikehale/124332 to your computer and use it in GitHub Desktop.
db:clone_to_local Thanks engineyard!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # require this file from your deploy.rb and you'll be able to db:clone_to_local | |
| require 'eycap' | |
| namespace :db do | |
| task :yml do | |
| set :database_yml, YAML.load(capture("cat #{shared_path}/config/database.yml"))[rails_env] | |
| end | |
| end | |
| before "db:backup_name", "db:yml" | |
| set(:environment_database) { database_yml['database'] } | |
| set(:environment_dbhost) { database_yml['host'] } | |
| set(:dbuser) { database_yml['username'] } | |
| set(:dbpass) { database_yml['password'] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment