rufus-jig 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -2,7 +2,12 @@
2
2
  = rufus-jig CHANGELOG.txt
3
3
 
4
4
 
5
- == rufus-jig - 0.1.15 not yet released
5
+ == rufus-jig - 0.1.16 released 2010/03/17
6
+
7
+ - Rufus::Jig::Couch returns true (was nil) when trying to put into a missing db
8
+
9
+
10
+ == rufus-jig - 0.1.15 released 2010/03/11
6
11
 
7
12
  - unified :timeout => sec option and Rufus::Jig::TimeoutError
8
13
  - fixed small issue with em-http-request and '/' path
@@ -62,8 +62,10 @@ module Rufus::Jig
62
62
 
63
63
  r = @http.put(pa, payload, :content_type => :json, :cache => false)
64
64
 
65
- return @http.get(pa) if r == true
66
- # conflict
65
+ return @http.get(pa) || true if r == true
66
+ #
67
+ # conflict : returns the current version of the doc
68
+ # (or true if there is no document (probably 404 for the database))
67
69
 
68
70
  if opts[:update_rev] && doc_or_path.is_a?(Hash)
69
71
  doc_or_path['_rev'] = r['rev']
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Rufus
3
3
  module Jig
4
- VERSION = '0.1.15'
4
+ VERSION = '0.1.16'
5
5
  end
6
6
  end
7
7
 
data/rufus-jig.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rufus-jig}
8
- s.version = "0.1.15"
8
+ s.version = "0.1.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Mettraux", "Kenneth Kalmer"]
12
- s.date = %q{2010-03-12}
12
+ s.date = %q{2010-03-17}
13
13
  s.description = %q{
14
14
  Json Interwebs Get.
15
15
 
data/test/ct_1_couchdb.rb CHANGED
@@ -168,5 +168,14 @@ class CtCouchDbTest < Test::Unit::TestCase
168
168
 
169
169
  assert_equal(true, r)
170
170
  end
171
+
172
+ def test_put_in_missing_db
173
+
174
+ @c.delete('.')
175
+
176
+ r = @c.put('_id' => 'coffee2', 'type' => 'chevere')
177
+
178
+ assert_equal true, r
179
+ end
171
180
  end
172
181
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 15
9
- version: 0.1.15
8
+ - 16
9
+ version: 0.1.16
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Mettraux
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-03-12 00:00:00 +09:00
18
+ date: 2010-03-17 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency