Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Remi Collet
d50c6d9567 v1.7.3
(cherry picked from commit 510ca073d3)
2017-11-27 11:27:23 +01:00
Remi Collet
1db86f14e7 v1.7.2
(cherry picked from commit a1d6f3e112)
2017-09-05 07:10:26 +02:00
Remi Collet
deaed185a7 Update to 1.7.1
use git snapshot for sources
skip test with phpspec v4

(cherry picked from commit 485bbf906f)
2017-09-04 12:04:43 +02:00
4 changed files with 68 additions and 13 deletions

3
.gitignore vendored
View file

@ -7,3 +7,6 @@ clog
/prophecy-1.6.1-58a8137.tar.gz
/prophecy-1.6.2-6c52c27.tar.gz
/prophecy-1.7.0-93d39f1.tar.gz
/php-phpspec-prophecy-1.7.1-15ea9ac.tgz
/php-phpspec-prophecy-1.7.2-c9b8c60.tgz
/php-phpspec-prophecy-1.7.3-e4ed002.tgz

28
makesrc.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
NAME=$(basename $PWD)
OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
SHORT=${COMMIT:0:7}
echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
echo "Cloning..."
rm -rf $PROJECT-$COMMIT
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
echo "Getting commit..."
pushd $PROJECT-$COMMIT
git checkout $COMMIT
cp composer.json ../composer.json
popd
echo "Archiving..."
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
echo "Cleaning..."
rm -rf $PROJECT-$COMMIT
echo "Done."

View file

@ -7,26 +7,27 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
%global gh_commit 93d39f1f7f9326d746203c7c056f300f7f126073
%global gh_commit e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpspec
%global gh_project prophecy
%if %{bootstrap}
# no test because of circular dependency with phpspec
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
%global with_tests 0%{?_with_tests:1}
%else
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%global with_tests 0%{!?_without_tests:1}
%endif
Name: php-phpspec-prophecy
Version: 1.7.0
Release: 4%{?dist}
Version: 1.7.3
Release: 1%{?dist}
Summary: Highly opinionated mocking framework for PHP
Group: Development/Libraries
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
Source0: %{name}-%{version}-%{gh_short}.tgz
Source2: makesrc.sh
# Autoloader
Source1: %{name}-autoload.php
@ -35,7 +36,7 @@ BuildArch: noarch
%if %{with_tests}
# from composer.json, "require-dev": {
# "phpspec/phpspec": "^2.5|^3.2"
# "phpunit/phpunit": "^4.8 || ^5.6.5"
# "phpunit/phpunit": "^4.8.35 || ^5.7"
BuildRequires: php-composer(phpspec/phpspec) >= 2.5
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
@ -43,12 +44,13 @@ BuildRequires: php-composer(fedora/autoloader)
# from composer.json, "requires": {
# "php": "^5.3|^7.0",
# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
# "sebastian/comparator": "^1.1|^2.0",
# "doctrine/instantiator": "^1.0.2",
# "sebastian/recursion-context": "^1.0|^2.0|^3.0"
Requires: php(language) >= 5.3
Requires: php-composer(phpdocumentor/reflection-docblock) >= 2.0
# ignore v4 for now
Requires: php-composer(phpdocumentor/reflection-docblock) < 4
Requires: php-composer(sebastian/comparator) >= 1.1
Requires: php-composer(sebastian/comparator) < 3
@ -93,10 +95,21 @@ cp -pr src/* %{buildroot}%{_datadir}/php
%check
%if %{with_tests}
%{_bindir}/php \
-d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
%{_bindir}/phpspec \
run --format pretty --verbose --no-ansi
phpspec --version
VER=$(phpspec --version | sed -n -e 's/.* //;s/\..*$//;p')
if [ $VER -ge 4 ]; then
: phpspec $VER is too recent
exit 0
fi
ret=0
for cmd in php php70 php71 php72; do
if which $cmd; then
$cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
%{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
fi
done
exit $ret
%else
: Test suite disabled
%endif
@ -111,6 +124,17 @@ cp -pr src/* %{buildroot}%{_datadir}/php
%changelog
* Mon Nov 27 2017 Remi Collet <remi@remirepo.net> - 1.7.3-1
- Update to 1.7.3
* Tue Sep 5 2017 Remi Collet <remi@remirepo.net> - 1.7.2-1
- Update to 1.7.2
* Mon Sep 4 2017 Remi Collet <remi@remirepo.net> - 1.7.1-1
- Update to 1.7.1
- use git snapshot for sources
- skip test with phpspec v4
* Thu Apr 13 2017 Shawn Iwinski <shawn@iwin.ski> - 1.7.0-4
- Prepare for php-phpdocumentor-reflection-docblock =>
php-phpdocumentor-reflection-docblock2 dependency rename

View file

@ -1 +1 @@
SHA512 (prophecy-1.7.0-93d39f1.tar.gz) = 3dd8ee1011d89936d880bc6d405dbc94a01e8f8ade1226264d4224cfd8acd8fa842485dba733a02cc7a8cd869fd7c3f5963d1a0dcb26c215a9534a6307d52f3d
SHA512 (php-phpspec-prophecy-1.7.3-e4ed002.tgz) = f2dd8f7162c400683c88acc9dc276291495e0d2bb4b486dc7c96219e23f22e8a08924c250d708ea5502c07aae6e157a3737628952c9e333dba143518330eb3b7