Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Commit

Permalink
Added RCov tasks and scented RDoc with SDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
karmi committed Feb 7, 2011
1 parent 8e94fca commit 44213de
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,4 +3,5 @@
Gemfile.lock Gemfile.lock
pkg/* pkg/*
rdoc/ rdoc/
coverage/
scratch/ scratch/
20 changes: 20 additions & 0 deletions Rakefile
Expand Up @@ -18,10 +18,30 @@ namespace :test do
end end
end end


# Generate documentation
begin
require 'sdoc'
rescue LoadError
end
require 'rake/rdoctask' require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc| Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc' rdoc.rdoc_dir = 'rdoc'
rdoc.title = "Slingshot" rdoc.title = "Slingshot"
rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb') rdoc.rdoc_files.include('lib/**/*.rb')
end end

# Generate coverage reports
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.rcov_opts = ['--exclude', 'gems/*']
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install rcov"
end
end
2 changes: 2 additions & 0 deletions slingshot.gemspec
Expand Up @@ -31,6 +31,8 @@ Gem::Specification.new do |s|
s.add_development_dependency "turn" s.add_development_dependency "turn"
s.add_development_dependency "shoulda" s.add_development_dependency "shoulda"
s.add_development_dependency "mocha" s.add_development_dependency "mocha"
s.add_development_dependency "sdoc"
s.add_development_dependency "rcov"


s.description = <<-DESC s.description = <<-DESC
Ruby API for the ElasticSearch search engine/database. Ruby API for the ElasticSearch search engine/database.
Expand Down

0 comments on commit 44213de

Please sign in to comment.