[python-tahrir] Patch to fix the leaderboard template.
Ralph Bean
ralph at fedoraproject.org
Tue Sep 10 13:31:47 UTC 2013
commit 519fcc335d2e72b2386d314b19b33570f1a43ec2
Author: Ralph Bean <rbean at redhat.com>
Date: Tue Sep 10 09:31:33 2013 -0400
Patch to fix the leaderboard template.
python-tahrir-cached-rank-in-template.patch | 25 +++++++++++++++++++++++++
python-tahrir.spec | 10 ++++++++--
2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/python-tahrir-cached-rank-in-template.patch b/python-tahrir-cached-rank-in-template.patch
new file mode 100644
index 0000000..f82da1e
--- /dev/null
+++ b/python-tahrir-cached-rank-in-template.patch
@@ -0,0 +1,25 @@
+From f3220caefb3c2a3f8524784f52080e730b806a04 Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Tue, 10 Sep 2013 09:26:35 -0400
+Subject: [PATCH] Use cached rank in the template.
+
+---
+ tahrir/templates/leaderboard.mak | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tahrir/templates/leaderboard.mak b/tahrir/templates/leaderboard.mak
+index 07dbd8a..1f63066 100644
+--- a/tahrir/templates/leaderboard.mak
++++ b/tahrir/templates/leaderboard.mak
+@@ -55,7 +55,7 @@
+ % for person in top_persons_sorted[:25]:
+ <tr>
+ <td style="width: 20px;">
+- <span class="big-text">#${user_to_rank[person]['rank']}</span>
++ <span class="big-text">#${person.rank}</span>
+ </td>
+ <td style="width: 64px;">${self.functions.avatar_thumbnail(person, 64, 33)}</td>
+ <td>
+--
+1.8.3.1
+
diff --git a/python-tahrir.spec b/python-tahrir.spec
index 9cfabef..bc8da04 100644
--- a/python-tahrir.spec
+++ b/python-tahrir.spec
@@ -2,13 +2,14 @@
Name: python-tahrir
Version: 0.4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A pyramid app for issuing your own Open Badges
Group: Development/Languages
License: AGPLv3+
URL: http://pypi.python.org/pypi/%{modname}
Source0: http://pypi.python.org/packages/source/t/tahrir/%{modname}-%{version}.tar.gz
+Patch0: python-tahrir-cached-rank-in-template.patch
BuildArch: noarch
@@ -51,6 +52,9 @@ https://wiki.mozilla.org/Badges
%prep
%setup -q -n %{modname}-%{version}
+# Fix the leaderboard template
+%patch0 -p1
+
# Make sure that epel/rhel picks up the correct version of sqlalchemy
%{__awk} 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"sqlalchemy>=0.7\"]; import pkg_resources"}1' setup.py > setup.py.tmp
%{__mv} setup.py.tmp setup.py
@@ -82,7 +86,6 @@ sed -i 's/%%(here)s/\/var\/lib\/tahrir/' apache/%{modname}.ini
%{_sbindir}/useradd -r -s /sbin/nologin -d %{_datadir}/%{modname} -M \
-c 'Tahrir Server' -g %{modname} %{modname} &>/dev/null || :
-
%files
%doc README.rst LICENSE CHANGELOG.rst
@@ -96,6 +99,9 @@ sed -i 's/%%(here)s/\/var\/lib\/tahrir/' apache/%{modname}.ini
%attr(-,%{modname},root) %config(noreplace) %{_var}/lib/%{modname}
%changelog
+* Tue Sep 10 2013 Ralph Bean <rbean at redhat.com> - 0.4.1-2
+- Apply patch to fix leaderboard template.
+
* Tue Sep 10 2013 Ralph Bean <rbean at redhat.com> - 0.4.1-1
- Latest upstream with various optimizations.
More information about the scm-commits
mailing list