forked from koraktor/rbzip2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
40 lines (32 loc) · 981 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
# -*- encoding: utf-8 -*-
# This code is free software; you can redistribute it and/or modify it under
# the terms of the new BSD License.
#
# Copyright (c) 2011, Sebastian Staudt
require 'rspec/core/rake_task'
require 'rubygems/package_task'
task :default => :spec
task :test => :spec
spec = Gem::Specification.load 'rbzip2.gemspec'
Gem::PackageTask.new(spec) do |pkg|
end
RSpec::Core::RakeTask.new('spec') do |t|
end
begin
require 'yard'
YARD::Rake::YardocTask.new do |yardoc|
yardoc.name = 'doc'
yardoc.files = [ 'lib/**/*.rb', 'LICENSE', 'README.md' ]
yardoc.options = [ '--private', '--title', 'RBzip2 — API Documentation' ]
end
rescue LoadError
desc 'Generate YARD Documentation (not available)'
task :doc do
$stderr.puts 'You need YARD to build the documentation. Install it using `gem install yard`.'
end
end
desc 'Clean documentation and package directories'
task :clean do
FileUtils.rm_rf 'doc'
FileUtils.rm_rf 'pkg'
end