[php-guzzlehttp-streams] Updated to 3.0.0 (BZ #1131103)

Shawn Iwinski siwinski at fedoraproject.org
Mon Feb 9 02:37:48 UTC 2015


commit 946f0fa8bae6c5683438447d2275446ed6957a18
Author: Shawn Iwinski <shawn.iwinski at gmail.com>
Date:   Sun Feb 8 21:37:14 2015 -0500

    Updated to 3.0.0 (BZ #1131103)

 .gitignore                                         |    1 +
 ...-ad4c07ea55d02789a65ae75f6e4a9ee2cb9dab3f.patch |   16 ++++++-
 php-guzzlehttp-streams.spec                        |   46 +++++++++++--------
 sources                                            |    2 +-
 4 files changed, 43 insertions(+), 22 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index abbb0ca..2b4a22e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /php-guzzlehttp-streams-1.1.0-cf0c8c33ca95cc147efba4c714f630ee44767180.tar.gz
 /php-guzzlehttp-streams-1.4.0-3b761a328e5ed6ed519e960aded95d7acbe77894.tar.gz
 /php-guzzlehttp-streams-1.5.1-fb0d1ee29987c2bdc59867bffaade6fc88c2675f.tar.gz
+/php-guzzlehttp-streams-3.0.0-47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5.tar.gz
diff --git a/php-guzzlehttp-streams-tests.patch b/php-guzzlehttp-streams-ad4c07ea55d02789a65ae75f6e4a9ee2cb9dab3f.patch
similarity index 75%
rename from php-guzzlehttp-streams-tests.patch
rename to php-guzzlehttp-streams-ad4c07ea55d02789a65ae75f6e4a9ee2cb9dab3f.patch
index 2a7554b..0d212aa 100644
--- a/php-guzzlehttp-streams-tests.patch
+++ b/php-guzzlehttp-streams-ad4c07ea55d02789a65ae75f6e4a9ee2cb9dab3f.patch
@@ -22,11 +22,23 @@ index a1d302d..2a0adb6 100644
          $this->assertTrue($a->eof());
          $this->assertSame(9, $a->tell());
          $this->assertEquals('foobarbaz', (string) $a);
+diff --git a/tests/FnStreamTest.php b/tests/FnStreamTest.php
+index 39b495b..0597a7a 100644
+--- a/tests/FnStreamTest.php
++++ b/tests/FnStreamTest.php
+@@ -59,6 +59,7 @@ public function testDecoratesStream()
+         $this->assertEquals($b->read(3), 'foo');
+         $this->assertEquals($b->tell(), 3);
+         $this->assertEquals($a->tell(), 3);
++        $this->assertEmpty($b->read(1));
+         $this->assertEquals($b->eof(), true);
+         $this->assertEquals($a->eof(), true);
+         $b->seek(0);
 diff --git a/tests/GuzzleStreamWrapperTest.php b/tests/GuzzleStreamWrapperTest.php
 index 33c3ecc..f10cc78 100644
 --- a/tests/GuzzleStreamWrapperTest.php
 +++ b/tests/GuzzleStreamWrapperTest.php
-@@ -19,6 +19,7 @@ public function testResource()
+@@ -18,6 +18,7 @@ public function testResource()
          $this->assertSame(3, fwrite($handle, 'bar'));
          $this->assertSame(0, fseek($handle, 0));
          $this->assertSame('foobar', fread($handle, 6));
@@ -38,7 +50,7 @@ diff --git a/tests/LimitStreamTest.php b/tests/LimitStreamTest.php
 index efb1dc5..6137e82 100644
 --- a/tests/LimitStreamTest.php
 +++ b/tests/LimitStreamTest.php
-@@ -30,6 +30,7 @@ public function testReturnsSubset()
+@@ -31,6 +31,7 @@ public function testReturnsSubset()
          $body->seek(0);
          $this->assertFalse($body->eof());
          $this->assertEquals('oo', $body->read(100));
diff --git a/php-guzzlehttp-streams.spec b/php-guzzlehttp-streams.spec
index 04030f3..d3f6c92 100644
--- a/php-guzzlehttp-streams.spec
+++ b/php-guzzlehttp-streams.spec
@@ -1,7 +1,7 @@
 #
 # RPM spec file for php-guzzlehttp-streams
 #
-# Copyright (c) 2014 Shawn Iwinski <shawn.iwinski at gmail.com>
+# Copyright (c) 2014-2015 Shawn Iwinski <shawn.iwinski at gmail.com>
 #
 # License: MIT
 # http://opensource.org/licenses/MIT
@@ -11,8 +11,8 @@
 
 %global github_owner     guzzle
 %global github_name      streams
-%global github_version   1.5.1
-%global github_commit    fb0d1ee29987c2bdc59867bffaade6fc88c2675f
+%global github_version   3.0.0
+%global github_commit    47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5
 
 %global composer_vendor  guzzlehttp
 %global composer_project streams
@@ -23,9 +23,12 @@
 # Build using "--without tests" to disable tests
 %global with_tests       %{?_without_tests:0}%{!?_without_tests:1}
 
+%{!?phpdir:     %global phpdir     %{_datadir}/php}
+%{!?__phpunit:  %global __phpunit  %{_bindir}/phpunit}
+
 Name:          php-%{composer_vendor}-%{composer_project}
 Version:       %{github_version}
-Release:       3%{?github_release}%{?dist}
+Release:       1%{?github_release}%{?dist}
 Summary:       Provides a simple abstraction over streams of data
 
 Group:         Development/Libraries
@@ -33,22 +36,25 @@ License:       MIT
 URL:           http://docs.guzzlephp.org/en/guzzle4/streams.html
 Source0:       https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
 
-# Upstream patch (adapted for 1.5.1)
-Patch0:        %{name}-tests.patch
+# Test suite start failing with upcoming 5.5.21RC1 / 5.6.5RC1
+# https://github.com/guzzle/streams/issues/29
+# https://github.com/guzzle/streams/commit/ad4c07ea55d02789a65ae75f6e4a9ee2cb9dab3f.patch
+Patch0:        %{name}-ad4c07ea55d02789a65ae75f6e4a9ee2cb9dab3f.patch
 
 BuildArch:     noarch
 %if %{with_tests}
-# For tests: composer.json
+# composer.json
 BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-phpunit-PHPUnit
-# For tests: phpcompatinfo (computed from version 1.5.1)
+BuildRequires: %{__phpunit}
+# phpcompatinfo (computed from version 3.0.0)
 BuildRequires: php-hash
 BuildRequires: php-spl
+BuildRequires: php-zlib
 %endif
 
 # composer.json
 Requires:      php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 1.5.1)
+# phpcompatinfo (computed from version 3.0.0)
 Requires:      php-hash
 Requires:      php-spl
 
@@ -61,7 +67,7 @@ Provides:      php-composer(%{composer_vendor}/%{composer_project}) = %{version}
 %prep
 %setup -qn %{github_name}-%{github_commit}
 
-%patch0 -p1 -b .upstream
+%patch0 -p1 -b .ad4c07ea55d02789a65ae75f6e4a9ee2cb9dab3f
 
 
 %build
@@ -69,8 +75,8 @@ Provides:      php-composer(%{composer_vendor}/%{composer_project}) = %{version}
 
 
 %install
-mkdir -pm 0755 %{buildroot}%{_datadir}/php/GuzzleHttp/Stream
-cp -pr src/* %{buildroot}%{_datadir}/php/GuzzleHttp/Stream/
+mkdir -p  %{buildroot}%{phpdir}/GuzzleHttp/Stream
+cp -pr src/* %{buildroot}%{phpdir}/GuzzleHttp/Stream/
 
 
 %check
@@ -80,15 +86,13 @@ mkdir vendor
 cat > vendor/autoload.php <<'AUTOLOAD'
 <?php
 
-require_once __DIR__ . '/../src/functions.php';
-
 spl_autoload_register(function ($class) {
     $src = str_replace(array('\\', '_'), '/', $class).'.php';
     @include_once $src;
 });
 AUTOLOAD
 
-%{_bindir}/phpunit --include-path="%{buildroot}%{_datadir}/php"
+%{__phpunit} --include-path="%{buildroot}%{phpdir}"
 %else
 : Tests skipped
 %endif
@@ -97,12 +101,16 @@ AUTOLOAD
 %files
 %{!?_licensedir:%global license %%doc}
 %license LICENSE
-%doc README.rst composer.json
-%dir %{_datadir}/php/GuzzleHttp
-     %{_datadir}/php/GuzzleHttp/Stream
+%doc *.rst
+%doc composer.json
+%dir %{phpdir}/GuzzleHttp
+     %{phpdir}/GuzzleHttp/Stream
 
 
 %changelog
+* Sun Feb 08 2015 Shawn Iwinski <shawn.iwinski at gmail.com> - 3.0.0-1
+- Updated to 3.0.0 (BZ #1131103)
+
 * Thu Jan 22 2015 Remi Collet <remi at fedoraproject.org> - 1.5.1-3
 - add upstream patch for test suite against latest PHP
   see https://github.com/guzzle/streams/issues/29, thank Koschei
diff --git a/sources b/sources
index d90f1f5..8b1e9b5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-98e57830f87e2d8723ec78221b2c990d  php-guzzlehttp-streams-1.5.1-fb0d1ee29987c2bdc59867bffaade6fc88c2675f.tar.gz
+b899ac3ba0fb32487ebb7b0464e655a6  php-guzzlehttp-streams-3.0.0-47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5.tar.gz


More information about the scm-commits mailing list