[php-nrk-Predis/epel7] update to 1.0.0

Remi Collet remi at fedoraproject.org
Mon Nov 3 10:04:53 UTC 2014


commit 06fa258aa2046ef820862672a953e94ef1545b5c
Author: Remi Collet <remi at fedoraproject.org>
Date:   Mon Nov 3 11:04:54 2014 +0100

    update to 1.0.0

 .gitignore            |    1 +
 Predis-upstream.patch |   60 +++++++++++++++++++++++++++++++++++++++++++++++++
 php-nrk-Predis.spec   |   25 ++++++++++++++++----
 sources               |    2 +-
 4 files changed, 82 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1ff111d..69fca96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 /Predis-0.8.4.tgz
 /Predis-0.8.5.tgz
 /Predis-0.8.6.tgz
+/Predis-1.0.0.tgz
diff --git a/Predis-upstream.patch b/Predis-upstream.patch
new file mode 100644
index 0000000..22bea4a
--- /dev/null
+++ b/Predis-upstream.patch
@@ -0,0 +1,60 @@
+From d09c4f32f3650d30f84c90f161304a4034a0f86f Mon Sep 17 00:00:00 2001
+From: Daniele Alessandri <suppakilla at gmail.com>
+Date: Tue, 21 Oct 2014 11:16:55 +0200
+Subject: [PATCH] [tests] Relax checks on invalid expire time messages.
+
+Previously there was a bug in Redis that returned the wrong command
+in -ERR messages when passing an invalid expire time with SETEX and
+PSETEX. Now that the bug has been fixed and that travis-ci uses a an
+updated version of Redis, our test suite turned red.
+---
+ tests/Predis/Command/StringPreciseSetExpireTest.php | 6 ++----
+ tests/Predis/Command/StringSetExpireTest.php        | 4 ++--
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/tests/Predis/Command/StringPreciseSetExpireTest.php b/tests/Predis/Command/StringPreciseSetExpireTest.php
+index 77df02c..c93744e 100644
+--- a/tests/Predis/Command/StringPreciseSetExpireTest.php
++++ b/tests/Predis/Command/StringPreciseSetExpireTest.php
+@@ -93,8 +93,7 @@ public function testThrowsExceptionOnNonIntegerTTL()
+     /**
+      * @group connected
+      * @expectedException \Predis\Response\ServerException
+-     * @expectedExceptionMessage ERR invalid expire time in SETEX
+-     * @todo Should not Redis return PSETEX instead of SETEX here?
++     * @expectedExceptionMessage ERR invalid expire time
+      */
+     public function testThrowsExceptionOnZeroTTL()
+     {
+@@ -104,8 +103,7 @@ public function testThrowsExceptionOnZeroTTL()
+     /**
+      * @group connected
+      * @expectedException \Predis\Response\ServerException
+-     * @expectedExceptionMessage ERR invalid expire time in SETEX
+-     * @todo Should not Redis return PSETEX instead of SETEX here?
++     * @expectedExceptionMessage ERR invalid expire time
+      */
+     public function testThrowsExceptionOnNegativeTTL()
+     {
+diff --git a/tests/Predis/Command/StringSetExpireTest.php b/tests/Predis/Command/StringSetExpireTest.php
+index 59ff77b..b52e9fa 100644
+--- a/tests/Predis/Command/StringSetExpireTest.php
++++ b/tests/Predis/Command/StringSetExpireTest.php
+@@ -94,7 +94,7 @@ public function testThrowsExceptionOnNonIntegerTTL()
+     /**
+      * @group connected
+      * @expectedException \Predis\Response\ServerException
+-     * @expectedExceptionMessage ERR invalid expire time in SETEX
++     * @expectedExceptionMessage ERR invalid expire time
+      */
+     public function testThrowsExceptionOnZeroTTL()
+     {
+@@ -104,7 +104,7 @@ public function testThrowsExceptionOnZeroTTL()
+     /**
+      * @group connected
+      * @expectedException \Predis\Response\ServerException
+-     * @expectedExceptionMessage ERR invalid expire time in SETEX
++     * @expectedExceptionMessage ERR invalid expire time
+      */
+     public function testThrowsExceptionOnNegativeTTL()
+     {
diff --git a/php-nrk-Predis.spec b/php-nrk-Predis.spec
index b1cf335..2b3501a 100644
--- a/php-nrk-Predis.spec
+++ b/php-nrk-Predis.spec
@@ -10,10 +10,12 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
 %global pear_name    Predis
 %global pear_channel pear.nrk.io
+
+# Disabled, see https://github.com/nrk/predis/issues/220
 %global with_tests   %{?_with_tests:1}%{!?_with_tests:0}
 
 Name:           php-nrk-Predis
-Version:        0.8.6
+Version:        1.0.0
 Release:        1%{?dist}
 Summary:        PHP client library for Redis
 
@@ -22,13 +24,15 @@ License:        MIT
 URL:            http://%{pear_channel}
 Source0:        http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
 
+Patch0:         %{pear_name}-upstream.patch
+
 BuildArch:      noarch
 BuildRequires:  php(language) >= 5.3.2
 BuildRequires:  php-pear(PEAR)
 BuildRequires:  php-channel(%{pear_channel})
 %if %{with_tests}
-BuildRequires:  php-pear(pear.phpunit.de/PHPUnit)
-BuildRequires:  redis > 2.8
+BuildRequires:  php-phpunit-PHPUnit
+BuildRequires:  redis > 2.6
 %endif
 
 Requires(post): %{__pear}
@@ -55,7 +59,12 @@ Flexible and feature-complete PHP client library for Redis.
 %setup -q -c
 
 cd %{pear_name}-%{version}
-cp ../package.xml %{name}.xml
+%patch0 -p1 -b .upstream
+
+sed -e '/StringPreciseSetExpireTest.php/s/md5sum=.*name=/name=/' \
+    -e '/StringSetExpireTest.php/s/md5sum=.*name=/name=/' \
+    ../package.xml >%{name}.xml
+touch -r ../package.xml %{name}.xml
 
 
 %build
@@ -83,7 +92,7 @@ pidfile=$PWD/run/redis/redis.pid
 mkdir -p {run,log,lib}/redis
 sed -e "s:/var:$PWD:" \
     /etc/redis.conf >redis.conf
-%{_sbindir}/redis-server \
+%{_bindir}/redis-server \
     ./redis.conf \
     --daemonize yes \
     --pidfile $pidfile
@@ -124,6 +133,12 @@ fi
 
 
 %changelog
+* Mon Nov 03 2014 Remi Collet <remi at fedoraproject.org> - 1.0.0-1
+- Update to 1.0.0
+- upstream patch for tests
+- open https://github.com/nrk/predis/issues/220 - failed tests
+  on slow / 32bits computer
+
 * Wed Jul 16 2014 Remi Collet <remi at fedoraproject.org> - 0.8.6-1
 - Update to 0.8.6
 - provides php-composer(predis/predis)
diff --git a/sources b/sources
index 16f0753..be15b53 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b5fa0d90e7654a8f7fa3da505a8e7f9c  Predis-0.8.6.tgz
+0b53a97593d64ef6359a2340bd36fe19  Predis-1.0.0.tgz


More information about the scm-commits mailing list