minor cleanup

This commit is contained in:
David Glasser
2014-07-25 14:12:21 -07:00
parent a8e372221d
commit 59d38b28bb
3 changed files with 13 additions and 11 deletions

View File

@@ -1409,7 +1409,7 @@ main.registerCommand({
browserstack: options.browserstack
};
return selftest.runTests({
return selftest.runTests({
onlyChanged: options.changed,
offline: offline,
includeSlowTests: options.slow,

View File

@@ -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());

View File

@@ -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);