Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to new version of comb and node v0.6.1

  • Loading branch information...
commit a0a1a43a0e8e5d79d7de84a0dfda368af55a07ee 1 parent c22f180
@doug-martin authored
View
34 lib/aws/baseService.js
@@ -128,18 +128,14 @@ comb.define(null, {
data += chunk.toString()
});
res.on('end', comb.hitch(this, function() {
- try {
- var parser = new xml2js.Parser();
- parser.parseString(data, comb.hitch(this, function(err, data) {
- if (err) {
- ret.errback(err);
- } else {
- ret.callback(data);
- }
- }));
- } catch(e) {
- ret.errback(e);
- }
+ var parser = new xml2js.Parser();
+ parser.parseString(data, comb.hitch(this, function(err, data) {
+ if (err) {
+ ret.errback(err);
+ } else {
+ ret.callback(data);
+ }
+ }));
}));
res.on("error", comb.hitch(ret, "errback"));
return ret;
@@ -155,14 +151,10 @@ comb.define(null, {
var headers = this._makeHeaders(body, options);
var reqOptions = {host: this.host,path: this.path, method: 'POST',headers: headers};
var req = (this.useSSL ? https : http).request(reqOptions, comb.hitch(this, function (res) {
- try {
- if (res.statusCode == 200) {
- this.__handleResponse(res).then(comb.hitch(ret, "callback"), comb.hitch(ret, "errback", "error"));
- } else {
- this.__handleResponse(res).then(comb.hitch(ret, "errback", "error"), comb.hitch(ret, "errback", "error"));
- }
- } catch(e) {
- ret.errback(e);
+ if (res.statusCode == 200) {
+ this.__handleResponse(res).then(comb.hitch(ret, "callback"), comb.hitch(ret, "errback", "error"));
+ } else {
+ this.__handleResponse(res).then(comb.hitch(ret, "errback", "error"), comb.hitch(ret, "errback", "error"));
}
}));
req.on("error", comb.hitch(this, function(e) {
@@ -206,4 +198,4 @@ comb.define(null, {
}
}
}
-}).export(module);
+}).as(module);
View
2  lib/aws/sns.js
@@ -169,4 +169,4 @@ comb.define(BaseService, {
}
}
}
-}).export(module);
+}).as(module);
View
4 lib/aws/sqs.js
@@ -12,7 +12,7 @@ comb.define(BaseService, {
_version : "2009-02-01",
constructor : function(options) {
- this.super(arguments);
+ this._super(arguments);
},
listQueues : function(queueNamePrefix) {
@@ -146,4 +146,4 @@ comb.define(BaseService, {
}
}
-}).export(module);
+}).as(module);
View
4 package.json
@@ -1,7 +1,7 @@
{
"name": "amazon-lib",
"description": "AWS Library",
- "version": "0.0.1",
+ "version": "0.0.2",
"keywords" : ["Amazon", "AWS", "SQS", "SNS"],
"repository": {
"type": "git",
@@ -10,7 +10,7 @@
"author": "Doug Martin",
"main": "index.js",
"dependencies" : {
- "comb" : ">=0.0.3",
+ "comb" : ">=0.0.5",
"xml2js" : ">=0.1.11"
},
"directories": {
Please sign in to comment.
Something went wrong with that request. Please try again.