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) do |t| t.files = ['lib/*.rb', 'lib/internal_lite3/*.rb'] end task :gem => [:doc] do sh "gem build dbmlite3" sh "JRUBY_GEM=yes 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]