Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
fix: Update browserstacktunnel-wrapper & others
Browse files Browse the repository at this point in the history
The browserstacktunnel-wrapper package used by Karma was relying on
outdated interface to the BrowserStackTunnel binary; some options no longer
work, others were not supported.

For back compat fallback to the old tunnelIdentifier option was added.
  • Loading branch information
mgol committed Aug 2, 2015
1 parent 21fc573 commit 23fdc9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ var createBrowserStackTunnel = function(logger, config, emitter) {
return q();
}

if (!bsConfig.tunnelIdentifier) {
bsConfig.tunnelIdentifier = 'karma' + Math.random();
if (!bsConfig.localIdentifier) {
if (bsConfig.tunnelIdentifier) {
// Back compat; the option was renamed.
bsConfig.localIdentifier = bsConfig.tunnelIdentifier;
delete bsConfig.tunnelIdentifier;
}
bsConfig.localIdentifier = 'karma' + Math.random();
}

log.debug('Establishing the tunnel on %s:%s', config.hostname, config.port);

var deferred = q.defer();
var tunnel = new BrowserStackTunnel({
key: process.env.BROWSER_STACK_ACCESS_KEY || bsConfig.accessKey,
tunnelIdentifier: bsConfig.tunnelIdentifier,
localIdentifier: bsConfig.localIdentifier,
jarFile: process.env.BROWSER_STACK_TUNNEL_JAR || bsConfig.jarFile,
hosts: [{
name: config.hostname,
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
],
"author": "Vojta Jina <vojta.jina@gmail.com>",
"dependencies": {
"browserstack": "1.1.1",
"browserstacktunnel-wrapper": "~1.3.0",
"q": "~0.9.6"
"browserstack": "1.2.0",
"browserstacktunnel-wrapper": "~1.4.0",
"q": "~1.4.1"
},
"peerDependencies": {
"karma": ">=0.9"
},
"license": "MIT",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-bump": "~0.0.7",
"grunt-npm": "~0.0.2",
"grunt-auto-release": "~0.0.2"
"grunt": "~0.4.5",
"grunt-auto-release": "~0.0.2",
"grunt-bump": "~0.3.1",
"grunt-npm": "~0.0.2"
},
"contributors": [
"L42y <423300@gmail.com>",
Expand Down

0 comments on commit 23fdc9d

Please sign in to comment.