public
Fork of technoweenie/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/replicant/mephisto.git
Search Repo:
added .ds_store to the ignore list
replicant (author)
Sun Mar 23 23:24:30 -0700 2008
commit  92d258ed3d19bac6a675b9440154de70d36cf4b4
tree    90cfaadb992b8420559d95b5e1d22785154d76d6
parent  d57d5d549d8c5958a05ad81c26f551326890ddd6
...
3
4
5
 
6
...
3
4
5
6
7
0
@@ -3,3 +3,4 @@ config/database.yml
0
 log
0
 tmp
0
 themes/*
0
+.DS_Store
0
\ No newline at end of file
...
9
10
11
 
12
13
14
 
 
15
16
17
...
34
35
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
38
...
9
10
11
12
13
14
15
16
17
18
19
20
...
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
0
@@ -9,9 +9,12 @@ set :gems_for_project, %w(tzinfo mini_magick) # list of gems to be installed
0
 set :shared_dirs, %w(public/cache public/assets themes)
0
 
0
 set :scm, :git
0
+#set :scm, "git"
0
 set :repository, "git@github.com:replicant/mephisto.git"
0
 set :branch, "origin/master"
0
 set :deploy_via, :remote_cache
0
+set :scm_passphrase, ""
0
+
0
 default_run_options[:pty] = true
0
 
0
 role :app, domain
0
@@ -34,4 +37,30 @@ namespace :deploy do
0
     top.deprec.mongrel.restart
0
   end
0
   
0
+ db_params = {
0
+ "adapter"=>"mysql",
0
+ "database"=>"#{application}_#{rails_env}",
0
+ "username"=>"root",
0
+ "password"=>"",
0
+ "host"=>"localhost",
0
+ "socket"=>""
0
+ }
0
+
0
+ db_params.each do |param, default_val|
0
+ set "db_#{param}".to_sym,
0
+ lambda { Capistrano::CLI.ui.ask "Enter database #{param}" do |q| q.default=default_val end}
0
+ end
0
+
0
+ task :my_generate_database_yml, :roles => :app do
0
+ database_configuration = "#{rails_env}:\n"
0
+ db_params.each do |param, default_val|
0
+ val=self.send("db_#{param}")
0
+ database_configuration<<" #{param}: #{val}\n"
0
+ end
0
+ run "mkdir -p #{deploy_to}/#{shared_dir}/config"
0
+ put database_configuration, "#{deploy_to}/#{shared_dir}/config/database.yml"
0
+ end
0
+
0
+
0
+
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.