Update to use local phpunit and local pake. Update pakefile with improved formatting.
This commit is contained in:
parent
389a34b67e
commit
518b9ef3e5
|
@ -41,12 +41,14 @@
|
|||
},
|
||||
"minimum-stability": "dev",
|
||||
"require": {
|
||||
"fabpot/php-cs-fixer": "0.4.0",
|
||||
"indeyets/pake": "~1.99",
|
||||
"kriswallsmith/assetic": "1.1.2",
|
||||
"leafo/lessphp": "v0.4.0",
|
||||
"fabpot/php-cs-fixer": "0.4.0",
|
||||
"michelf/php-markdown": "1.4.0",
|
||||
"michelf/php-smartypants": "1.6.0-beta1",
|
||||
"mustache/mustache": "2.5.1",
|
||||
"phpunit/phpunit": "3.7.*",
|
||||
"simple-html-dom/simple-html-dom": "1.5.0",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"symfony/config": "v2.3.4",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||
],
|
||||
"hash": "595e0fe44b20163b94830bfdd8c643cc",
|
||||
"hash": "87e1f659b849bce922f4a0bffa38d61f",
|
||||
"packages": [
|
||||
{
|
||||
"name": "fabpot/php-cs-fixer",
|
||||
|
@ -53,6 +53,72 @@
|
|||
"description": "A script to automatically fix Symfony Coding Standard",
|
||||
"time": "2014-01-07 09:13:46"
|
||||
},
|
||||
{
|
||||
"name": "indeyets/pake",
|
||||
"version": "1.99.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/indeyets/pake.git",
|
||||
"reference": "410d0d5c18bb3438d323570fdb502402aa7a1aba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/indeyets/pake/zipball/410d0d5c18bb3438d323570fdb502402aa7a1aba",
|
||||
"reference": "410d0d5c18bb3438d323570fdb502402aa7a1aba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": ">=5.2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"simpletest/simpletest": "1.1.*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bz2": "*",
|
||||
"ext-pcntl": "*",
|
||||
"ext-phar": "*",
|
||||
"ext-posix": "*",
|
||||
"ext-zlib": "*",
|
||||
"phing/phing": "2.4.*",
|
||||
"simpletest/simpletest": "1.1.*"
|
||||
},
|
||||
"bin": [
|
||||
"bin/pake"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/pake/autoload.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien.potencier@symfony-project.org",
|
||||
"homepage": "http://fabien.potencier.org/",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Alexey Zakhlestin",
|
||||
"email": "indeyets@gmail.com",
|
||||
"homepage": "https://indeyets.ru/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP automation tool inspired by Rake",
|
||||
"homepage": "https://github.com/indeyets/pake/wiki",
|
||||
"keywords": [
|
||||
"automation",
|
||||
"build",
|
||||
"task"
|
||||
],
|
||||
"time": "2013-11-04 08:29:46"
|
||||
},
|
||||
{
|
||||
"name": "kriswallsmith/assetic",
|
||||
"version": "v1.1.2",
|
||||
|
@ -316,6 +382,381 @@
|
|||
],
|
||||
"time": "2014-01-09 00:36:09"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "1.2.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "466e7cd2554b4e264c9e3f31216d25ac0e5f3d94"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/466e7cd2554b4e264c9e3f31216d25ac0e5f3d94",
|
||||
"reference": "466e7cd2554b4e264c9e3f31216d25ac0e5f3d94",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-file-iterator": ">=1.3.0@stable",
|
||||
"phpunit/php-text-template": ">=1.1.1@stable",
|
||||
"phpunit/php-token-stream": ">=1.1.3@stable"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*@dev"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.0.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHP/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
|
||||
"keywords": [
|
||||
"coverage",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2013-09-10 08:14:32"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
"version": "1.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
|
||||
"reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"File/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
|
||||
"keywords": [
|
||||
"filesystem",
|
||||
"iterator"
|
||||
],
|
||||
"time": "2013-10-10 15:34:57"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
||||
"reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5180896f51c5b3648ac946b05f9ec02be78a0b23",
|
||||
"reference": "5180896f51c5b3648ac946b05f9ec02be78a0b23",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"Text/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Simple template engine.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
|
||||
"keywords": [
|
||||
"template"
|
||||
],
|
||||
"time": "2012-10-31 18:15:28"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
|
||||
"reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHP/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Utility class for timing",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-timer/",
|
||||
"keywords": [
|
||||
"timer"
|
||||
],
|
||||
"time": "2013-08-02 07:42:54"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-token-stream",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||
"reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
|
||||
"reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHP/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Wrapper around PHP's tokenizer extension.",
|
||||
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
|
||||
"keywords": [
|
||||
"tokenizer"
|
||||
],
|
||||
"time": "2014-03-03 05:10:30"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "3.7.x-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "4dbc3ab5de25a9ffd07796519f9f7f4aaddc37e0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4dbc3ab5de25a9ffd07796519f9f7f4aaddc37e0",
|
||||
"reference": "4dbc3ab5de25a9ffd07796519f9f7f4aaddc37e0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-code-coverage": "~1.2.1",
|
||||
"phpunit/php-file-iterator": "~1.3.1",
|
||||
"phpunit/php-text-template": "~1.1.1",
|
||||
"phpunit/php-timer": "~1.0.4",
|
||||
"phpunit/phpunit-mock-objects": "~1.2.0",
|
||||
"symfony/yaml": "~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pear-pear.php.net/pear": "1.9.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-json": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"phpunit/php-invoker": "~1.1"
|
||||
},
|
||||
"bin": [
|
||||
"composer/bin/phpunit"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.7.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHPUnit/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
"",
|
||||
"../../symfony/yaml/"
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "The PHP Unit Testing framework.",
|
||||
"homepage": "http://www.phpunit.de/",
|
||||
"keywords": [
|
||||
"phpunit",
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2014-03-05 12:52:24"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
"version": "1.2.x-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||
"reference": "c39c4511c3b007539eb170c32cbc2af49a07351a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c39c4511c3b007539eb170c32cbc2af49a07351a",
|
||||
"reference": "c39c4511c3b007539eb170c32cbc2af49a07351a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-text-template": ">=1.1.1@stable"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*@dev"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-soap": "*"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHPUnit/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"include-path": [
|
||||
""
|
||||
],
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sb@sebastian-bergmann.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "Mock Object library for PHPUnit",
|
||||
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
|
||||
"keywords": [
|
||||
"mock",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2014-02-16 12:43:56"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/diff",
|
||||
"version": "dev-master",
|
||||
|
|
53
pakefile
53
pakefile
|
@ -34,17 +34,19 @@ pake_alias('default', 'build');
|
|||
|
||||
function run_build() {}
|
||||
|
||||
function run_test() {
|
||||
passthru("phpunit");
|
||||
function run_test()
|
||||
{
|
||||
pake_sh('./vendor/bin/phpunit', true);
|
||||
}
|
||||
|
||||
function run_version() {
|
||||
function run_version()
|
||||
{
|
||||
$composer = json_decode(file_get_contents('composer.json'));
|
||||
echo "\n Building Markdown Resume Builder version " . $composer->version . "\n";
|
||||
echo str_repeat("=", 80) . "\n";
|
||||
pake_echo_comment("Building Markdown Resume Builder version " . $composer->version);
|
||||
}
|
||||
|
||||
function run_version_file() {
|
||||
function run_version_file()
|
||||
{
|
||||
// Find the latest tag
|
||||
$version = trim(shell_exec('git describe --abbrev=0 --tags'));
|
||||
// Write it to the version file for the self update command
|
||||
|
@ -55,14 +57,15 @@ function run_version_file() {
|
|||
file_put_contents('composer.json', json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
|
||||
}
|
||||
|
||||
function run_lint() {
|
||||
echo "\n * Linting files\n";
|
||||
passthru("./build/lint -R ./src");
|
||||
function run_lint()
|
||||
{
|
||||
pake_echo_comment('Linting files');
|
||||
pake_sh('./build/lint -R ./src', true);
|
||||
}
|
||||
|
||||
function run_phar()
|
||||
{
|
||||
echo " * Construction phar and moving to ./bin/md2resume\n";
|
||||
pake_echo_comment('Construction phar and moving to ./bin/md2resume');
|
||||
$command =
|
||||
'rm -f ./bin/md2resume && rm -f ./bin/md2resume.phar &&'
|
||||
. 'php -dphar.readonly=0 build/empir make ./bin/md2resume.phar md2resume_dev.php . --exclude="'
|
||||
|
@ -71,43 +74,45 @@ function run_phar()
|
|||
. '|*squizlabs*|*fabpot*'
|
||||
. '" && chmod a+x ./bin/md2resume.phar'
|
||||
. ' && mv ./bin/md2resume.phar ./bin/md2resume';
|
||||
passthru($command);
|
||||
pake_sh($command, true);
|
||||
}
|
||||
|
||||
function run_sniff()
|
||||
{
|
||||
echo " * Checking files for PSR2\n";
|
||||
passthru("./vendor/bin/phpcs -p --standard=PSR2 ./src/ ./md2resume_dev.php");
|
||||
pake_echo_comment('Checking files for PSR2');
|
||||
pake_sh('./vendor/bin/phpcs -p --standard=PSR2 ./src/ ./md2resume_dev.php', true);
|
||||
}
|
||||
|
||||
function run_fixer()
|
||||
{
|
||||
echo "\n * Running php-cs-fixer\n";
|
||||
passthru(
|
||||
"./vendor/bin/php-cs-fixer fix ./md2resume_dev.php"
|
||||
. " && ./vendor/bin/php-cs-fixer fix ./src/Resume/Cli/"
|
||||
. " && ./vendor/bin/php-cs-fixer fix ./src/Resume/Command/"
|
||||
pake_echo_comment('Running php-cs-fixer');
|
||||
pake_sh(
|
||||
'./vendor/bin/php-cs-fixer fix ./md2resume_dev.php'
|
||||
. ' && ./vendor/bin/php-cs-fixer fix ./src/Resume/Cli/'
|
||||
. ' && ./vendor/bin/php-cs-fixer fix ./src/Resume/Command/',
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
function run_readme()
|
||||
{
|
||||
echo " * Updating README documentation\n";
|
||||
pake_echo_comment('Updating README documentation');
|
||||
|
||||
$startPoint = '## Help';
|
||||
$endPoint = '## Examples';
|
||||
$readme = file_get_contents("README.md");
|
||||
$help = shell_exec("php ./md2resume_dev.php list --no-interaction");
|
||||
$readme = file_get_contents('README.md');
|
||||
$help = shell_exec('php ./md2resume_dev.php list --no-interaction');
|
||||
$output = preg_replace(
|
||||
'/('.preg_quote($startPoint).')(.*)('.preg_quote($endPoint).')/si',
|
||||
"$1\n```\n" . $help . "\n```\n$3",
|
||||
$readme
|
||||
);
|
||||
file_put_contents("README.md", $output);
|
||||
file_put_contents('README.md', $output);
|
||||
}
|
||||
|
||||
function run_mv() {
|
||||
exec('cp ./bin/md2resume ~/bin/md2resume');
|
||||
function run_mv()
|
||||
{
|
||||
pake_sh('cp ./bin/md2resume ~/bin/md2resume', true);
|
||||
}
|
||||
|
||||
/* End of pakefile */
|
||||
|
|
Loading…
Reference in New Issue