-
Notifications
You must be signed in to change notification settings - Fork 34
/
Rakefile
33 lines (28 loc) · 919 Bytes
/
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
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
require "bundler/gem_tasks"
Dir["lib/relevance/tasks/*.rake"].each {|f| load f }
begin
require 'rspec'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new('spec') do |t|
t.verbose = true
end
desc "Run all RSpec specs using rcov"
RSpec::Core::RakeTask.new :rcov do |t|
t.pattern = File.dirname(__FILE__)+"/spec/**/*_spec.rb"
t.rcov = true
t.rcov_opts = %[--exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage]
end
task :default => :spec
rescue LoadError
puts "rspec, or one of its dependencies, is not available. Install it with: sudo gem install rspec"
end
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ''
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "tarantula #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end