diff options
-rw-r--r-- | composer.json | 11 | ||||
-rw-r--r-- | php-erusev-parsedown.spec | 35 |
2 files changed, 33 insertions, 13 deletions
diff --git a/composer.json b/composer.json index b7f8aea..f8b40f8 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,21 @@ } ], "require": { - "php": ">=5.3.0" + "php": ">=5.3.0", + "ext-mbstring": "*" }, "require-dev": { "phpunit/phpunit": "^4.8.35" }, "autoload": { "psr-0": {"Parsedown": ""} + }, + "autoload-dev": { + "psr-0": { + "TestParsedown": "test/", + "ParsedownTest": "test/", + "CommonMarkTest": "test/", + "CommonMarkTestWeak": "test/" + } } } diff --git a/php-erusev-parsedown.spec b/php-erusev-parsedown.spec index 171a982..198299f 100644 --- a/php-erusev-parsedown.spec +++ b/php-erusev-parsedown.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-erusev-parsedown # -# Copyright (c) 2017 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2017-2019 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -12,8 +12,8 @@ %global github_owner erusev %global github_name parsedown -%global github_version 1.6.4 -%global github_commit fbe3fe878f4fe69048bb8a52783a09802004f548 +%global github_version 1.7.1 +%global github_commit 92e9c27ba0e74b8b028b111d1b6f956a15c01fc1 %global composer_vendor erusev %global composer_project parsedown @@ -31,7 +31,6 @@ Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: Markdown parser in PHP -Group: Development/Libraries License: MIT URL: http://parsedown.org @@ -45,21 +44,20 @@ BuildArch: noarch %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) >= 4.8.35 -## phpcompatinfo (computed from version 1.6.4) +BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php-mbstring +## phpcompatinfo (computed from version 1.7.1) BuildRequires: php-pcre BuildRequires: php-spl ## Autoloader -BuildRequires: php-composer(fedora/autoloader) +BuildRequires: php-fedora-autoloader-devel %endif # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 1.6.4) Requires: php-mbstring +# phpcompatinfo (computed from version 1.7.1) Requires: php-pcre -Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) @@ -100,13 +98,23 @@ cp -rp Parsedown.php autoload.php \ %check %if %{with_tests} +: Create tests bootstrap +%{_bindir}/phpab --output bootstrap.php test +cat <<'BOOTSTRAP' | tee -a bootstrap.php + +require_once '%{buildroot}%{phpdir}/%{composer_vendor}/%{composer_project}/autoload.php'; + +if (!class_exists('PHPUnit\\Framework\\TestCase')) { + class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\\Framework\\TestCase'); +} +BOOTSTRAP + : Upstream tests RETURN_CODE=0 PHPUNIT=$(which phpunit) -for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71 php72; do +for PHP_EXEC in php php70 php71 php72 php73; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC $PHPUNIT --verbose \ - --bootstrap %{buildroot}%{phpdir}/%{composer_vendor}/%{composer_project}/autoload.php \ + $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ || RETURN_CODE=1 fi done @@ -126,6 +134,9 @@ exit $RETURN_CODE %changelog +* Sun Feb 24 2019 Shawn Iwinski <shawn@iwin.ski> - 1.7.1-1 +- Update to 1.7.1 (RHBZ #1569512 / RHBZ #1569513 / RHBZ #1569514 / CVE-2018-1000162) + * Thu Dec 14 2017 Shawn Iwinski <shawn@iwin.ski> - 1.6.4-1 - Update to 1.6.4 (RHBZ #1513209) |