couchrest_model/Rakefile

67 lines
1.8 KiB
Ruby
Raw Normal View History

2008-06-20 20:54:25 +02:00
require 'rake'
2008-09-12 07:21:16 +02:00
require "rake/rdoctask"
require 'rake/gempackagetask'
2009-01-13 06:33:12 +01: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
2008-09-12 21:45:21 +02:00
spec = Gem::Specification.new do |s|
s.name = "couchrest"
2009-01-13 06:33:12 +01:00
s.version = CouchRest::VERSION
2008-11-22 23:16:44 +01:00
s.date = "2008-11-22"
2008-09-12 21:45:21 +02:00
s.summary = "Lean and RESTful interface to CouchDB."
2009-01-09 07:22:34 +01:00
s.email = "jchris@apache.org"
2008-09-12 21:45:21 +02:00
s.homepage = "http://github.com/jchris/couchrest"
s.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."
s.has_rdoc = true
s.authors = ["J. Chris Anderson", "Matt Aimonetti"]
2009-01-13 05:40:06 +01:00
s.files = %w( LICENSE README.md Rakefile THANKS.md ) +
2009-01-20 01:11:58 +01:00
Dir["{examples,lib,spec,utils}/**/*"] -
2009-01-09 07:18:06 +01:00
Dir["spec/tmp"]
2009-01-13 05:40:06 +01:00
s.extra_rdoc_files = %w( README.md LICENSE THANKS.md )
2008-09-12 21:45:21 +02:00
s.require_path = "lib"
2008-09-12 21:56:26 +02:00
s.add_dependency("json", ">= 1.1.2")
s.add_dependency("rest-client", ">= 0.5")
2009-01-13 06:14:35 +01:00
s.add_dependency("mime-types", ">= 1.15")
2008-09-12 21:45:21 +02:00
end
desc "create .gemspec file (useful for github)"
2008-09-30 19:22:17 +02:00
task :gemspec do
filename = "#{spec.name}.gemspec"
File.open(filename, "w") do |f|
f.puts spec.to_ruby
2008-09-12 21:45:21 +02:00
end
end
2008-06-20 20:54:25 +02:00
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
2008-10-06 21:27:01 +02:00
t.spec_files = FileList['spec/**/*_spec.rb']
2008-06-20 20:54:25 +02:00
end
desc "Print specdocs"
Spec::Rake::SpecTask.new(:doc) do |t|
2008-09-30 06:08:52 +02:00
t.spec_opts = ["--format", "specdoc"]
2008-06-20 20:54:25 +02:00
t.spec_files = FileList['spec/*_spec.rb']
end
2008-09-12 07:21:16 +02: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-15 00:39:40 +02:00
desc "Run the rspec"
2008-06-21 00:06:11 +02:00
task :default => :spec