You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/09/13 01:35:54 UTC
[13/16] git commit: Fix broken tests due to lazy requiring change.
Fix broken tests due to lazy requiring change.
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/1571f9d1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/1571f9d1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/1571f9d1
Branch: refs/heads/ffos
Commit: 1571f9d15733f0cb2bf1a30cb9117a9c8ec295f1
Parents: 887ee12
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Sep 12 11:49:27 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Sep 12 11:49:27 2013 -0400
----------------------------------------------------------------------
src/util.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/1571f9d1/src/util.js
----------------------------------------------------------------------
diff --git a/src/util.js b/src/util.js
index 53eb8dd..1a4e4d5 100644
--- a/src/util.js
+++ b/src/util.js
@@ -135,8 +135,11 @@ exports = module.exports = {
};
function addModuleProperty(module, symbol, modulePath, opt_obj) {
+ var val = null;
Object.defineProperty(opt_obj || module.exports, symbol, {
- get : function() { return module.require(modulePath); }});
+ get : function() { return val = val || module.require(modulePath); },
+ set : function(v) { val = v; }
+ });
}
addModuleProperty(module, 'config_parser', './config_parser');