rename get_core_dir -> getEngineDir

This commit is contained in:
David Glasser
2013-02-25 14:34:25 -08:00
parent d4660e6d5f
commit c2a1012fdd
6 changed files with 10 additions and 10 deletions

View File

@@ -189,7 +189,7 @@ var files = module.exports = {
// an installation.)
in_checkout: function () {
try {
if (fs.existsSync(path.join(files.get_core_dir(), '.git')))
if (fs.existsSync(path.join(files.getEngineDir(), '.git')))
return true;
} catch (e) { console.log(e);}
@@ -199,7 +199,7 @@ var files = module.exports = {
// Read the '.engine_version.txt' file. If in a checkout, throw an error.
getEngineVersion: function () {
if (!files.in_checkout()) {
return fs.readFileSync(path.join(files.get_core_dir(), '.engine_version.txt'));
return fs.readFileSync(path.join(files.getEngineDir(), '.engine_version.txt'));
} else {
throw new Error("Unexpected. Git checkouts don't have engine versions.");
}
@@ -209,13 +209,13 @@ var files = module.exports = {
// install, or (checkout root)/dev_bundle in a checkout..)
get_dev_bundle: function () {
if (files.in_checkout())
return path.join(files.get_core_dir(), 'dev_bundle');
return path.join(files.getEngineDir(), 'dev_bundle');
else
return files.get_core_dir();
return files.getEngineDir();
},
// Return the top-level directory for this meteor install or checkout
get_core_dir: function () {
getEngineDir: function () {
return path.join(__dirname, '..');
},

View File

@@ -408,7 +408,7 @@ var packages = module.exports = {
_localPackageDirs: function () {
var packageDirs = [];
if (files.in_checkout())
packageDirs.push(path.join(files.get_core_dir(), 'packages'));
packageDirs.push(path.join(files.getEngineDir(), 'packages'));
if (process.env.PACKAGE_DIRS)
packageDirs = process.env.PACKAGE_DIRS.split(':').concat(packageDirs);

View File

@@ -330,7 +330,7 @@ var DependencyWatcher = function (deps, app_dir, relativeFiles, on_change) {
// contain individual files)
self.bulk_dirs = [];
_.each(deps.core || [], function (filepath) {
self.bulk_dirs.push(path.join(files.get_core_dir(), filepath));
self.bulk_dirs.push(path.join(files.getEngineDir(), filepath));
});
_.each(deps.app || [], function (filepath) {
self.bulk_dirs.push(path.join(self.app_dir, filepath));

View File

@@ -244,7 +244,7 @@ assert.doesNotThrow(function () {
// shared state, such as cached compiled packages
try {
var result = meteorNpm._execFileSync(
path.join(files.get_core_dir(), "meteor"),
path.join(files.getEngineDir(), "meteor"),
["bundle", path.join(tmpDirToPutBundleTarball, "bundle.tar.gz")],
{cwd: tmpAppDir});
files.rm_recursive(tmpDirToPutBundleTarball);

View File

@@ -53,7 +53,7 @@ updater.get_manifest(function (manifest) {
// Launch post-upgrade script
var nodejs_path = path.join(files.get_dev_bundle(), 'bin', 'node');
var postup_path = path.join(files.get_core_dir(), 'meteor', 'post-upgrade.js');
var postup_path = path.join(files.getEngineDir(), 'meteor', 'post-upgrade.js');
if (fs.existsSync(nodejs_path) && fs.existsSync(postup_path)) {
// setup environment.

View File

@@ -37,7 +37,7 @@ var warehouse = module.exports = {
return process.env.TEST_WAREHOUSE_DIR;
if (files.in_checkout())
return path.join(files.get_core_dir(), '.meteor');
return path.join(files.getEngineDir(), '.meteor');
else
return path.join(process.env.HOME, '.meteor');
},