require 'rake/testtask' desc 'Clean up generated files' task :clean do sh 'rm -rf *.gem doc/html .yardoc' end desc 'Generate HTML documentation' task :doc do sh 'yardoc --protected --private --output-dir doc/html' end desc "Build the gem" task :build => :clean do sh 'gem build *.gemspec' end desc 'Install the gem locally (user install)' task :install => :build do sh 'gem install --user-install *.gem' end Rake::TestTask.new do |t| t.pattern = 'test/test*.rb' t.libs << 'test' end desc 'Run tests' task :default => :test