Compare commits
21 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06c9445805 | ||
|
|
bb0f9ab3d3 | ||
|
|
322882e2d1 | ||
|
|
d7eda9203a | ||
|
|
0454434e6b | ||
|
|
d3fb1c9fa0 | ||
|
|
2d67f99df2 | ||
|
|
1367371ff4 | ||
|
|
f67f3d64e9 | ||
|
|
d5bf29f550 | ||
|
|
90596556af | ||
|
|
02ab5a687d | ||
|
|
a8d6d21b0f | ||
|
|
a5eddf3784 | ||
|
|
ebfa3c361a | ||
|
|
c8575294c2 | ||
|
|
a31bb60d92 | ||
|
|
f5e43cf97a | ||
|
|
d7cd3c6c5f | ||
|
|
b4bf844153 | ||
|
|
4cc33b77cb |
5 changed files with 128 additions and 29 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,3 +1,6 @@
|
||||||
/php-mnapoli-phpunit-easymock-0.2.1-77d949eb6ecd9739b4300a26c85022975f653760.tar.gz
|
/php-mnapoli-phpunit-easymock-0.2.1-77d949eb6ecd9739b4300a26c85022975f653760.tar.gz
|
||||||
/php-mnapoli-phpunit-easymock-0.2.2-aa0fa90a768046113c60afdd7426dbc4ec76463f.tar.gz
|
/php-mnapoli-phpunit-easymock-0.2.2-aa0fa90a768046113c60afdd7426dbc4ec76463f.tar.gz
|
||||||
/php-mnapoli-phpunit-easymock-0.2.3-023279dbe33f6e6eaace7c76d1fef9adf3f7cf4c.tar.gz
|
/php-mnapoli-phpunit-easymock-0.2.3-023279dbe33f6e6eaace7c76d1fef9adf3f7cf4c.tar.gz
|
||||||
|
/php-mnapoli-phpunit-easymock-1.1.0-cd71d4d897bab9cba02afd01af7701caf54e8b03.tar.gz
|
||||||
|
/php-mnapoli-phpunit-easymock-1.2.0-11b754737e25c27bb2591c9e21959cd80b03a1aa.tar.gz
|
||||||
|
/php-mnapoli-phpunit-easymock-1.3.0-3620599d773e9c4924acc7e40061047c75bac574.tar.gz
|
||||||
|
|
|
||||||
22
composer.json
Normal file
22
composer.json
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"name": "mnapoli/phpunit-easymock",
|
||||||
|
"description": "Helpers to build PHPUnit mocks",
|
||||||
|
"keywords": ["phpunit", "mock"],
|
||||||
|
"homepage": "https://github.com/mnapoli/phpunit-easymock",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"EasyMock\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"EasyMock\\Test\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.3",
|
||||||
|
"phpunit/phpunit": "^8.5|^9.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -17,13 +17,17 @@ function print {
|
||||||
echo -e "\e[0;33m>>>>> ${1}\e[0m"
|
echo -e "\e[0;33m>>>>> ${1}\e[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -x "$1" ]
|
if [ -n "$1" ]
|
||||||
then
|
then
|
||||||
SPEC=$1
|
SPEC=$1
|
||||||
else
|
else
|
||||||
SPEC=`ls *.spec | head -1`
|
SPEC=`ls *.spec | head -1`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SPEC_DIR=`pwd`
|
||||||
|
|
||||||
|
print "SPEC_DIR = $SPEC_DIR"
|
||||||
|
|
||||||
NAME=`echo $SPEC | sed 's#\.spec##'`
|
NAME=`echo $SPEC | sed 's#\.spec##'`
|
||||||
VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
|
VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
|
||||||
|
|
||||||
|
|
@ -58,7 +62,7 @@ pushd $TEMP_DIR
|
||||||
|
|
||||||
mv $GIT_DIR $TAR_DIR
|
mv $GIT_DIR $TAR_DIR
|
||||||
|
|
||||||
TAR_FILE=`$RPM --eval='%{_sourcedir}'`/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
|
TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
|
||||||
print "TAR_FILE = $TAR_FILE"
|
print "TAR_FILE = $TAR_FILE"
|
||||||
|
|
||||||
[ -e $TAR_FILE ] && rm -f $TAR_FILE
|
[ -e $TAR_FILE ] && rm -f $TAR_FILE
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# Fedora spec file for php-mnapoli-phpunit-easymock
|
# Fedora spec file for php-mnapoli-phpunit-easymock
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2017 Shawn Iwinski <shawn@iwin.ski>
|
# Copyright (c) 2016-2020 Shawn Iwinski <shawn@iwin.ski>
|
||||||
#
|
#
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# http://opensource.org/licenses/MIT
|
# http://opensource.org/licenses/MIT
|
||||||
|
|
@ -11,34 +11,40 @@
|
||||||
|
|
||||||
%global github_owner mnapoli
|
%global github_owner mnapoli
|
||||||
%global github_name phpunit-easymock
|
%global github_name phpunit-easymock
|
||||||
%global github_version 0.2.3
|
%global github_version 1.3.0
|
||||||
%global github_commit 023279dbe33f6e6eaace7c76d1fef9adf3f7cf4c
|
%global github_commit 3620599d773e9c4924acc7e40061047c75bac574
|
||||||
|
|
||||||
%global composer_vendor mnapoli
|
%global composer_vendor mnapoli
|
||||||
%global composer_project phpunit-easymock
|
%global composer_project phpunit-easymock
|
||||||
|
|
||||||
# "php": "~5.4|~7.0"
|
# "php": "^7.3"
|
||||||
%global php_min_ver 5.4
|
%global php_min_ver 7.3
|
||||||
# "phpunit/phpunit-mock-objects": "~2.0|~3.0"
|
# "phpunit/phpunit": "^8.5|^9.0"
|
||||||
%global phpunit_mock_objects_min_ver 2.0
|
%global phpunit8_min_ver 8.5
|
||||||
%global phpunit_mock_objects_max_ver 4.0
|
%global phpunit9_min_ver 9.0
|
||||||
|
|
||||||
# Build using "--without tests" to disable tests
|
# Build using "--without tests" to disable tests
|
||||||
%global with_tests 0%{!?_without_tests:1}
|
%global with_tests 0%{!?_without_tests:1}
|
||||||
|
|
||||||
|
# Rich dependencies supported?
|
||||||
|
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
|
||||||
|
%global with_rich_dependencies 1
|
||||||
|
%else
|
||||||
|
%global with_rich_dependencies 0
|
||||||
|
%endif
|
||||||
|
|
||||||
%{!?phpdir: %global phpdir %{_datadir}/php}
|
%{!?phpdir: %global phpdir %{_datadir}/php}
|
||||||
|
|
||||||
Name: php-%{composer_vendor}-%{composer_project}
|
Name: php-%{composer_vendor}-%{composer_project}
|
||||||
Version: %{github_version}
|
Version: %{github_version}
|
||||||
Release: 6%{?github_release}%{?dist}
|
Release: 13%{?github_release}%{?dist}
|
||||||
Summary: Helpers to build PHPUnit mocks
|
Summary: Helpers to build PHPUnit mocks
|
||||||
|
|
||||||
Group: Development/Libraries
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/%{github_owner}/%{github_name}
|
URL: https://github.com/%{github_owner}/%{github_name}
|
||||||
|
|
||||||
# GitHub export does not include tests.
|
# GitHub export does not include tests
|
||||||
# Run php-mnapoli-phpunit-easymock-get-source.sh to create full source.
|
# Run php-mnapoli-phpunit-easymock-get-source.sh to create full source
|
||||||
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
|
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
|
||||||
Source1: %{name}-get-source.sh
|
Source1: %{name}-get-source.sh
|
||||||
|
|
||||||
|
|
@ -47,10 +53,10 @@ BuildArch: noarch
|
||||||
%if %{with_tests}
|
%if %{with_tests}
|
||||||
## composer.json
|
## composer.json
|
||||||
BuildRequires: php(language) >= %{php_min_ver}
|
BuildRequires: php(language) >= %{php_min_ver}
|
||||||
BuildRequires: php-composer(phpunit/phpunit-mock-objects) < %{phpunit_mock_objects_max_ver}
|
# test suite run with all allowed versions
|
||||||
BuildRequires: php-composer(phpunit/phpunit-mock-objects) >= %{phpunit_mock_objects_min_ver}
|
BuildRequires: phpunit8 >= %{phpunit8_min_ver}
|
||||||
BuildRequires: php-composer(phpunit/phpunit)
|
BuildRequires: phpunit9 >= %{phpunit9_min_ver}
|
||||||
## phpcompatinfo (computed from version 0.2.3)
|
## phpcompatinfo (computed from version 1.3.0)
|
||||||
BuildRequires: php-reflection
|
BuildRequires: php-reflection
|
||||||
## Autoloader
|
## Autoloader
|
||||||
BuildRequires: php-composer(fedora/autoloader)
|
BuildRequires: php-composer(fedora/autoloader)
|
||||||
|
|
@ -58,9 +64,12 @@ BuildRequires: php-composer(fedora/autoloader)
|
||||||
|
|
||||||
# composer.json
|
# composer.json
|
||||||
Requires: php(language) >= %{php_min_ver}
|
Requires: php(language) >= %{php_min_ver}
|
||||||
Requires: php-composer(phpunit/phpunit-mock-objects) < %{phpunit_mock_objects_max_ver}
|
#
|
||||||
Requires: php-composer(phpunit/phpunit-mock-objects) >= %{phpunit_mock_objects_min_ver}
|
%if %{with_rich_dependencies}
|
||||||
# phpcompatinfo (computed from version 0.2.3)
|
# Single version required at runtime
|
||||||
|
Requires: (phpunit8 >= %{phpunit8_min_ver} or phpunit9 >= %{phpunit9_min_ver})
|
||||||
|
%endif
|
||||||
|
# phpcompatinfo (computed from version 1.3.0)
|
||||||
# <none>
|
# <none>
|
||||||
# Autoloader
|
# Autoloader
|
||||||
Requires: php-composer(fedora/autoloader)
|
Requires: php-composer(fedora/autoloader)
|
||||||
|
|
@ -90,10 +99,6 @@ cat <<'AUTOLOAD' | tee src/autoload.php
|
||||||
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
|
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
|
||||||
|
|
||||||
\Fedora\Autoloader\Autoload::addPsr4('EasyMock\\', __DIR__);
|
\Fedora\Autoloader\Autoload::addPsr4('EasyMock\\', __DIR__);
|
||||||
|
|
||||||
\Fedora\Autoloader\Dependencies::required(array(
|
|
||||||
'%{phpdir}/PHPUnit/Framework/MockObject/Autoload.php',
|
|
||||||
));
|
|
||||||
AUTOLOAD
|
AUTOLOAD
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -113,8 +118,15 @@ BOOTSTRAP
|
||||||
|
|
||||||
: Upstream tests
|
: Upstream tests
|
||||||
RETURN_CODE=0
|
RETURN_CODE=0
|
||||||
PHPUNIT=$(which phpunit)
|
PHPUNIT=$(which phpunit8)
|
||||||
for PHP_EXEC in "" %{?rhel:php55} php56 php70 php71 php72; do
|
for PHP_EXEC in "" php73 php74; do
|
||||||
|
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
|
||||||
|
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|
||||||
|
|| RETURN_CODE=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
PHPUNIT=$(which phpunit9)
|
||||||
|
for PHP_EXEC in "" php73 php74 php80; do
|
||||||
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
|
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
|
||||||
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|
||||||
|| RETURN_CODE=1
|
|| RETURN_CODE=1
|
||||||
|
|
@ -135,6 +147,64 @@ exit $RETURN_CODE
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-13
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Aug 24 2020 Remi Collet <remirepo.net> -1.3.0-2
|
||||||
|
- allow phpunit8 and phpunit9
|
||||||
|
|
||||||
|
* Fri Aug 21 2020 Shawn Iwinski <shawn@iwin.ski> - 1.3.0-1
|
||||||
|
- Update to 1.3.0 (RHBZ #1784948)
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Apr 09 2020 Shawn Iwinski <shawn@iwin.ski> - 1.2.0-1
|
||||||
|
- Update to 1.2.0 (RHBZ #1784948)
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun May 26 2019 Shawn Iwinski <shawn@iwin.ski> - 1.1.0-1
|
||||||
|
- Update to 1.1.0 (RHBZ #1512241)
|
||||||
|
- Add range version dependencies for Fedora >= 27 || RHEL >= 8
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-6
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
|
@ -144,7 +214,7 @@ exit $RETURN_CODE
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-4
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
* Mon May 15 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.2.3-3
|
* Mon May 15 2017 Shawn Iwinski <shawn@iwin.ski> - 0.2.3-3
|
||||||
- Switch autoloader to php-composer(fedora/autoloader)
|
- Switch autoloader to php-composer(fedora/autoloader)
|
||||||
- Add max versions to build dependencies
|
- Add max versions to build dependencies
|
||||||
- Test with SCLs if available
|
- Test with SCLs if available
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
b6a31045a7ef01e8da47464f123d5fc1 php-mnapoli-phpunit-easymock-0.2.3-023279dbe33f6e6eaace7c76d1fef9adf3f7cf4c.tar.gz
|
SHA512 (php-mnapoli-phpunit-easymock-1.3.0-3620599d773e9c4924acc7e40061047c75bac574.tar.gz) = fdea18a7ab6301e97d127ea680c6f40b1f26b12ec9de898c58dcbf7784e160fab04ddc6ed1f7aba08b99845c96da435b655d2c7ca9bf852a6111a7931a63a536
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue