Comparing version 0.0.8 to 0.0.9
@@ -32,3 +32,2 @@ /* jshint laxcomma: true */ | ||
this.asattachment = false; // must be explicitly set eg. aws3.asattachment = true; | ||
this.awsregion = Aws3.awsRegion; | ||
} | ||
@@ -108,4 +107,4 @@ | ||
Aws3.prototype.regionExtension = function() { | ||
if (this.awsregion !== 'us-east-1') { | ||
return '-'+this.awsregion; | ||
if (Aws3.awsRegion !== 'us-east-1') { | ||
return '-'+Aws3.awsRegion; | ||
} | ||
@@ -112,0 +111,0 @@ return ''; |
{ | ||
"name": "aws3.js", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Simple AWS S3 Generator", | ||
@@ -5,0 +5,0 @@ "main": "aws3.js", |
@@ -144,31 +144,14 @@ /* jshint laxcomma: true */ | ||
describe('alternate regions', function() { | ||
describe('#subdomain', function() { | ||
it('defaults to the us-east-1 region', function() { | ||
var aws3 = new Aws3('large.txt', 'text/plain'); | ||
assert.equal(aws3.subdomain(), 's3'); | ||
var aws32 = new Aws3('large.txt', 'text/plain'); | ||
aws32.awsregion = 'us-east-1'; | ||
assert.equal(aws32.subdomain(), 's3'); | ||
}); | ||
it('can have the region set globally', function() { | ||
it('uses the defined region', function() { | ||
Aws3.awsRegion = 'us-west-2'; | ||
var aws3 = new Aws3('large.txt', 'text/plain'); | ||
assert.equal(aws3.subdomain(), 's3-us-west-2'); | ||
var aws32 = new Aws3('large.txt', 'text/plain'); | ||
assert.equal(aws32.subdomain(), 's3-us-west-2'); | ||
}); | ||
it('can have the region set for each instance', function() { | ||
var aws3 = new Aws3('large.txt', 'text/plain'); | ||
aws3.awsregion = 'us-west-2'; | ||
assert.equal(aws3.subdomain(), 's3-us-west-2'); | ||
var aws32 = new Aws3('large.txt', 'text/plain'); | ||
aws32.awsregion = 'us-west-3'; | ||
assert.equal(aws32.subdomain(), 's3-us-west-3'); | ||
}); | ||
}); | ||
}); |
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
8563
255