public
Description: OneBody is web-based software that connects community members, especially churches, on the web.
Homepage: http://beonebody.com
Clone URL: git://github.com/seven1m/onebody.git
Clean up setup cap recipe.
Tim Morgan (author)
Sun Aug 17 19:16:36 -0700 2008
commit  c4fb08d8cb3a4820dd57af438f906c061078817d
tree    cdaf23717810fa701d44b471f7c45999bfe378cb
parent  e14a3a39fdaece81684f1df6ceab5ec67f3117c1
...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
 
 
 
 
 
 
 
56
57
 
58
 
 
 
 
 
59
...
19
20
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
0
@@ -19,41 +19,22 @@ namespace :deploy do
0
       run "mkdir -p #{shared_path}/themes"
0
     end
0
     after 'deploy:setup', 'deploy:shared:setup'
0
-
0
-    desc 'Create MySQL database and grant user privileges'
0
-    task :mysql, :roles => :db do
0
-      run "mysql -u root -e \"create database onebody; grant all on onebody.* to onebody@localhost identified by '#{get_db_password}'\""
0
-      yml = render_erb_template(File.dirname(__FILE__) + '/templates/database.yml')
0
-      put yml, "#{shared_path}/config/database.yml"
0
-    end
0
-    after 'deploy:shared:setup', 'deploy:shared:mysql'
0
-    
0
-    desc 'Point certain OneBody globals to the shared path'
0
-    task :point_db_dirs do
0
-      rb = render_erb_template(File.dirname(__FILE__) + '/templates/links.rb')
0
-      put rb, "#{release_path}/config/initializers/links.rb"
0
-    end
0
-    after 'deploy:update_code', 'deploy:shared:point_db_dirs'
0
     
0
-    desc 'Copy public files to the shared public path'
0
-    task :update_public_files do
0
-      run "cp -r #{release_path}/public/* #{shared_path}/public/"
0
-    end
0
-    after 'deploy:update_code', 'deploy:shared:update_public_files'
0
-
0
-    desc 'Symlink certain files to the shared path'
0
-    task :create_symlinks do
0
-      run "ln -sf #{shared_path}/config/database.yml #{release_path}/config/database.yml"
0
-    end
0
-    after 'deploy:shared:update_public_files', 'deploy:shared:create_symlinks'
0
-    
0
-    desc 'Install/update gem dependencies'
0
-    task :update_dependencies do
0
-      run "cd #{release_path} && sudo rake gems:install"
0
-    end
0
-    after 'deploy:shared:create_symlinks', 'deploy:shared:update_dependencies'
0
-
0
+  end
0
+  
0
+  task :after_setup do
0
+    run "cd #{release_path}"
0
+    sudo "rake gems:install"
0
+    run "mysql -u root -e \"create database onebody; grant all on onebody.* to onebody@localhost identified by '#{get_db_password}'\""
0
+    yml = render_erb_template(File.dirname(__FILE__) + '/templates/database.yml')
0
+    put yml, "#{shared_path}/config/database.yml"
0
   end
0
 
0
+end
0
 
0
+task :after_deploy do
0
+  rb = render_erb_template(File.dirname(__FILE__) + '/templates/links.rb')
0
+  put rb, "#{release_path}/config/initializers/links.rb"
0
+  run "cp -r #{release_path}/public/* #{shared_path}/public/"
0
+  run "ln -sf #{shared_path}/config/database.yml #{release_path}/config/database.yml"
0
 end

Comments