forked from cbeer/pairtree
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
37 lines (32 loc) · 897 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
require "rubygems"
require "bundler"
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
warn e.message
warn "Run `bundle install` to install missing gems"
exit e.status_code
end
Bundler::GemHelper.install_tasks
require "rake"
require "rspec"
require "rspec/core/rake_task"
desc "Default: run specs."
task default: :spec
# Use yard to build docs
begin
require "yard"
require "yard/rake/yardoc_task"
project_root = __dir__
doc_destination = File.join(project_root, "doc")
YARD::Rake::YardocTask.new(:doc) do |yt|
yt.files = Dir.glob(File.join(project_root, "lib", "**", "*.rb")) +
[File.join(project_root, "README.md")]
yt.options = ["--output-dir", doc_destination, "--readme", "README.md"]
end
rescue LoadError
desc "Generate YARD Documentation"
task :doc do
abort "Please install the YARD gem to generate rdoc."
end
end