diff --git a/tools/commands.js b/tools/commands.js index 4e42276acb..5cc58ced94 100644 --- a/tools/commands.js +++ b/tools/commands.js @@ -1409,7 +1409,7 @@ main.registerCommand({ browserstack: options.browserstack }; - return selftest.runTests({ + return selftest.runTests({ onlyChanged: options.changed, offline: offline, includeSlowTests: options.slow, diff --git a/tools/config.js b/tools/config.js index d34b3a9e06..916a01376b 100644 --- a/tools/config.js +++ b/tools/config.js @@ -161,22 +161,24 @@ _.extend(exports, { if (!serverUrl) serverUrl = self.getPackageServerUrl(); var serLen = serverUrl.length; - // Chop off http:// and https://. - serverUrl = serverUrl.replace(/^\https:/, ''); - serverUrl = serverUrl.replace(/^\http:/, ''); - serverUrl = serverUrl.slice(2, serLen); + // Chop off http:// and https:// and trailing slashes. + serverUrl = serverUrl.replace(/^\https:\/\//, ''); + serverUrl = serverUrl.replace(/^\http:\/\//, ''); + serverUrl = serverUrl.replace(/\/+$/, ''); // Chop off meteor.com. - serverUrl = serverUrl.replace(/meteor\.com/, ''); + serverUrl = serverUrl.replace(/\.meteor\.com$/, ''); + + // Replace other weird stuff with X. + serverUrl = serverUrl.replace(/[^a-zA-Z0-9.:-]/g, 'X'); // Should look like 'packages.data.json' in the default case // (test-packages.data.json before 0.9.0). - return serverUrl + "data.json"; + return serverUrl + ".data.json"; }, getPackageStorage: function() { var self = this; - var serverFile = self.getPackageServerUrl() + ".data.json"; return path.join(tropohouse.default.root, "package-metadata", "v1", self.getLocalPackageCacheFilename()); diff --git a/tools/selftest.js b/tools/selftest.js index 6290edd78f..0e55c8604e 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -578,9 +578,9 @@ _.extend(Sandbox.prototype, { // releases containing that tool only (and no packages). // // packageServerUrl indicates which package server we think we are using. Use - // the default, if we do not pass this in -- which means that if you - // initialize a warehouse w/o specifying the packageServerUrl and *then* set a - // new PACKAGE_SERVER_URL environment variable, you will be sad. + // the default, if we do not pass this in; you should pass it in any case that + // you will be specifying $METEOR_PACKAGE_SERVER_URL in the environment of a + // command you are running in this sandbox. _makeWarehouse: function (releases, packageServerUrl) { var self = this; files.mkdir_p(path.join(self.warehouse, 'packages'), 0755);