Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added RCov tasks and scented RDoc with SDoc

  • Loading branch information...
commit 44213dec0167e1c6c62c362902f2e2fd906e5537 1 parent 8e94fca
@karmi authored
Showing with 23 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +20 −0 Rakefile
  3. +2 −0  slingshot.gemspec
View
1  .gitignore
@@ -3,4 +3,5 @@
Gemfile.lock
pkg/*
rdoc/
+coverage/
scratch/
View
20 Rakefile
@@ -18,6 +18,11 @@ namespace :test do
end
end
+# Generate documentation
+begin
+ require 'sdoc'
+rescue LoadError
+end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
@@ -25,3 +30,18 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
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
View
2  slingshot.gemspec
@@ -31,6 +31,8 @@ Gem::Specification.new do |s|
s.add_development_dependency "turn"
s.add_development_dependency "shoulda"
s.add_development_dependency "mocha"
+ s.add_development_dependency "sdoc"
+ s.add_development_dependency "rcov"
s.description = <<-DESC
Ruby API for the ElasticSearch search engine/database.
Please sign in to comment.
Something went wrong with that request. Please try again.