Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add the --host config option.

Submits jobs to a Yeti server that isn't localhost.
Very useful for long-lived servers that you'd like to share.
  • Loading branch information...
commit 60f0995e0b8927ad3ec81ee4462be2c2ad5c107a 1 parent 3a946db
@reid reid authored
Showing with 8 additions and 13 deletions.
  1. +3 −1 lib/app.js
  2. +5 −12 lib/server.js
View
4 lib/app.js
@@ -17,13 +17,15 @@ exports.boot = function (config) {
if (config.quiet) ui.quiet(config.quiet);
+ if (!config.host) config.host = "localhost";
+
fromConfiguration(config);
};
function fromConfiguration (config) {
var d = {
- host : "localhost",
+ host : config.host,
port : config.port
};
View
17 lib/server.js
@@ -217,8 +217,10 @@ function fromConfiguration (config) {
var app = serveExpress(config.port, config.path, cb);
+ var baseUrl = "http://" + config.host + ":" + config.port;
+
var urls = visitor.composeURLs(
- "http://localhost:" + config.port,
+ baseUrl,
"project" + config.path,
config.files
);
@@ -228,23 +230,14 @@ function fromConfiguration (config) {
urls
);
- var host = "localhost";
-
- require("child_process").exec("uname -n", function (err, stdout) {
- if (stdout) host = stdout.replace(/\n/, "");
- ui.log("Visit " +
- ui.color.bold(
- "http://" + host + ":" + config.port
- ) + " to run tests."
- );
- });
+ ui.log("Visit " + ui.color.bold(baseUrl) + " to run tests.");
if (config.forceVisit) {
ui.log("Running tests locally with: " + config.browsers.join(", "));
return visitor.visit(
config.browsers,
- ["http://localhost:" + config.port]
+ [baseUrl]
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.