From a2475c8ca824bb370e506c05ed56cca81af6dc43 Mon Sep 17 00:00:00 2001 From: Michael Buettner Date: Tue, 23 Sep 2014 16:54:03 +0200 Subject: [PATCH 1/3] Fix d option to override php.ini settings (org issue #25) --- tasks/lib/builder.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/tasks/lib/builder.js b/tasks/lib/builder.js index 62a491b..e950a90 100644 --- a/tasks/lib/builder.js +++ b/tasks/lib/builder.js @@ -58,11 +58,10 @@ exports.init = function(grunt) { staticBackup: false, noConfiguration: false, includePath: false, - d: false, followOutput: false, failOnFailures: false, - - // See NodeJS exec options + + // See NodeJS exec options // http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback execMaxBuffer: 200*1024 @@ -119,8 +118,7 @@ exports.init = function(grunt) { loader: 'loader', printer: 'printer', repeat: 'repeat', - includePath: 'include-path', - d: 'd' + includePath: 'include-path' }; /** @@ -182,6 +180,21 @@ exports.init = function(grunt) { return options; }; + /** + * Builds options for the php.ini settings + * + * @return array + */ + var buildDOptions = function() { + + var options = []; + + _.each(config.d, function(value, key) { + options.push('-d '+key+'='+value); + }); + return options; + }; + /** * Builds phpunit command * @@ -192,7 +205,8 @@ exports.init = function(grunt) { var options = [].concat( buildFlagOptions(), buildFileOptions(), - buildValuedOptions() + buildValuedOptions(), + buildDOptions() ); return options.join(' '); }; From d5eba00d5380f6ce751dd5690c216601725fcf94 Mon Sep 17 00:00:00 2001 From: michbuett Date: Thu, 28 Jan 2016 10:19:07 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b60811e..ae9d79b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -# grunt-phpunit +# grunt-phpunit-D+ > Grunt plugin for running phpunit. +It's a fork of [grunt-phpunit](https://github.com/SaschaGalley/grunt-phpunit) with enhanced possibilities for the 'd' options. ##Getting Started @@ -11,7 +12,7 @@ If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out th 1. Install this grunt plugin with the following command: ```shell - npm install grunt-phpunit --save-dev + npm install grunt-phpunit-dplus --save-dev ``` From ce8031e4963c5642fa777564305feef9ae283dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCttner?= Date: Thu, 28 Jan 2016 10:26:03 +0100 Subject: [PATCH 3/3] New package name --- package.json | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index fcb8949..b3d256f 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,12 @@ { - "name": "grunt-phpunit", + "name": "grunt-phpunit-dplus", "description": "Grunt plugin for running phpunit.", - "homepage": "https://github.com/SaschaGalley/grunt-phpunit", - "author": { - "name": "Sascha Galley", - "email": "me@xash.at", - "url": "http://xash.at/" - }, + "author": "Michael Büttner ", "repository": { "type": "git", - "url": "git://github.com/SaschaGalley/grunt-phpunit.git" + "url": "git://github.com/michbuett/grunt-phpunit.git" }, - "version": "0.3.6", - "contributors": [{ - "name": "James Cryer", - "email": "chat@jamescryer.com", - "url": "http://www.jamescryer.com/" - }], + "version": "0.4.0", "main": "Gruntfile.js", "engines": { "node": "0.10.x"