public
Description: numbr5 is alive - our friendly #roro bot
Homepage: http://faces.rubyonrails.com.au
Clone URL: git://github.com/lachie/numbr5.git
numbr5 / Capfile
100644 52 lines (41 sloc) 0.841 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
# load 'deploy' if respond_to?(:namespace) # cap2 differentiator
# load 'config/deploy'
 
role :app, "lachie.info"
 
set :app_path, "/home/lachie/numbr5"
 
desc "deploy n5"
task :deploy do
  update_code
  copy_implementation
  restart
end
 
desc "git pull"
task :update_code do
  run "cd #{app_path} ; git pull"
end
 
desc "copies the example implementation to the real implementation"
task :copy_implementation do
  run "cd #{app_path} ; cp ror_au.example.rb ror_au.rb"
end
 
def cmd(cmd)
  "cd #{app_path} ; ./bin/numbr5 #{cmd} -- -n numbr5rc -f ror_au.rb"
end
 
desc "restart"
task :restart do
  run cmd('stop') + " && " + cmd('start')
end
 
desc "status"
task :status do
  run cmd('status')
end
 
desc "start"
task :start do
  run cmd('start')
end
 
desc "stop"
task :stop do
  run cmd('stop')
end
 
desc "cold"
task :cold do
  run cmd('start')
end