Switched to using proper Rake clobbering.

This commit is contained in:
Bob Aman 2011-12-02 16:42:46 +03:00
parent f70943ca40
commit 6205c8e67c
4 changed files with 12 additions and 9 deletions

View File

@ -1,2 +0,0 @@
desc 'Remove all build products'
task 'clobber'

View File

@ -1,4 +1,7 @@
require 'rubygems/package_task' require 'rubygems/package_task'
require 'rake/clean'
CLOBBER.include('pkg')
namespace :gem do namespace :gem do
GEM_SPEC = Gem::Specification.new do |s| GEM_SPEC = Gem::Specification.new do |s|
@ -93,5 +96,3 @@ end
desc 'Alias to gem:package' desc 'Alias to gem:package'
task 'gem' => 'gem:package' task 'gem' => 'gem:package'
task 'clobber' => ['gem:clobber_package']

View File

@ -1,4 +1,7 @@
require 'spec/rake/verify_rcov' require 'spec/rake/verify_rcov'
require 'rake/clean'
CLOBBER.include('coverage', 'specdoc')
namespace :spec do namespace :spec do
Spec::Rake::SpecTask.new(:rcov) do |t| Spec::Rake::SpecTask.new(:rcov) do |t|
@ -79,5 +82,3 @@ else
desc 'Alias to spec:all' desc 'Alias to spec:all'
task 'spec' => 'spec:all' task 'spec' => 'spec:all'
end end
task 'clobber' => ['spec:clobber_rcov']

View File

@ -1,4 +1,8 @@
require 'rake' require 'rake'
require 'rake/clean'
CLOBBER.include('doc', '.yardoc')
CLOBBER.uniq!
begin begin
require 'yard' require 'yard'
@ -10,13 +14,12 @@ begin
yardoc.name = 'yard' yardoc.name = 'yard'
yardoc.options = ['--verbose'] yardoc.options = ['--verbose']
yardoc.files = [ yardoc.files = [
'lib/**/*.rb', 'ext/**/*.c', '-', 'README.md', 'CHANGELOG', 'LICENSE' 'lib/**/*.rb', 'ext/**/*.c', '-',
'README.md', 'CHANGELOG.md', 'LICENSE'
] ]
end end
end end
task 'clobber' => ['doc:clobber_yard']
desc 'Alias to doc:yard' desc 'Alias to doc:yard'
task 'doc' => 'doc:yard' task 'doc' => 'doc:yard'
rescue LoadError rescue LoadError