forked from ctrochalakis/resque-mongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
60 lines (45 loc) · 995 Bytes
/
Rakefile
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
53
54
55
56
57
58
59
60
load 'tasks/redis.rake'
$LOAD_PATH.unshift 'lib'
require 'resque/tasks'
def command?(command)
system("type #{command} > /dev/null 2>&1")
end
#
# Tests
#
task :default => :test
desc "Run tests"
task :test do
# Don't use the rake/testtask because it loads a new
# Ruby interpreter - we want to run tests with the current
# `rake` so our library manager still works
Dir['test/*_test.rb'].each do |f|
require f
end
end
desc "Activate kicker - gem install kicker"
task :kick do
exec "kicker -e rake lib test"
end
#
# Install
#
task :install => [ 'redis:install', 'dtach:install' ]
#
# Documentation
#
begin
require 'sdoc_helpers'
rescue LoadError
end
desc "Push a new version to Gemcutter"
task :publish do
require 'resque/version'
sh "gem build resque.gemspec"
sh "gem push resque-#{Resque::Version}.gem"
sh "git tag v#{Resque::Version}"
sh "git push origin v#{Resque::Version}"
sh "git push origin master"
sh "git clean -fd"
exec "rake pages"
end