summaryrefslogtreecommitdiffstats
path: root/php-phpspec-prophecy.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-phpspec-prophecy.spec')
-rw-r--r--php-phpspec-prophecy.spec52
1 files changed, 26 insertions, 26 deletions
diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec
index 89aeafb..e2fa0eb 100644
--- a/php-phpspec-prophecy.spec
+++ b/php-phpspec-prophecy.spec
@@ -7,26 +7,27 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 93d39f1f7f9326d746203c7c056f300f7f126073
+%global gh_commit 15ea9ac619e37009edcda64089e3fa4cc88aa659
%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.1
+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
@@ -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,26 +95,20 @@ cp -pr src/* %{buildroot}%{_datadir}/php
%check
%if %{with_tests}
-# remirepo:13
-run=0
-ret=0
-if which php56; then
- php56 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
- run=1
-fi
-if which php71; then
- php71 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/php \
- -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
- %{_bindir}/phpspec \
- run --format pretty --verbose --no-ansi
-# remirepo:2
+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
@@ -128,6 +124,10 @@ exit $ret
%changelog
+* Mon Sep 4 2017 Remi Collet <remi@remirepo.net> - 1.7.1-1
+- Update to 1.7.11
+- use git snapshot for sources
+
* 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