require 'rubygems' require 'bundler' require 'rake/dsl_definition' require 'rake/alt_system' require 'rake/testtask' require 'rdoc/task' task :default => [:test_filesystem] Bundler::GemHelper.install_tasks desc "Create documentation" RDoc::Task.new("doc") { |rdoc| rdoc.title = "Ankusa - Naive Bayes classifier with big data storage" rdoc.rdoc_dir = 'docs' rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('lib/**/*.rb') } desc "Run all unit tests with memory storage" Rake::TestTask.new("test_memory") { |t| t.libs += ["lib", "."] t.test_files = FileList['test/hasher_test.rb', 'test/memory_classifier_test.rb'] t.verbose = true } desc "Run all unit tests with HBase storage" Rake::TestTask.new("test_hbase") { |t| t.libs += ["lib", "."] t.test_files = FileList['test/hasher_test.rb', 'test/hbase_classifier_test.rb'] t.verbose = true } desc "Run all unit tests with Cassandra storage" Rake::TestTask.new("test_cassandra") { |t| t.libs += ["lib", "."] t.test_files = FileList['test/hasher_test.rb', 'test/cassandra_classifier_test.rb'] t.verbose = true } desc "Run all unit tests with FileSystem storage" Rake::TestTask.new("test_filesystem") { |t| t.libs += ["lib", "."] t.test_files = FileList['test/hasher_test.rb', 'test/file_system_classifier_test.rb'] t.verbose = true } desc "Run all unit tests with MongoDb storage" Rake::TestTask.new("test_mongo_db") { |t| t.libs += ["lib", "."] t.test_files = FileList['test/hasher_test.rb', 'test/mongo_db_classifier_test.rb'] t.verbose = true } desc "Run all unit tests in Travis-CI environment" Rake::TestTask.new("test_travis_ci") { |t| t.libs += ["lib", "."] t.test_files = FileList['test/hasher_test.rb', 'test/memory_classifier_test.rb', 'test/file_system_classifier_test.rb', 'test/mongo_db_classifier_test.rb'] t.verbose = true }