-
Notifications
You must be signed in to change notification settings - Fork 6
/
Rakefile
54 lines (46 loc) · 1.16 KB
/
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
require 'rubygems'
require 'rake'
require 'spec/rake/spectask'
task :default => [:spec]
desc "Install dependencies"
task :dependencies do
require ''
gems = ['addressable/uri', 'treetop']
gems.each do |g|
g2 = g.split('/')[0]
begin
require g
rescue
sh "sudo gem install " + g2
end
end
end
desc "Pushes to git"
task :push do
sh "git push --all"
sh "growlnotify -m \"Updates pushed\" \"Git\""
end
task :spec do
sh "spec --colour spec"
end
desc "Turns spec results into HTML and publish to web (Tom only!)"
task :spec_html do
sh "spec --format html:rena_new_spec.html spec"
sh "scp rena_new_spec.html bbcityco@bbcity.co.uk:www/tom/files/rena_new_spec.html"
sh "rm rena_new_spec.html"
end
desc "Turns spec results into local HTML"
task :spec_local do
sh "spec --format html:rena_new_spec.html spec/"
# sh "open rena_new_spec.html"
end
desc "Run specs through RCov"
Spec::Rake::SpecTask.new('coverage') do |t|
t.spec_files = FileList['spec']
t.rcov = true
t.rcov_opts = ['--exclude', 'spec,test,\/Library\/Ruby\/Gems\/1.8\/gems']
end
desc "Runs specs on JRuby"
task :jspec do
sh "jruby -S `whereis spec` --colour spec"
end