'couchdb-client' is a pure ruby, easy to use CouchDB client library.
Add this line to your application's Gemfile:
gem 'couchdb-client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install couchdb-client
require 'couchdb-client'
client = CouchDB.connect :host => 'localhost', :port => 5984 # => CouchDB::Client instance
db = client['some_database'] # => CouchDB::Database
doc = db.put 'key' => 'value'
doc = db.get 'xxx' # => CouchDB::Document instance w/ _id 'xxx'
doc.update!(:some_field => 'new_value')
# or
db.put doc.update('some_field' => 'new_value')
doc.delete!
# or
db.delete doc._id
db.exists? 'xxx'
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request