Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1bf04da10c
Fetching contributors…

Cannot retrieve contributors at this time

executable file 54 lines (45 sloc) 1.439 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

$VERBOSE = nil

require 'code_statistics'

desc "Run all tests"
task :default => [ :test_units, :test_functional ]

desc "Generate API documentation, and show coding stats"
task :doc => [ :stats, :appdoc ]

desc "run unit tests in test/unit"
Rake::TestTask.new("test_units") { |t|
  t.libs << "test/unit"
  t.pattern = 'test/unit/t[cs]_*.rb'
  t.verbose = true
}

desc "run unit tests in test/unit"
Rake::TestTask.new("test_units_longrunning") { |t|
  t.libs << "test"
  t.libs << "test/unit"
  t.test_files = FileList["test/longrunning/tm_store.rb"]
  t.pattern = 'test/unit/t[cs]_*.rb'
  t.verbose = true
}

desc "run funtional tests in test/funtional"
Rake::TestTask.new("test_functional") { |t|
  t.libs << "test"
  t.pattern = 'test/funtional/tc_*.rb'
  t.verbose = true
}

desc "Report code statistics (KLOCS, etc) from application"
task :stats do
  CodeStatistics.new(
                      ["Store", "lib/store"],
                      ["Units", "test/unit"],
                      ["Units-extended", "test/unit/longrunning"]
                    ).to_s
end

desc "Generate documentation for the application"
Rake::RDocTask.new("appdoc") do |rdoc|
  rdoc.rdoc_dir = 'doc/api'
  rdoc.title = "Ferret Search Library Documentation"
  rdoc.options << '--line-numbers --inline-source'
  rdoc.rdoc_files.include('doc/README')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
Something went wrong with that request. Please try again.