Comparing version 0.7.4 to 0.7.5
@@ -73,3 +73,3 @@ 'use strict'; | ||
query: { | ||
Version: '2012-07-20', | ||
Version: '2012-08-15', | ||
SignatureMethod: 'HmacSHA256', | ||
@@ -82,3 +82,3 @@ SignatureVersion: '2' | ||
query: { | ||
Version: '2012-07-31', | ||
Version: '2012-09-17', | ||
SignatureMethod: 'HmacSHA256', | ||
@@ -204,1 +204,10 @@ SignatureVersion: '2' | ||
}; | ||
/** | ||
* The configuration that's in use when the xml2js parser is preferred | ||
*/ | ||
exports.xml2jsConfig = { | ||
mergeAttrs: true, | ||
explicitRoot: false, | ||
explicitArray: false | ||
}; |
{ | ||
"name": "aws2js", | ||
"main": "./lib/aws.js", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"description": "AWS (Amazon Web Services) APIs client implementation for node.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -0,1 +1,7 @@ | ||
## v0.7.5 | ||
* Small changes to the MIME detection code that relies on mime-magic due to the deprecation of mime.fileWrapper() [#7](https://github.com/SaltwaterC/mime-magic/issues/7). | ||
* Updates the RDS API client to default to version 2012-09-17. | ||
* Updates the EC2 API client to default to version 2012-08-15. | ||
* Fixes the xml2js broken handling of the root element that traditionally wasn't part of the object. | ||
## v0.7.4 | ||
@@ -2,0 +8,0 @@ * Deprecates the usage of node.js v0.4.10+. The support for node.js v0.4.10+ will be removed in aws2js v0.8. |
@@ -221,3 +221,3 @@ 'use strict'; | ||
} else { // xml2js | ||
parser = new xmlDep.Parser({mergeAttrs: true}).parseString; | ||
parser = new xmlDep.Parser(cfg.xml2jsConfig).parseString; | ||
} | ||
@@ -661,3 +661,3 @@ | ||
if (dependencies.mime === 'mime-magic') { | ||
mimeDep.fileWrapper(body.file, function (err, res) { | ||
mimeDep(body.file, function (err, res) { | ||
if (err) { | ||
@@ -664,0 +664,0 @@ callback(err); |
{ | ||
"name": "aws2js", | ||
"main": "./lib/aws.js", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"description": "AWS (Amazon Web Services) APIs client implementation for node.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -9,2 +9,4 @@ 'use strict'; | ||
var file = '6M.tmp'; | ||
s3.setCredentials(process.env.AWS_ACCEESS_KEY_ID, process.env.AWS_SECRET_ACCESS_KEY); | ||
@@ -15,18 +17,24 @@ s3.setBucket(process.env.AWS2JS_S3_BUCKET); | ||
assert.ifError(err); | ||
var tempMd5 = res.replace(/\s/g, ''); | ||
s3.putFileMultipart('10M.tmp', './10M.tmp', false, {}, 5242880, function (err, res) { | ||
s3.putFileMultipart(file, file, false, {}, 5242880, function (err, res) { | ||
assert.ifError(err); | ||
s3.get('10M.tmp', {file: './10M.tmp'}, function (err, res) { | ||
s3.get(file, {file: file}, function (err, res) { | ||
assert.ifError(err); | ||
var md5 = crypto.createHash('md5'); | ||
var rs = fs.ReadStream('./10M.tmp'); | ||
var rs = fs.ReadStream(file); | ||
rs.on('data', function (data) { | ||
md5.update(data); | ||
}); | ||
rs.on('end', function () { | ||
var dlMd5 = md5.digest('hex'); | ||
assert.deepEqual(tempMd5, dlMd5); | ||
fs.unlink('./10M.tmp', function (err) { | ||
fs.unlink(file, function (err) { | ||
assert.ifError(err); | ||
s3.del('10M.tmp', function (err, res) { | ||
s3.del(file, function (err, res) { | ||
assert.ifError(err); | ||
@@ -36,2 +44,3 @@ }); | ||
}); | ||
rs.on('error', function (err) { | ||
@@ -46,3 +55,3 @@ assert.ifError(err); | ||
process.on('uncaughtException', function (err) { | ||
fs.unlink('10M.tmp', function () { | ||
fs.unlink(file, function () { | ||
if ( ! caught) { | ||
@@ -49,0 +58,0 @@ caught = true; |
Sorry, the diff of this file is not supported yet
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
146240
68
3610
114