2011-01-17 15:42:05 +01:00
|
|
|
require 'rubygems'
|
2011-01-16 22:43:07 -02:00
|
|
|
require 'bundler'
|
|
|
|
Bundler::GemHelper.install_tasks
|
|
|
|
|
2008-06-20 11:54:25 -07:00
|
|
|
require 'rake'
|
2008-09-11 22:21:16 -07:00
|
|
|
require "rake/rdoctask"
|
2011-01-17 15:42:05 +01:00
|
|
|
|
|
|
|
require 'rspec'
|
|
|
|
require 'rspec/core/rake_task'
|
2009-01-12 23:46:21 -08:00
|
|
|
|
2008-06-20 11:54:25 -07:00
|
|
|
desc "Run all specs"
|
2010-08-18 20:00:03 +02:00
|
|
|
Rspec::Core::RakeTask.new(:spec) do |spec|
|
2011-01-16 13:30:43 -05:00
|
|
|
spec.rspec_opts = ["--color"]
|
2010-08-18 20:00:03 +02:00
|
|
|
spec.pattern = 'spec/**/*_spec.rb'
|
2008-06-20 11:54:25 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
desc "Print specdocs"
|
2010-08-18 20:00:03 +02:00
|
|
|
Rspec::Core::RakeTask.new(:doc) do |spec|
|
2011-01-16 13:30:43 -05:00
|
|
|
spec.rspec_opts = ["--format", "specdoc"]
|
2010-08-18 20:00:03 +02:00
|
|
|
spec.pattern = 'spec/*_spec.rb'
|
2008-06-20 11:54:25 -07:00
|
|
|
end
|
|
|
|
|
2008-09-11 22:21:16 -07:00
|
|
|
desc "Generate the rdoc"
|
|
|
|
Rake::RDocTask.new do |rdoc|
|
|
|
|
files = ["README.rdoc", "LICENSE", "lib/**/*.rb"]
|
|
|
|
rdoc.rdoc_files.add(files)
|
|
|
|
rdoc.main = "README.rdoc"
|
|
|
|
rdoc.title = "CouchRest: Ruby CouchDB, close to the metal"
|
|
|
|
end
|
|
|
|
|
2008-10-14 15:39:40 -07:00
|
|
|
desc "Run the rspec"
|
2008-06-20 15:06:11 -07:00
|
|
|
task :default => :spec
|
2010-01-14 09:56:28 -02:00
|
|
|
|
|
|
|
module Rake
|
|
|
|
def self.remove_task(task_name)
|
|
|
|
Rake.application.instance_variable_get('@tasks').delete(task_name.to_s)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Rake.remove_task("github:release")
|
2010-03-15 19:12:38 -05:00
|
|
|
Rake.remove_task("release")
|