rufus-jig 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.txt +6 -1
- data/lib/rufus/jig/couch.rb +4 -2
- data/lib/rufus/jig/version.rb +1 -1
- data/rufus-jig.gemspec +2 -2
- data/test/ct_1_couchdb.rb +9 -0
- metadata +3 -3
data/CHANGELOG.txt
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
= rufus-jig CHANGELOG.txt
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
== rufus-jig - 0.1.
|
|
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
|
data/lib/rufus/jig/couch.rb
CHANGED
|
@@ -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
|
-
#
|
|
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']
|
data/lib/rufus/jig/version.rb
CHANGED
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.
|
|
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
|
+
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
|
-
-
|
|
9
|
-
version: 0.1.
|
|
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-
|
|
18
|
+
date: 2010-03-17 00:00:00 +09:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|