summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-06-08 18:20:54 +0200
committerRemi Collet <fedora@famillecollet.com>2014-06-08 18:20:54 +0200
commitae15b96865400cb4864325572dac7c44189ba84d (patch)
tree41b767347b8894009212866c7c786ecf10c317f5
parent49b73d1ab4734464b3c8e973a4019cbbfcbb56f6 (diff)
php-Raven: 0.9.0 (backport)
-rw-r--r--155.patch26
-rw-r--r--php-Raven.spec46
2 files changed, 65 insertions, 7 deletions
diff --git a/155.patch b/155.patch
new file mode 100644
index 0000000..31d1ca4
--- /dev/null
+++ b/155.patch
@@ -0,0 +1,26 @@
+From bffc917a976f4d2d945c6e631b38dc7e15557b63 Mon Sep 17 00:00:00 2001
+From: Shawn Iwinski <shawn.iwinski@gmail.com>
+Date: Sat, 7 Jun 2014 11:48:37 -0400
+Subject: [PATCH] Fix Raven_Tests_ClientTest::testGetAuthHeader
+
+---
+ test/Raven/Tests/ClientTest.php | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/test/Raven/Tests/ClientTest.php b/test/Raven/Tests/ClientTest.php
+index dbbc8dd..0a300a4 100644
+--- a/test/Raven/Tests/ClientTest.php
++++ b/test/Raven/Tests/ClientTest.php
+@@ -509,7 +509,8 @@ public function testGetAuthHeader() {
+ $timestamp = '1234341324.340000';
+
+ $expected = "Sentry sentry_timestamp={$timestamp}, sentry_client={$clientstring}, " .
+- "sentry_version=4, sentry_key=publickey, sentry_secret=secretkey";
++ "sentry_version=" . Dummy_Raven_Client::PROTOCOL . ", " .
++ "sentry_key=publickey, sentry_secret=secretkey";
+
+ $this->assertEquals($expected, $client->get_auth_header($timestamp, 'raven-php/test', 'publickey', 'secretkey'));
+ }
+--
+1.9.3
+
diff --git a/php-Raven.spec b/php-Raven.spec
index 47ae296..e6d130b 100644
--- a/php-Raven.spec
+++ b/php-Raven.spec
@@ -1,9 +1,17 @@
+#
+# RPM spec file for php-Raven
+#
+# Copyright (c) 2013-2014 Shawn Iwinski <shawn.iwinski@gmail.com>
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
+# Please preserve the changelog entries
+#
%global github_owner getsentry
%global github_name raven-php
-%global github_version 0.8.0
-%global github_commit 2351d97c862f02343e5465d550df68bd9632cad9
-# Additional commits after 0.8.0 tag
-%global github_release .20140519git%(c=%{github_commit}; echo ${c:0:7})
+%global github_version 0.9.0
+%global github_commit 1177f1c51110454f3a5bcca88aec3fa30e40e277
%global lib_name Raven
@@ -13,22 +21,29 @@
# Note: Max version ignored on purpose
%global phpunit_min_ver 3.7.0
+# Build using "--without tests" to disable tests
+%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+
Name: php-%{lib_name}
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: A PHP client for Sentry
Group: Development/Libraries
License: BSD
URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{version}-%{github_commit}.tar.gz
+# Fix Raven_Tests_ClientTest::testGetAuthHeader
+# https://github.com/getsentry/raven-php/pull/155
+Patch0: %{url}/pull/155.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+%if %{with_tests}
# For tests: composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-phpunit-PHPUnit >= %{phpunit_min_ver}
-# For tests: phpcompatinfo (computed from 0.8.0 commit 2351d97c862f02343e5465d550df68bd9632cad9)
+# For tests: phpcompatinfo (computed from version 0.9.0)
BuildRequires: php-curl
BuildRequires: php-date
BuildRequires: php-mbstring
@@ -38,10 +53,11 @@ BuildRequires: php-session
BuildRequires: php-sockets
BuildRequires: php-spl
BuildRequires: php-zlib
+%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from 0.8.0 commit 2351d97c862f02343e5465d550df68bd9632cad9)
+# phpcompatinfo (computed from version 0.9.0)
Requires: php-curl
Requires: php-date
Requires: php-mbstring
@@ -52,6 +68,8 @@ Requires: php-sockets
Requires: php-spl
Requires: php-zlib
+Provides: php-composer(raven/raven) = %{version}
+
%description
%{summary} (http://getsentry.com).
@@ -59,6 +77,8 @@ Requires: php-zlib
%prep
%setup -qn %{github_name}-%{github_commit}
+%patch0 -p1
+
# Update autoloader require in bin and test bootstrap
sed "/require.*Autoloader/s:.*:require_once 'Raven/Autoloader.php';:" \
-i bin/raven \
@@ -78,10 +98,14 @@ install -pm 755 bin/raven %{buildroot}%{_bindir}/
%check
+%if %{with_tests}
# Create PHPUnit config w/ colors turned off
sed 's/colors\s*=\s*"true"/colors="false"/' phpunit.xml.dist > phpunit.xml
%{_bindir}/phpunit --include-path ./lib:./test
+%else
+: Tests skipped
+%endif
%files
@@ -92,6 +116,14 @@ sed 's/colors\s*=\s*"true"/colors="false"/' phpunit.xml.dist > phpunit.xml
%changelog
+* Sun Jun 8 2014 Remi Collet <remi@fedoraproject.org> 0.9.0-1
+- backport 0.9.0 for remi repo
+
+* Sat Jun 07 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.9.0-1
+- Updated to 0.9.0 (BZ #1104557)
+- Added php-composer(raven/raven) virtual provide
+- Added option to build without tests
+
* Mon Jun 2 2014 Remi Collet <remi@fedoraproject.org> 0.8.0-2.20131209gitdac9333
- merge rawhide changes