forked from livingsocial/ankusa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
64 lines (56 loc) · 1.94 KB
/
Rakefile
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
55
56
57
58
59
60
61
62
63
64
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
desc "Create documentation"
Rake::RDocTask.new("doc") { |rdoc|
rdoc.title = "HBaseRb - Naive Bayes classifier with HBase 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/memory_hbase_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
}
spec = Gem::Specification.new do |s|
s.name = "ankusa"
s.version = "0.0.8"
s.authors = ["Brian Muller"]
s.date = %q{2011-01-05}
s.description = "Text classifier with HBase or Cassandra storage"
s.summary = "Text classifier in Ruby that uses Hadoop's HBase or Cassandra for storage"
s.email = "[email protected]"
s.files = FileList["lib/**/*", "[A-Z]*", "Rakefile", "docs/**/*"]
s.homepage = "https://github.com/livingsocial/ankusa"
s.require_paths = ["lib"]
s.add_dependency('fast-stemmer', '>= 1.0.0')
s.requirements << "Either hbaserb >= 0.0.3 or cassandra >= 0.7"
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
desc "Default task: builds gem and runs tests"
task :default => [ :gem, :test ]