couchrest_model/Rakefile

67 lines
2 KiB
Text
Raw Normal View History

2008-06-20 11:54:25 -07:00
require 'rake'
2008-09-11 22:21:16 -07:00
require "rake/rdoctask"
2009-01-12 21:33:12 -08:00
require File.join(File.expand_path(File.dirname(__FILE__)),'lib','couchrest')
begin
require 'spec/rake/spectask'
rescue LoadError
puts <<-EOS
To use rspec for testing you must install rspec gem:
gem install rspec
EOS
exit(0)
end
2010-01-13 21:33:23 -02:00
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "couchrest"
gemspec.summary = "Lean and RESTful interface to CouchDB."
gemspec.description = "CouchRest provides a simple interface on top of CouchDB's RESTful HTTP API, as well as including some utility scripts for managing views and attachments."
gemspec.email = "jchris@apache.org"
gemspec.homepage = "http://github.com/couchrest/couchrest"
gemspec.authors = ["J. Chris Anderson", "Matt Aimonetti", "Marcos Tapajos"]
gemspec.extra_rdoc_files = %w( README.md LICENSE THANKS.md )
gemspec.files = %w( LICENSE README.md Rakefile THANKS.md history.txt) + Dir["{examples,lib,spec,utils}/**/*"] - Dir["spec/tmp"]
gemspec.has_rdoc = true
gemspec.add_dependency("rest-client", ">= 0.5")
gemspec.add_dependency("mime-types", ">= 1.15")
gemspec.version = CouchRest::VERSION
gemspec.date = "2008-11-22"
gemspec.require_path = "lib"
2008-09-12 15:45:21 -04:00
end
2010-01-13 21:33:23 -02:00
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end
2008-06-20 11:54:25 -07:00
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
2009-08-06 12:57:47 -07:00
t.spec_opts = ["--color"]
2008-10-06 12:27:01 -07:00
t.spec_files = FileList['spec/**/*_spec.rb']
2008-06-20 11:54:25 -07:00
end
desc "Print specdocs"
Spec::Rake::SpecTask.new(:doc) do |t|
2008-09-29 21:08:52 -07:00
t.spec_opts = ["--format", "specdoc"]
2008-06-20 11:54:25 -07:00
t.spec_files = FileList['spec/*_spec.rb']
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")
Rake.remove_task("release")