packages: jquery-cookie/jquery-cookie.spec, jquery-cookie/issue-13.patch (N...

glen glen at pld-linux.org
Mon Dec 5 13:35:26 CET 2011


Author: glen                         Date: Mon Dec  5 12:35:26 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- patch issue 13. it takes too fucking forever for upstream to apply it

---- Files affected:
packages/jquery-cookie:
   jquery-cookie.spec (1.2 -> 1.3) , issue-13.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/jquery-cookie/jquery-cookie.spec
diff -u packages/jquery-cookie/jquery-cookie.spec:1.2 packages/jquery-cookie/jquery-cookie.spec:1.3
--- packages/jquery-cookie/jquery-cookie.spec:1.2	Mon May  9 15:01:21 2011
+++ packages/jquery-cookie/jquery-cookie.spec	Mon Dec  5 13:35:21 2011
@@ -3,10 +3,11 @@
 Summary:	jQuery Cookie plugin
 Name:		jquery-%{plugin}
 Version:	1.0
-Release:	1
+Release:	2
 License:	MIT / GPL
 Group:		Applications/WWW
 Source0:	https://github.com/carhartl/jquery-cookie/tarball/master#/%{plugin}.tgz
+Patch0:		issue-13.patch
 # Source0-md5:	d1be69258e0b0745e871b067fbf6cfac
 URL:		http://plugins.jquery.com/project/Cookie
 BuildRequires:	js
@@ -25,6 +26,7 @@
 %prep
 %setup -qc
 mv *-%{name}-*/* .
+%patch0 -p1
 
 %build
 install -d build
@@ -50,6 +52,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2011/12/05 12:35:21  glen
+- patch issue 13. it takes too fucking forever for upstream to apply it
+
 Revision 1.2  2011/05/09 13:01:21  glen
 - it is version 1.0, update url and grab latest
 

================================================================
Index: packages/jquery-cookie/issue-13.patch
diff -u /dev/null packages/jquery-cookie/issue-13.patch:1.1
--- /dev/null	Mon Dec  5 13:35:26 2011
+++ packages/jquery-cookie/issue-13.patch	Mon Dec  5 13:35:21 2011
@@ -0,0 +1,51 @@
+From e32c4c4436d6def71041451c89f476963b517953 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen at delfi.ee>
+Date: Mon, 9 May 2011 17:03:28 +0300
+Subject: [PATCH] decode plus sign
+URL: https://github.com/carhartl/jquery-cookie/issues/13
+
+bugfix for carhartl/jquery-cookie#13
+---
+ jquery.cookie.js |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/jquery.cookie.js b/jquery.cookie.js
+index 61d3bce..c9bc59e 100644
+--- a/jquery.cookie.js
++++ b/jquery.cookie.js
+@@ -86,6 +86,6 @@ jQuery.cookie = function (key, value, options) {
+ 
+     // key and possibly options given, get cookie...
+     options = value || {};
+-    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
++    var result, decode = function (s) { return options.raw ? s : decodeURIComponent(s.replace(/\+/g, ' ')) };
+     return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
+ };
+-- 
+1.7.5.4
+
+From 2d1005b362cc8ec871d80bbe09d5bb82b73c0feb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen at delfi.ee>
+Date: Tue, 10 May 2011 07:53:53 +0300
+Subject: [PATCH] handle null cookie values
+
+refs carhartl/jquery-cookie#13
+---
+ jquery.cookie.js |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/jquery.cookie.js b/jquery.cookie.js
+index c9bc59e..7e9d632 100644
+--- a/jquery.cookie.js
++++ b/jquery.cookie.js
+@@ -86,6 +86,6 @@ jQuery.cookie = function (key, value, options) {
+ 
+     // key and possibly options given, get cookie...
+     options = value || {};
+-    var result, decode = function (s) { return options.raw ? s : decodeURIComponent(s.replace(/\+/g, ' ')) };
++    var result, decode = function (s) { return !options.raw && s ? decodeURIComponent(s.replace(/\+/g, ' ')) : s };
+     return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
+ };
+-- 
+1.7.5.4
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/jquery-cookie/jquery-cookie.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list