diff options
| author | Vojta Jina | 2011-05-24 13:57:52 +0200 | 
|---|---|---|
| committer | Igor Minar | 2011-06-06 22:52:01 -0700 | 
| commit | d05e83992023c0aa8c663ac187529abf45dfe533 (patch) | |
| tree | 6f69ae45097a8cc9904704c0683a7a71a48c3d1c /lib | |
| parent | 22dee3e27884f357654a470ce2afea08bedcb138 (diff) | |
| download | angular.js-d05e83992023c0aa8c663ac187529abf45dfe533.tar.bz2 | |
Use node's vm module instead of deprecated process.compile
So that I don't have to watch the warning all the time :-D
Diffstat (limited to 'lib')
| -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; | 
