Comparing version 3.3.1 to 3.3.2
@@ -289,3 +289,8 @@ /* minimal couch in node | ||
log({err: 'couch', body: parsed, headers: rh}); | ||
if (!parsed) { parsed = {}; } | ||
if (!parsed) { | ||
parsed = {}; | ||
} | ||
if (typeof parsed === "string") { // a stacktrace from couch | ||
parsed = {message: parsed}; | ||
} | ||
if (!parsed.message && (parsed.reason || parsed.error)) { | ||
@@ -292,0 +297,0 @@ parsed.message = (parsed.reason || parsed.error); |
@@ -5,3 +5,3 @@ { "name" : "nano" | ||
, "repository" : "git://github.com/dscape/nano" | ||
, "version" : "3.3.1" | ||
, "version" : "3.3.2" | ||
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" | ||
@@ -8,0 +8,0 @@ , "contributors" : |
@@ -582,2 +582,3 @@ # nano | ||
* article: [how to update a document with nano](http://writings.nunojob.com/2012/07/How-To-Update-A-Document-With-Nano-The-CouchDB-Client-for-Node.js.html) | ||
* article: [thoughts on development using couchdb with node.js](http://tbranyen.com/post/thoughts-on-development-using-couchdb-with-nodejs) | ||
@@ -584,0 +585,0 @@ ## roadmap |
@@ -7,2 +7,3 @@ var specify = require('specify') | ||
, pixel = helpers.pixel | ||
, rev | ||
; | ||
@@ -30,2 +31,4 @@ | ||
assert.equal(error, undefined, "Should store the pixel"); | ||
assert.ok(bmp.rev, "Should have a revision number"); | ||
rev = bmp.rev; | ||
}); | ||
@@ -35,2 +38,13 @@ }); | ||
specify("att_update:metadata", timeout, function (assert) { | ||
db.get("new", function (error, new_doc) { | ||
assert.equal(error, undefined, "Should get new"); | ||
new_doc.works = true; | ||
db.insert(new_doc, "new", function (error, response) { | ||
assert.equal(error, undefined, "Should update doc"); | ||
assert.equal(response.ok, true, "Response should be ok"); | ||
}); | ||
}); | ||
}); | ||
specify("att_update:teardown", timeout, function (assert) { | ||
@@ -37,0 +51,0 @@ nano.db.destroy("att_update", function (err) { |
@@ -19,2 +19,13 @@ [ | ||
} | ||
, { "method" : "get" | ||
, "path" : "/att_update/new" | ||
, "status" : 200 | ||
, "response" : "{ \"_id\": \"new\", \"_rev\": \"2-3b1f88\", \"_attachments\": { \"att\": { \"content_type\": \"image/bmp\", \"revpos\": 2, \"digest\": \"md5-Ow9j2dR0Qm58Qi3z8p2w3A==\", \"length\": 58, \"stub\": true }}}" | ||
} | ||
, { "method" : "put" | ||
, "path" : "/att_update/new" | ||
, "status" : 201 | ||
, "body" : "{\"_id\":\"new\",\"_rev\":\"2-3b1f88\",\"_attachments\":{\"att\":{\"content_type\":\"image/bmp\",\"revpos\":2,\"digest\":\"md5-Ow9j2dR0Qm58Qi3z8p2w3A==\",\"length\":58,\"stub\":true}},\"works\":true}" | ||
, "response" : "{\"ok\":true,\"id\":\"new\",\"rev\":\"3-19e2de\"}" | ||
} | ||
, { "method" : "delete" | ||
@@ -21,0 +32,0 @@ , "path" : "/att_update" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147049
3514
664