From c7fae2eca92dad89a2a1020600f790a800abe470 Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Thu, 11 Sep 2008 22:21:16 -0700 Subject: [PATCH] updated rake for rdoc --- .gitignore | 1 + README.markdown => README.rdoc | 12 ++++++------ Rakefile | 11 +++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) rename README.markdown => README.rdoc (90%) diff --git a/.gitignore b/.gitignore index e43b0f9..7b3dafe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +html/* \ No newline at end of file diff --git a/README.markdown b/README.rdoc similarity index 90% rename from README.markdown rename to README.rdoc index ab0fee2..48e4bd4 100644 --- a/README.markdown +++ b/README.rdoc @@ -1,22 +1,22 @@ -## CouchRest - CouchDB, close to the metal +== CouchRest - CouchDB, close to the metal CouchRest is based on [CouchDB's couch.js test library](http://svn.apache.org/repos/asf/incubator/couchdb/trunk/share/www/script/couch.js), which I find to be concise, clear, and well designed. CouchRest lightly wraps CouchDB's HTTP API, managing JSON serialization, and remembering the URI-paths to CouchDB's API endpoints so you don't have to. CouchRest's lighweight is designed to make a simple base for application and framework-specific object oriented APIs. -### Easy Install +=== Easy Install -`sudo gem install jchris-couchrest -s http://gems.github.com` + sudo gem install jchris-couchrest -s http://gems.github.com -### Relax, it's RESTful +=== Relax, it's RESTful The core of Couchrest is Heroku’s excellent REST Client Ruby HTTP wrapper. REST Client takes all the nastyness of Net::HTTP and gives is a pretty face, while still giving you more control than Open-URI. I recommend it anytime you’re interfacing with a well-defined web service. -### Running the Specs +=== Running the Specs The most complete documentation is the spec/ directory. To validate your CouchRest install, from the project root directory run `rake`, or `autotest` (requires RSpec and optionally ZenTest for autotest support). -### Examples +=== Examples Quick Start: diff --git a/Rakefile b/Rakefile index b34bff2..e58b43f 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ require 'rake' +require "rake/rdoctask" require 'spec/rake/spectask' desc "Run all specs" @@ -12,4 +13,14 @@ Spec::Rake::SpecTask.new(:doc) do |t| t.spec_files = FileList['spec/*_spec.rb'] end +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" + # rdoc.rdoc_dir = "doc/rdoc" + # rdoc.options << "--line-numbers" << "--inline-source" +end + task :default => :spec