forked from ruby/rake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
41 lines (32 loc) · 1023 Bytes
/
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
# 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)
# XXX: https://github.com/bundler/bundler/pull/4981
require "bundler/plugin/api/source"
require "bundler/gem_tasks"
require "rake/testtask"
require "rdoc/task"
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.verbose = true
t.test_files = FileList["test/**/test_*.rb"]
end
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 = "html"
end
task ghpages: :rdoc do
`git checkout gh-pages`
require "fileutils"
FileUtils.rm_rf "/tmp/html"
FileUtils.mv "html", "/tmp"
FileUtils.rm_rf "*"
FileUtils.cp_r Dir.glob("/tmp/html/*"), "."
end
task default: :test