Permalink
Browse files

set user-overridable defaults

  • Loading branch information...
1 parent a0d122e commit b45dd70ba98c31e6ad412e566b681a93e0d89bbf @tilsammans committed Aug 4, 2011
Showing with 7 additions and 12 deletions.
  1. +7 −12 lib/capistrano/transmit.rb
View
@@ -3,6 +3,13 @@
end
Capistrano::Configuration.instance.load do
+
+ _cset :user, ""
+ _cset :db_config { capture "cat #{current_path}/config/database.yml" }
+ _cset :db_remote { YAML::load(db_config)['production'] }
+ _cset :db_local { YAML::load_file("config/database.yml")['development'] }
+ _cset :dumpfile { "#{current_path}/tmp/#{db_remote['database']}.sql.gz" }
+
after "transmit:get:mysql", "transmit:cleanup"
after "transmit:put:mysql", "transmit:cleanup"
@@ -38,16 +45,4 @@
end
end
- set(:db_remote) do
- db_config = capture "cat #{current_path}/config/database.yml"
- YAML::load(db_config)['production']
- end
-
- set(:db_local) do
- YAML::load_file("config/database.yml")['development']
- end
-
- set :dumpfile do
- "#{current_path}/tmp/#{db_remote['database']}.sql.gz"
- end
end

0 comments on commit b45dd70

Please sign in to comment.