0.4.2 November 16, 2013 * Optionally return documents and query results as hashmaps with symbolized keys Example: Couchdb.find_by({:database => 'contacts', :email => 'nancy@mail.com'} ,auth_session, symbolize_keys: true)) # => [{:_id =>"Nancy", :_rev =>"1-d15a83d2a23b495c19df2595b636ecc8", :firstname =>"Nancy", :lastname =>"Lee", # :phone =>"347-808-3734", :email =>"nancy@mail.com", :gender =>"female"}] And Couchdb.find_by({:database => 'contacts', :email => 'nancy@mail.com'} , auth_session, symbolize_keys: true) # => [{:_id=>"Nancy", :_rev=>"1-d15a83d2a23b495c19df2595b636ecc8", :firstname =>"Nancy", :lastname =>"Lee", # :phone =>"347-808-3734", :email =>"nancy@mail.com", :gender =>"female"}] This works for view document results and also works for all finders and queries. See documentation for details. 0.4.1 August 23,2013 * Changed bind address to require prefix (http:// or https://) Example: Couchdb.address = "http://whisperservers.cloudant.com" See documentation for details =0.4.0 June 9, 2013 * added ability to find documents by multiple keys Example: keys = {:gender => 'male',:age => '34'} Couchdb.find_by_keys({:database => 'friends', :keys => keys}) This will return all documents in the friends database with gender = male and age = 34 * added the ability to count documents by multiple keys Example: keys = {:gender => 'male',:age => '40'} count = Couchdb.count_by_keys({:database => 'friends', :keys => keys}) This will return the number of documents in the friends database with gender = male and age = 40. See documentation for details. =0.3.4 June 2, 2013 * added options for manipulating query results, the options available are limit, skip, descending, startkey, endkey Example options = {:skip => 10,:limit => 20} Couchdb.find_by({:database => 'contacts', :gender => 'female'},auth_session, options) This will skip the first 10 results and return the next 20 that match the key :gender => 'female' Another example options = {:startkey => "53000", :endkey => "99000",:limit => 20} Couchdb.find_by({:database => 'employees', :salary => ''},auth_session, options) This will return all employees with salary between 53000 and 99000. Direct view query: view = { :database => "employees", :design_doc => 'salary_finder', :view => 'find_by_salary'} options = {:startkey => "53000", :endkey => "99000"} Couchdb.find view, auth_session,key=nil, options This will also return all employees with salary between 53000 and 99000. See leanback documentation for details. =0.3.3 May 26, 2013 * Added ability to count the number of documents in a database by a specified key. Example: Couchdb.count({:database => 'contacts', :gender => 'female'},auth_session) # => 8 This will count the number of documents with gender = 'female' See leanback documentation for details. =0.3.2 December 01, 2012 * Fixed issues with invalid JSON on CouchDB 1.2.0 =Leanback 0.3.1 December 5,2011 * Added ability to change password for non-admin users. =Leanback 0.3.0 November 20,2011 * Added CouchDB Security features: working with admin and non-admin users, authentication, adding security objects to databases. See documentation for details. November 9,2011:- * Added support for couchDB configuration API. It's now possible to change/modify/delete any couchDB configuration settings with Leanback. README will soon be updated with details. November 3, 2011:- * Changed all the syntax for working with documents (creating, editing, updating and deleting documents now use a new syntax) See README for the change. Document::Module has been removed, it's methods are now part of Couchdb::Module. =Leanback 0.2.7 August 4, 2011:- * Added ability to Query a permanent view and create it on the fly from a json file, if it doesn't already exist and then return the values Example: view = {:database => 'contacts', :design_doc => 'my_views', :view => 'get_emails', :json_doc => '/path/to/my_views.json'} Couchdb.find_on_fly(view) The above will query the view and add it to the database if it doesn't already exist and still return the values. See README for details =Leanback 0.2.6 August 3, 2011:- * Added ability to delete documents without having to retrieve the _rev revision number Example: doc = {:database => 'contacts', :doc_id => 'James'} Document.delete doc The above will delete the document with id 'James'. See README for details. =Leanback 0.2.5 August 2, 2011:- * Added dynamic updates for documents. This makes it easy to update documents without deleting old fields or having to track the _rev number. To update a document now: data = {"age" => "53" } doc = { :database => 'contacts', :doc_id => 'john', :data => data} Document.update doc This will update the document and change the John's age to 53. See README for details =Leanback 0.2.4 July 20, 2011:- * find_by(database,key) has a bug in version 0.2.3, please use version 0.2.4 instead =Leanback 0.2.3 July 19, 2011:- * Added better error handling all database operations now raise a CouchdbException when something goes wrong. It's now easy to track exceptions. begin Couchdb.create 'contacts' rescue => e puts "Error message: " + e.to_s puts "Error value: " + e.error end # => Error message: CouchDB: Error - file_exists. Reason - The database could not be created, the file already exists. Error value: file_exists See README for details =Leanback 0.2.2 July 13, 2011:- * No need to call add_finder() method directly anymore. find_by() now adds a finder index to the database if one doesn't already exist. Example: The method: Couchdb.find_by( :database => 'contacts', :email => 'nancy@mail.com') will add the finder to the database if one doesn't already exist. No need to call Couchdb.add_finder(:database => 'contacts', :key => 'email')