From 0821e9fa9f35de961ff3a5f6d6c416f4c8ac48a2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 19 Apr 2015 07:46:00 +0200 Subject: php-phpspec: 2.2.0 --- php-phpspec.spec | 25 +++++++++++++++++-------- phpspec-autoload.php | 11 +++++++++-- phpspec-rpm.patch | 12 +++--------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/php-phpspec.spec b/php-phpspec.spec index c691df1..8b7b006 100644 --- a/php-phpspec.spec +++ b/php-phpspec.spec @@ -6,15 +6,15 @@ # # Please, preserve the changelog entries # -%global gh_commit 66a1df93099282b1514e9e001fcf6e9393f7783d +%global gh_commit 9727d75919a00455433e867565bc022f0b985a39 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project phpspec Name: php-phpspec -Version: 2.1.1 +Version: 2.2.0 Release: 1%{?dist} -Summary: Specification-oriented BDD framework for PHP 5.3+ +Summary: Specification-oriented BDD framework for PHP Group: Development/Libraries License: MIT @@ -29,7 +29,7 @@ Patch0: %{gh_project}-rpm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: %{_bindir}/phpunit -BuildRequires: php-composer(phpspec/prophecy) >= 1.1 +BuildRequires: php-composer(phpspec/prophecy) >= 1.4 BuildRequires: php-composer(phpspec/php-diff) >= 1.0.0 BuildRequires: php-composer(sebastian/exporter) >= 1.0 BuildRequires: php-composer(symfony/console) >= 2.3.0 @@ -44,7 +44,7 @@ BuildRequires: php-composer(symfony/filesystem) >= 2.1 # From composer.json, require # "php": ">=5.3.3", -# "phpspec/prophecy": "~1.1", +# "phpspec/prophecy": "~1.4", # "phpspec/php-diff": "~1.0.0", # "sebastian/exporter": "~1.0", # "symfony/console": "~2.3", @@ -52,9 +52,9 @@ BuildRequires: php-composer(symfony/filesystem) >= 2.1 # "symfony/finder": "~2.1", # "symfony/process": "~2.1", # "symfony/yaml": "~2.1", -# "doctrine/instantiator": "~1.0,>=1.0.1" +# "doctrine/instantiator": "^1.0.1" Requires: php(language) >= 5.3.3 -Requires: php-composer(phpspec/prophecy) >= 1.1 +Requires: php-composer(phpspec/prophecy) >= 1.4 Requires: php-composer(phpspec/prophecy) < 2 Requires: php-composer(phpspec/php-diff) >= 1.0.0 Requires: php-composer(phpspec/php-diff) < 2 @@ -121,11 +121,16 @@ install -Dpm755 bin/phpspec %{buildroot}%{_bindir}/phpspec %check +export LANG=en_GB.utf8 %{_bindir}/php \ - -d include_path=.:%{buildroot}%{_datadir}/php:/usr/share/php \ + -d include_path=.:src:/usr/share/php \ bin/phpspec \ run --format pretty --verbose --no-ansi +%{_bindir}/phpunit \ + --verbose \ + --bootstrap src/PhpSpec/autoload.php + %clean rm -rf %{buildroot} @@ -142,5 +147,9 @@ rm -rf %{buildroot} %changelog +* Sun Apr 19 2015 Remi Collet - 2.2.0-1 +- update to 2.2.0 +- raise dependency on phpspec/prophecy 1.4 + * Tue Feb 17 2015 Remi Collet - 2.1.1-1 - initial package \ No newline at end of file diff --git a/phpspec-autoload.php b/phpspec-autoload.php index fff41bc..47f19c5 100644 --- a/phpspec-autoload.php +++ b/phpspec-autoload.php @@ -1,5 +1,7 @@ registerNamespaces(array( +$ns = array( 'Doctrine\\Instantiator' => $vendorDir, 'SebastianBergmann' => $vendorDir, 'Symfony\\Component' => $vendorDir, 'PhpSpec' => dirname(__DIR__), -)); +); +/* spec tree in current dir, when exists */ +if (is_dir(getcwd().'/spec')) { + $ns['spec'] = getcwd(); +} +$loader->registerNamespaces($ns); $loader->register(); diff --git a/phpspec-rpm.patch b/phpspec-rpm.patch index 8daf1ef..d239a38 100644 --- a/phpspec-rpm.patch +++ b/phpspec-rpm.patch @@ -1,12 +1,6 @@ -diff -up bin/phpspec.rpm bin/phpspec ---- bin/phpspec.rpm 2015-01-09 14:21:45.000000000 +0100 -+++ bin/phpspec 2015-02-17 15:18:53.913872436 +0100 -@@ -1,26 +1,13 @@ --#!/usr/bin/env php -+#!/usr/bin/php -