forked from kaspergrubbe/ruby-vnc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
53 lines (44 loc) · 1.14 KB
/
Copy pathRakefile
File metadata and controls
53 lines (44 loc) · 1.14 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
require 'rake'
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'
spec = eval File.read('ruby-vnc.gemspec')
task :default => :spec
desc 'Run all specs'
Spec::Rake::SpecTask.new :spec do |t|
t.spec_opts = ['--format specdoc --colour']
end
desc 'Run all specs and generate html spec document'
namespace :spec do
Spec::Rake::SpecTask.new :html do |t|
t.spec_opts = ['--format html:spec.html']
end
end
desc 'Run all specs and generate coverage'
Spec::Rake::SpecTask.new :rcov do |t|
t.rcov = true
t.rcov_opts = ['--exclude', 'spec']
t.rcov_opts << '--xrefs'
t.rcov_opts << '--text-report'
end
namespace :rcov do
RCov::VerifyTask.new :verify => :rcov do |t|
t.threshold = 100.0
t.index_html = 'coverage/index.html'
end
end
Rake::RDocTask.new do |t|
t.rdoc_dir = 'doc'
t.rdoc_files.include 'lib/**/*.rb'
t.rdoc_files.include 'README'
t.title = "#{PKG_NAME} documentation"
t.options += %w[--line-numbers --inline-source --tab-width 2]
t.main = 'README'
end
Rake::GemPackageTask.new(spec) do |t|
t.gem_spec = spec
t.need_tar = false
t.need_zip = false
t.package_dir = 'build'
end