-
Notifications
You must be signed in to change notification settings - Fork 636
Expand file tree
/
Copy pathRakefile
More file actions
43 lines (34 loc) · 1.03 KB
/
Rakefile
File metadata and controls
43 lines (34 loc) · 1.03 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
# Rakefile for rake -*- ruby -*-
# Copyright 2003, 2004, 2005 by Jim Weirich ([email protected])
# All rights reserved.
# This file may be distributed under an MIT style license. See
# MIT-LICENSE for details.
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
begin
require "bundler/gem_tasks"
rescue LoadError
end
require "rake/testtask"
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.verbose = true
t.test_files = FileList["test/**/test_*.rb"]
end
require "rdoc/task"
RDoc::Task.new do |doc|
doc.main = "README.rdoc"
doc.title = "Rake -- Ruby Make"
doc.rdoc_files = FileList.new %w[lib MIT-LICENSE doc/**/*.rdoc *.rdoc]
doc.rdoc_dir = "_site" # for github pages
end
namespace :rdoc do
task :fix_links do
%w[_site/index.html _site/README_rdoc.html].each do |path|
fixed = File.read(path).gsub(%r{href="(doc/[^"]+?)\.rdoc"}, 'href="\1_rdoc.html"')
File.write(path, fixed)
end
end
end
task rdoc: ["rdoc:fix_links"]
task default: :test