forked from davetron5000/gli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
54 lines (43 loc) · 1.03 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 'rake/clean'
require 'hanna/rdoctask'
require 'rcov/rcovtask'
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/testtask'
$: << '../grancher/lib'
begin
require 'grancher/task'
Grancher::Task.new do |g|
g.branch = 'gh-pages'
g.push_to = 'origin'
g.directory 'html'
end
rescue LoadError
#puts "you may install the optional gem 'grancher'"
end
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
rd.title = 'Git Like Interface'
end
spec = eval(File.read('gli.gemspec'))
Rake::GemPackageTask.new(spec) do |pkg|
end
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/tc_*.rb']
end
task :clobber_coverage do
rm_rf "coverage"
end
desc 'Measures test coverage'
task :coverage => :rcov do
system("open coverage/index.html") if PLATFORM['darwin']
rm output_yaml
end
Rcov::RcovTask.new do |t|
t.libs << 'lib'
t.test_files = FileList['test/tc_*.rb']
end
task :default => :test
task :publish_rdoc => [:rdoc,:publish]