Merge branch 'meteor-mongo' into linker

This commit is contained in:
Emily Stark
2013-06-14 15:32:21 -07:00
2 changed files with 21 additions and 1 deletions

View File

@@ -228,3 +228,11 @@ exports.logs = function (options) {
logReader.close();
}
};
// options:
// - context
// - app
exports.tempMongoUrl = function (options) {
var galaxy = getGalaxy(options.context);
return galaxy.call('getTempMongoUrl', options.app);
};

View File

@@ -790,7 +790,19 @@ Fiber(function () {
} else if (new_argv._.length === 2) {
// remote mode
deploy.mongo(new_argv._[1], new_argv.url);
if (!!context.galaxyUrl) {
var deployGalaxy = require('./deploy-galaxy.js');
var url = deployGalaxy.tempMongoUrl({
app: new_argv._[1],
context: context
});
if (new_argv.url)
process.stdout.write(url + "\n");
else
deploy.run_mongo_shell(url);
} else {
deploy.mongo(new_argv._[1], new_argv.url);
}
} else {
// usage