require 'rake' require 'rspec/core/rake_task' require 'yard' RSpec::Core::RakeTask.new(:test) do |t| t.pattern = Dir.glob('spec/*_spec.rb') end YARD::Rake::YardocTask.new(:docs_via_yard) task :gem => [:doc] do gem_prefix = "JRUBY_GEM=yes " if RUBY_PLATFORM == "java" sh "#{gem_prefix}gem build dbmlite3" end task :clean do gems = Dir.glob("dbmlite3*.gem") rm gems if gems.size > 0 rm_rf "doc" end task :clobber => [:clean] do rm_rf ".yardoc" end task :doc => :docs_via_yard task :default => [:doc, :test, :gem]