diff options
| -rw-r--r-- | lib/jasmine-1.0.1/index.js | 9 | ||||
| -rw-r--r-- | lib/showdown/index.js | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/jasmine-1.0.1/index.js b/lib/jasmine-1.0.1/index.js index 6c57d20a..219f4238 100644 --- a/lib/jasmine-1.0.1/index.js +++ b/lib/jasmine-1.0.1/index.js @@ -1,6 +1,7 @@ var fs = require('fs'); var sys = require('sys'); var path = require('path'); +var vm = require('vm'); var filename = __dirname + '/jasmine.js'; global.window = { @@ -10,7 +11,7 @@ global.window = { clearInterval: clearInterval }; var src = fs.readFileSync(filename); -var jasmine = process.compile(src + '\njasmine;', filename); +var jasmine = vm.runInThisContext(src + '\njasmine;', filename); delete global.window; function noop(){} @@ -41,10 +42,10 @@ jasmine.executeSpecsInFolder = function(folder, done, isVerbose, showColors, mat jasmineEnv.reporter = { log: function(str){ }, - + reportSpecStarting: function(runner) { }, - + reportRunnerStarting: function(runner) { sys.puts('Started'); start = Number(new Date); @@ -135,7 +136,7 @@ jasmine.getAllSpecFiles = function(dir, matcher){ } } } - + return specs; }; diff --git a/lib/showdown/index.js b/lib/showdown/index.js index 59a97233..370b93af 100644 --- a/lib/showdown/index.js +++ b/lib/showdown/index.js @@ -1,6 +1,7 @@ var fs = require('fs'); +var vm = require('vm'); var filename = __dirname + '/showdown-0.9.js'; var src = fs.readFileSync(filename); -var Showdown = process.compile(src + '\nShowdown;', filename); +var Showdown = vm.runInThisContext(src + '\nShowdown;', filename); exports.Showdown = Showdown; |
