Skip to content

Commit

Permalink
release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Dec 8, 2010
1 parent 7251fad commit dcc7a36
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Expand Up @@ -2,7 +2,7 @@
= rufus-jig CHANGELOG.txt


== rufus-jig - 1.0.0 not yet released
== rufus-jig - 1.0.0 released 2010/12/08

- Couch #all, #query, #query_for_docs, #bulk_put and #bulk_delete
- Rufus::Jig.parse_uri now identifies the #fragment
Expand Down
29 changes: 27 additions & 2 deletions README.rdoc
Expand Up @@ -74,8 +74,6 @@ posting...
For the real thing : http://github.com/couchrest/couchrest
There is also the excellent : http://github.com/langalex/couch_potato

Warning : rufus-jig >= 0.1.18 is meant for CouchDB >= 0.11.

The class Rufus::Jig::Couch provides a get/put/delete trio that is couch-oriented. Json encoding/decoding is automatically handled as well as

put and delete return nil in case of success and true (conflict) or and exception else.
Expand Down Expand Up @@ -111,6 +109,30 @@ put and delete return nil in case of success and true (conflict) or and exceptio

c.detach('coffee0', '1-x-newrevision-whatever', 'picture')

there is also

c.all(:skip => 100, :limit => 100)
c.all(:keys => %w[ doc0 doc1 doc3 ])
# grabbing multiple docs in one go

c.query('_design/my_design_doc/_view/my_view')
c.query('my_design_doc:my_view')
# 'querying' a view

c.query_for_docs('my_design_doc:my_view')
# querying for documents

bulk operations

docs = c.all(:keys => %w[ doc0 doc1 doc3 ])
c.bulk_delete(docs)
# deleting in one go

docs = c.all(:keys => %w[ doc0 doc1 doc3 ])
docs.each { |doc| doc['status'] = 'copied' }
c.bulk_put(docs)
# updating in one go


=== Couch on_change

Expand Down Expand Up @@ -159,6 +181,8 @@ By default net/http is used. To test with another HTTP lib :

You can specify patron, em, netp or net. Netp corresponds to http://seattlerb.rubyforge.org/net-http-persistent/

The specs require the json and sinatra gems. You can spot issues in the file server.log (created when running specs).


== known issues

Expand Down Expand Up @@ -191,6 +215,7 @@ http://rufus.rubyforge.org

* John Mettraux, http://jmettraux.wordpress.com/
* Kenneth Kalmer, http://www.opensourcery.co.za/
* Torsten Schoenebaum, http://github.com/tosch/


== license
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
@@ -1,4 +1,5 @@

$:.unshift('.')
require 'lib/rufus/jig/version.rb'

require 'rubygems'
Expand Down Expand Up @@ -30,6 +31,7 @@ Jeweler::Tasks.new do |gem|

gem.add_dependency 'rufus-lru'
gem.add_dependency 'rufus-json', '>= 0.2.5'

gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec', '~> 2.2.0'
gem.add_development_dependency 'yard'
Expand Down
2 changes: 1 addition & 1 deletion rufus-jig.gemspec
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["John Mettraux", "Kenneth Kalmer"]
s.date = %q{2010-12-07}
s.date = %q{2010-12-08}
s.description = %q{
Json Interwebs Get.
Expand Down
6 changes: 4 additions & 2 deletions spec/couch/db_spec.rb
Expand Up @@ -318,8 +318,10 @@
{ '_id' => 'h3', 'msg' => 'not ok' }
])

res.collect { |row| row['_id'] }.should == %w[ h2 h3 ]
res.collect { |row| row.keys }.flatten.uniq.should == %w[ _id _rev ]
res.collect { |row| row['_id'] }.should ==
%w[ h2 h3 ]
res.collect { |row| row.keys }.flatten.uniq.sort.should ==
%w[ _id _rev ]
end
end

Expand Down

0 comments on commit dcc7a36

Please sign in to comment.