Skip to content

Commit

Permalink
Construct services with endpoints in browser-builder
Browse files Browse the repository at this point in the history
Handles CloudSearchDomain case (required endpoint)
  • Loading branch information
lsegal committed Jun 26, 2014
1 parent c78cb5a commit 555e536
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist-tools/strategies/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ DefaultStrategy.prototype.getService = function(service, version) {

try {
var ClassName = this.serviceClasses[service];
svc = new ClassName({apiVersion: version});
svc = new ClassName({apiVersion: version, endpoint: 'localhost'});
api = this.apis.load(service, svc.api.apiVersion);
} catch (e) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion dist-tools/test/browser-builder.mocha.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe 'Builder', ->
code = builder.serviceCode.join('\n')

assertServiceAdded = (klass, version) ->
version = version || new helpers.AWS[klass]().api.apiVersion;
version = version || new helpers.AWS[klass](endpoint: 'localhost').api.apiVersion;
expect(code).to.match(new RegExp('AWS\\.' + klass +
' = AWS\\.Service\\.defineService\\(\'' +
helpers.AWS[klass].serviceIdentifier + '\''))
Expand Down

0 comments on commit 555e536

Please sign in to comment.