diff --git a/History.txt b/History.txt index ee4ea01..aa0073f 100644 --- a/History.txt +++ b/History.txt @@ -1,3 +1,14 @@ +== 1.0.0 / 2009-08-09 + +* Update the couch-docs script to be able to dump a CouchDB database + to a local directory as well as uploading a local directory into a + CouchDB database. + + * CouchDB revision numbers are stripped when dumping (to prevent + conflicts when re-loading) + + * Attachments are dumped as well. + == 0.9.0 / 2009-08-08 * Import from couch_design_docs (name change to reflect increased functionality) diff --git a/README.rdoc b/README.rdoc index 15779df..fc221e0 100644 --- a/README.rdoc +++ b/README.rdoc @@ -9,13 +9,36 @@ Manage CouchDB views and documents. == FEATURES/PROBLEMS: -* Store your CouchDB documents on the filesystem for on-demand - upload. Design documents are kept in a _design - sub-directory, with .js extensions. Normal documents are - stored with a .json extension. +* Upload JSON documents stored on the filesystem into a CouchDB + database. + +* Map .js files stored on the filesystem + (e.g. _design/recipes/count_by_month/map.js) into CouchDB + design documents. + +* Dump documents stored in CouchDB to the filesystem. + +* Script (couch-docs) to restore / backup CouchDB database. + +* The couch-docs scipts does not work with design documents. + +* A progress bar would be helpful. + +* Unit testing of view javascript would be very nice. == SYNOPSIS: + From the command line: + + # For dumping the contents of a CouchDB database to the filesystem + couch-docs dump "http://localhost:5984/db" path/to/dump_dir/ + + # For loading documents from the filesystem into CouchDB + couch-docs load path/to/dump_dir/ "http://localhost:5984/db" + + + In code: + DB_URL = "http://localhost:5984/db" DIRECTORY = "/repos/db/couchdb/" @@ -30,6 +53,10 @@ Manage CouchDB views and documents. # a document named "foo" with the JSON contents from the foo.json # file + CouchDocs.dump(DB_URL, "/repos/db/bak") + + # => JSON dump of every document at DB_URL + == REQUIREMENTS: * CouchDB @@ -38,7 +65,7 @@ Manage CouchDB views and documents. == INSTALL: -* sudo gem install couch_docs +* sudo gem install eee-c-couch_docs == LICENSE: diff --git a/couch_docs.gemspec b/couch_docs.gemspec index 2b80dd5..367fb75 100644 --- a/couch_docs.gemspec +++ b/couch_docs.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = %q{couch_docs} - s.version = "0.9.0" + s.version = "1.0.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Chris Strom"] diff --git a/lib/couch_docs.rb b/lib/couch_docs.rb index a8ff38e..7b4a120 100644 --- a/lib/couch_docs.rb +++ b/lib/couch_docs.rb @@ -1,7 +1,7 @@ module CouchDocs # :stopdoc: - VERSION = '0.9.0' + VERSION = '1.0.0' LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR # :startdoc: