-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
51 lines (38 loc) · 1.09 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
require 'rubygems'
require 'rake'
load 'lax.gemspec'
# ----- Packaging -----
require 'rake/gempackagetask'
Rake::GemPackageTask.new(LaxSpec) do |pkg|
end
desc "Install Lax as a gem."
task :install => [:package] do
sudo = RUBY_PLATFORM =~ /win32/ ? '' : 'sudo'
sh %{#{sudo} gem install --no-ri pkg/#{NAME}-#{GEM_VERSION}}
end
# ----- Documentation -----
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
rdoc.title = 'Lax'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include(*FileList.new('*') do |list|
list.exclude(/(^|[^.a-z])[a-z]+/)
list.exclude('TODO')
end.to_a)
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.rdoc_files.exclude('TODO')
rdoc.rdoc_dir = 'rdoc'
rdoc.main = 'README.rdoc'
end
# ----- Coverage -----
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
t.test_files = FileList['test/test.rb']
t.rcov_opts << '-x' << '"^\/"'
if ENV['NON_NATIVE']
t.rcov_opts << "--no-rcovrt"
end
t.verbose = true
end
rescue LoadError; end