Skip to content
This repository has been archived by the owner on Mar 7, 2020. It is now read-only.

Commit

Permalink
Better Capistrano multistage support (database.yml)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbailey committed Aug 26, 2009
1 parent 3ca5169 commit effc3a8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# deprec changelog

= 2.1.2 (Aug 26, 2009)

* Better support for Capistrano multistage
Look for database.yml in config/#{stage}/database.yml

= 2.1.1 (Aug 25, 2009)

* Added haproxy

= 2.1.0 (Aug 24, 2009)

* Added Collectd
Expand Down
1 change: 0 additions & 1 deletion TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ deprec/TODO.txt

# collectd
+ start on boot (init.d)
+ copy config from mon.failmode to deprec templates
+ install php_collection
- auth
- update config.php
Expand Down
2 changes: 1 addition & 1 deletion deprec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require 'rubygems'

SPEC = Gem::Specification.new do |s|
s.name = 'deprec'
s.version = '2.1.0'
s.version = '2.1.2'

s.authors = ['Mike Bailey']
s.description = <<-EOF
Expand Down
8 changes: 5 additions & 3 deletions lib/deprec/recipes/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,15 @@

desc "Link in the production database.yml"
task :symlink_database_yml, :roles => :app do
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
run "ln -nfs #{shared_path}/config/database.yml #{current_path}/config/database.yml"
end

desc "Copy database.yml to shared/config/database.yml. Useful if not kept in scm"
task :push_database_yml, :roles => :app do
if File.exists?('config/database.yml')
put(File.read('config/database.yml'), "#{shared_path}/config/database.yml")
stage = exists?(:stage) ? fetch(:stage).to_s : ''
full_local_path = File.join('config', stage, 'database.yml')
if File.exists?(full_local_path)
put(File.read(full_local_path), "#{shared_path}/config/database.yml")
end
end

Expand Down

0 comments on commit effc3a8

Please sign in to comment.