-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This modifications fix the use of regex with glob on windows. #89
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ var Hub = module.exports = function Hub(options) { | |
|
||
this._setupEvents(); | ||
|
||
this.mountpoint = "/"; | ||
this.mountpoint = '/'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
||
this.webdriver = options.webdriver; | ||
}; | ||
|
@@ -271,7 +271,6 @@ Hub.prototype._onTowerConnection = function (socket) { | |
|
||
client.on("register", function (message) { | ||
var id = message.agentId; | ||
|
||
if (!id || id === "undefined") { | ||
client.emit("error", "ID required"); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
var util = require("util"); | ||
|
||
var Test = require("./test"); | ||
var path = require('path'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
||
/** | ||
* NullTest represents the absence of a Test. | ||
|
@@ -34,7 +35,7 @@ util.inherits(NullTest, Test); | |
* @return {String} Relative URL for the capture page, relative to the mountpoint. | ||
*/ | ||
NullTest.prototype.getUrlForAgentId = function (agentId) { | ||
return this.mountpoint + "agent/" + agentId; | ||
return this.mountpoint + "agent" + path.sep + agentId; | ||
}; | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
"use strict"; | ||
|
||
var path = require('path'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
/** | ||
* @module test | ||
*/ | ||
|
@@ -34,9 +35,9 @@ function Test(options) { | |
*/ | ||
Test.prototype.getUrlForAgentId = function (agentId) { | ||
var url = this.mountpoint; | ||
url += "agent/" + agentId; | ||
url += "/batch/" + this.batchId; | ||
url += "/test/" + this.location; | ||
url += "agent" + path.sep + agentId; | ||
url += path.sep + "batch" + path.sep + this.batchId; | ||
url += path.sep + "test" + path.sep + this.location; | ||
if (this.query) { url += "?" + this.query; } | ||
return url; | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
"use strict"; | ||
|
||
var path = require('path'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
||
module.exports = function makeURLFromComponents(mountpoint, agentId, batchId, test) { | ||
var url = mountpoint; | ||
|
||
if (url !== "/") { | ||
if (url !== path.sep) { | ||
// XXX So hacky. | ||
url += "/"; | ||
url += path.sep; | ||
} | ||
|
||
url += "agent/" + agentId; | ||
url += "agent" + path.sep + agentId; | ||
|
||
if (test && batchId) { | ||
// XXX if test is true, | ||
// batchId should always be set | ||
url += "/batch/" + batchId; | ||
url += "/test/" + test; | ||
url += path.sep + "batch" + path.sep + batchId; | ||
url += path.sep + "test" + path.sep + test; | ||
} | ||
|
||
return url; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use double-quotes. Thank you!