Permalink
Newer
Older
100644 37 lines (29 sloc) 777 Bytes
1
task :default => :test
Michel Martens & Damian Janowski
Sep 22, 2010
2
3
task :test do
4
require "cutest"
5
6
Cutest.run(Dir["test/**/*.rb"])
Michel Martens & Damian Janowski
Sep 22, 2010
7
end
8
9
task :formatting do
10
require "cutest"
11
12
Cutest.run(Dir["test/formatting.rb"])
13
end
14
Sep 23, 2010
15
task :update do
16
sh "rm -rf redis-doc"
17
sh "git clone -q --depth 1 git://github.com/antirez/redis-doc.git"
18
sh "rm -rf redis-doc/.git"
Michel Martens & Damian Janowski
Sep 22, 2010
19
end
Dec 21, 2010
21
desc "Deploy"
22
task :deploy do
Dec 21, 2010
23
script = <<-EOS
24
cd ~/redis-doc
25
git pull
26
cd ~/redis-io
27
git pull
28
rvm 1.9.2 gem install dep --no-ri --no-rdoc
29
(rvm 1.9.2 exec dep check || rvm 1.9.2 exec dep install)
30
rvm 1.9.2 exec compass compile -c config/sass.rb views/styles.sass
Dec 21, 2010
31
kill -s INT $(cat log/redis-io.pid)
Jun 28, 2011
32
rvm 1.9.2 exec unicorn -D -c unicorn.rb -E production
Dec 21, 2010
33
EOS
34
35
sh "ssh redis-io '#{script.split("\n").map(&:strip).join(" && ")}'"
36
end