$:.unshift "lib" if File.directory? "lib" require 'rcov/rcovtask' require 'rake/testtask' require 'rake/rdoctask' # NOTE: this will not do anything until you add some tests desc "Create a cross-referenced code coverage report." Rcov::RcovTask.new do |t| t.test_files = FileList['test/test*.rb'] t.ruby_opts << "-Ilib" # in order to use this rcov t.rcov_opts << "--xrefs" # comment to disable cross-references t.verbose = true end desc "Run the unit tests." Rake::TestTask.new(:test) do |t| t.test_files = FileList['test/test*.rb'] t.verbose = true end task :default => :test desc "Generate rdoc documentation" Rake::RDocTask.new("rdoc") { |rdoc| rdoc.rdoc_dir = 'doc' rdoc.title = "ruby-ixp" rdoc.options << "--line-numbers" << "--inline-source" rdoc.rdoc_files.include('lib/**/*.rb') } # {{{ Package tasks PKG_REVISION = ".0" PKG_FILES = FileList[ "lib/**/*.rb", "COPYING", "Rakefile" ] RUBY_IXP_VERSION = "0.1" begin require 'rake/gempackagetask' Spec = Gem::Specification.new do |s| s.name = "ruby-ixp" s.version = RUBY_IXP_VERSION + PKG_REVISION s.summary = "Lightweight 9P2000 library written in pure-Ruby." s.description = < [:test] # uncomment to run the tests before packaging Rake::GemPackageTask.new(Spec) do |p| p.need_tar = true end rescue LoadError # RubyGems not available, no :package task. end # vim: set sw=2 ft=ruby: