Merge branch 'master' of https://github.com/magalhas/grunt-contrib-jasmine into magalhas-master

* 'master' of https://github.com/magalhas/grunt-contrib-jasmine:
  including es5-shim instead of standalone bind polyfill
This commit is contained in:
Jarrod Overson 2014-02-27 14:25:44 -08:00
commit f610a2b388
3 changed files with 4 additions and 27 deletions

View File

@ -30,7 +30,8 @@
"grunt-lib-phantomjs": "~0.4.0", "grunt-lib-phantomjs": "~0.4.0",
"rimraf": "~2.1.4", "rimraf": "~2.1.4",
"chalk": "~0.4.0", "chalk": "~0.4.0",
"lodash": "~2.4.1" "lodash": "~2.4.1",
"es5-shim": "~2.3.0"
}, },
"devDependencies": { "devDependencies": {
"grunt-contrib-internal": "~0.4.5", "grunt-contrib-internal": "~0.4.5",

View File

@ -1,24 +0,0 @@
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
FNOP = function () {},
fBound = function () {
return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
};
FNOP.prototype = this.prototype;
fBound.prototype = new FNOP();
return fBound;
};
}

View File

@ -58,7 +58,7 @@ exports.init = function(grunt, phantomjs) {
if (fs.existsSync(path)) exports.copyTempFile(path, name); if (fs.existsSync(path)) exports.copyTempFile(path, name);
}); });
exports.copyTempFile(__dirname + '/../helpers/phantom-polyfill.js', 'phantom-polyfill.js'); exports.copyTempFile(__dirname + '/../../node_modules/es5-shim/es5-shim.js', 'es5-shim.js');
var reporters = [ var reporters = [
tempDir + '/reporter.js' tempDir + '/reporter.js'
@ -71,7 +71,7 @@ exports.init = function(grunt, phantomjs) {
jasmineCss = jasmineCss.concat(options.styles); jasmineCss = jasmineCss.concat(options.styles);
var polyfills = [ var polyfills = [
tempDir + '/phantom-polyfill.js' tempDir + '/es5-shim.js'
]; ];
var jasmineCore = [ var jasmineCore = [