Comparing version 0.1.0 to 0.1.1
@@ -46,2 +46,3 @@ (function() { | ||
var _ref; | ||
body = JSON.parse(body || '{}'); | ||
if (res.statusCode === 422) return callback(new Error(body.message)); | ||
@@ -61,3 +62,3 @@ if ((_ref = res.statusCode) === 400 || _ref === 401 || _ref === 404) { | ||
if (err) return callback(err); | ||
return _this.errorHandle(res, JSON.parse(body), callback); | ||
return _this.errorHandle(res, body, callback); | ||
}); | ||
@@ -78,3 +79,3 @@ }; | ||
if (err) return callback(err); | ||
return _this.errorHandle(res, JSON.parse(body), callback); | ||
return _this.errorHandle(res, body, callback); | ||
}); | ||
@@ -95,3 +96,3 @@ }; | ||
if (err) return callback(err); | ||
return _this.errorHandle(res, JSON.parse(body), callback); | ||
return _this.errorHandle(res, body, callback); | ||
}); | ||
@@ -112,3 +113,3 @@ }; | ||
if (err) return callback(err); | ||
return _this.errorHandle(res, JSON.parse(body), callback); | ||
return _this.errorHandle(res, body, callback); | ||
}); | ||
@@ -115,0 +116,0 @@ }; |
{ | ||
"name": "octonode", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": "Pavan Kumar Sunkara <pavan.sss1991@gmail.com> (http://pksunkara.github.com)", | ||
@@ -19,4 +19,4 @@ "description": "nodejs wrapper for github v3 api", | ||
"scripts": { | ||
"prepublish": "./node_modules/.bin/cake lib", | ||
"test": "./node_modules/.bin/vows --spec $(find test -name '[^nock]*.coffee')" | ||
"prepublish": "cake lib", | ||
"test": "NODE_ENV=test node_modules/.bin/mocha --require assert --require should --globals name -R spec $(find test -name '*.coffee')" | ||
}, | ||
@@ -42,4 +42,8 @@ "contributors": [ | ||
"nock": "0.7.x", | ||
"vows": "0.6.x", | ||
"coffee-script": "1.2.x" | ||
"mocha": "0.7.x", | ||
"sinon": "1.2.x", | ||
"async": "0.1.x", | ||
"should": "~0.2.1", | ||
"underscore": "1.2.x", | ||
"coffee-script": "1.1.2" | ||
}, | ||
@@ -46,0 +50,0 @@ "engines": { |
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
27301
462
7