From f819a3a2151447281a18575eddd3c185b374aaaa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 2 Dec 2014 17:11:00 +0100 Subject: php-phpunit-environment: 1.2.1 --- environment-upstream.patch | 115 ------------------------------------------- php-phpunit-environment.spec | 19 +++---- 2 files changed, 6 insertions(+), 128 deletions(-) delete mode 100644 environment-upstream.patch diff --git a/environment-upstream.patch b/environment-upstream.patch deleted file mode 100644 index c52005f..0000000 --- a/environment-upstream.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 52c68979fc4b369a0a0023808946795966773f8a Mon Sep 17 00:00:00 2001 -From: Sebastian Bergmann -Date: Wed, 22 Oct 2014 17:14:56 +0200 -Subject: [PATCH] Refactor - ---- - src/Console.php | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/src/Console.php b/src/Console.php -index 3c7b7f9..84fc94a 100644 ---- a/src/Console.php -+++ b/src/Console.php -@@ -66,7 +66,7 @@ public function hasColorSupport() - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); - } - -- return function_exists('posix_isatty') && @posix_isatty(STDOUT); -+ return $this->isTty(); - } - - /** -@@ -92,4 +92,12 @@ public function getNumberOfColumns() - - return 80; - } -+ -+ /** -+ * @return boolean -+ */ -+ private function isTty() -+ { -+ return function_exists('posix_isatty') && @posix_isatty(STDOUT); -+ } - } -From 07a5d03892f4e31bc16f97c58de100c04f95b731 Mon Sep 17 00:00:00 2001 -From: Sebastian Bergmann -Date: Fri, 24 Oct 2014 10:51:36 +0200 -Subject: [PATCH] Make sure we have a tty before using stty - ---- - src/Console.php | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/Console.php b/src/Console.php -index 84fc94a..ac1b1a3 100644 ---- a/src/Console.php -+++ b/src/Console.php -@@ -66,7 +66,7 @@ public function hasColorSupport() - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); - } - -- return $this->isTty(); -+ return $this->isTty(STDOUT); - } - - /** -@@ -82,6 +82,10 @@ public function getNumberOfColumns() - return 79; - } - -+ if (!$this->isTty(STDIN)) { -+ return 80; -+ } -+ - if (preg_match('#\d+ (\d+)#', shell_exec('stty size'), $match) === 1) { - return (int) $match[1]; - } -@@ -94,10 +98,11 @@ public function getNumberOfColumns() - } - - /** -+ * @param resource $fd - * @return boolean - */ -- private function isTty() -+ private function isTty($fd) - { -- return function_exists('posix_isatty') && @posix_isatty(STDOUT); -+ return function_exists('posix_isatty') && @posix_isatty($fd); - } - } -From 6e6c71d918088c251b181ba8b3088af4ac336dd7 Mon Sep 17 00:00:00 2001 -From: Sebastian Bergmann -Date: Sat, 25 Oct 2014 10:00:45 +0200 -Subject: [PATCH] Make sure we have STDIN and STDOUT before using them - ---- - src/Console.php | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/Console.php b/src/Console.php -index ac1b1a3..13a9672 100644 ---- a/src/Console.php -+++ b/src/Console.php -@@ -66,6 +66,10 @@ public function hasColorSupport() - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); - } - -+ if (!defined('STDOUT')) { -+ return false; -+ } -+ - return $this->isTty(STDOUT); - } - -@@ -82,7 +86,7 @@ public function getNumberOfColumns() - return 79; - } - -- if (!$this->isTty(STDIN)) { -+ if (!defined('STDIN') || !$this->isTty(STDIN)) { - return 80; - } - diff --git a/php-phpunit-environment.spec b/php-phpunit-environment.spec index de32b6e..75987f0 100644 --- a/php-phpunit-environment.spec +++ b/php-phpunit-environment.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 0d9bf79554d2a999da194a60416c15cf461eb67d +%global gh_commit 6e6c71d918088c251b181ba8b3088af4ac336dd7 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project environment @@ -19,7 +19,7 @@ %endif Name: php-phpunit-environment -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Handle HHVM/PHP environments @@ -28,8 +28,6 @@ License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz -Patch0: %{gh_project}-upstream.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3.3 @@ -53,8 +51,6 @@ has runtime-specific (PHP / HHVM) execution paths. %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 - %build # Generate the Autoloader @@ -79,13 +75,7 @@ then >PHPUnit/Autoload.php fi -# Ignore this test which requires a tty -# https://github.com/sebastianbergmann/environment/issues/5 -rm -f tests/ConsoleTest.php - -phpunit \ - --bootstrap src/autoload.php \ - -d date.timezone=UTC +phpunit --bootstrap src/autoload.php %endif @@ -101,6 +91,9 @@ rm -rf %{buildroot} %changelog +* Tue Dec 2 2014 Remi Collet - 1.2.1-1 +- update to 1.2.1 + * Sat Oct 25 2014 Remi Collet - 1.2.0-1 - update to 1.2.0 -- cgit