require 'rake' require 'rake/testtask' require 'rake/rdoctask' desc 'Default: run unit tests.' task :default => [:refresh_db, :test] desc 'Remove old sqlite file' task :refresh_db do `rm -f #{File.dirname(__FILE__)}/test/acts_as_url.sqlite3` end desc 'Test the stringex plugin.' Rake::TestTask.new(:test) do |t| t.libs << 'lib' t.pattern = 'test/**/*_test.rb' t.verbose = true end desc 'Generate documentation for the stringex plugin.' Rake::RDocTask.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'doc' rdoc.title = 'Stringex: A String Extension Pack' rdoc.options << '--line-numbers' << '--inline-source' rdoc.options << '--charset' << 'utf-8' rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('lib/**/*.rb') end