Browse files

minor refinements to deploy.rb and adding yaml_db gem to help dump da…

…tabase to a yaml file
  • Loading branch information...
1 parent f6aa1b3 commit 72fc478a39de76ab73695b4cf25561370ac420e8 @helabed committed Aug 13, 2011
View
2 Gemfile
@@ -16,6 +16,8 @@ gem 'faker'
gem 'carrierwave'
gem 'rmagick'
+gem 'yaml_db'
+
group :production do
gem 'mysql2'
end
View
2 Gemfile.lock
@@ -178,6 +178,7 @@ GEM
wirble (0.1.3)
xpath (0.1.4)
nokogiri (~> 1.3)
+ yaml_db (0.2.1)
PLATFORMS
ruby
@@ -211,3 +212,4 @@ DEPENDENCIES
web-app-theme
will_paginate (= 3.0.pre2)
wirble
+ yaml_db
View
4 config/deploy.rb
@@ -16,14 +16,14 @@
# ============================================================================================================
# Use 'cap staging db:remote_db_runner' to get a copy of the data.yml and schema.rb files in 'db/staging/'
-# Use 'cap production db:remote_db_runner' to get a copy of the data.yml and schema.rb files in 'db/secure/'
+# Use 'cap production db:remote_db_runner' to get a copy of the data.yml and schema.rb files in 'db/prod/'
# ============================================================================================================
namespace :db do
desc 'Dumps the database to db/data.yml on the remote server'
task :remote_db_dump, :roles => :db, :only => { :primary => true } do
run "cd #{deploy_to}/#{current_dir} && " +
- "rake RAILS_ENV=#{rails_env} db:dump --trace"
+ "rake RAILS_ENV=#{rails_env} db:data:dump --trace"
run "cd #{deploy_to}/#{current_dir}/db/ && " +
" tar -cvzf #{timestamped_data_file_name} data.yml && " +
View
0 db/prod/CONTENT_MOVED_TO__bem_data__db_schema_and_yml_dump_backups
No changes.
View
0 db/staging/CONTENT_MOVED_TO__bem_data__db_schema_and_yml_dump_backups
No changes.
View
BIN vendor/cache/yaml_db-0.2.1.gem
Binary file not shown.

0 comments on commit 72fc478

Please sign in to comment.