[packages/minify] - fixes from PR42 and PR43

glen glen at pld-linux.org
Fri Dec 28 17:29:06 CET 2012


commit f749a5bba75726391dec61c51eedebd2401ba453
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Dec 28 18:28:47 2012 +0200

    - fixes from PR42 and PR43

 32abbfa328dcccf785452dd9cd032f224e378645.patch | 36 +++++++++++++++++++++++++
 a82d70b0baaa85c8ca234e39918d678e2b4bea76.patch | 37 ++++++++++++++++++++++++++
 minify.spec                                    |  8 +++++-
 3 files changed, 80 insertions(+), 1 deletion(-)
---
diff --git a/minify.spec b/minify.spec
index 8b2f341..16c110f 100644
--- a/minify.spec
+++ b/minify.spec
@@ -3,7 +3,7 @@
 Summary:	Combines, minifies, and caches JavaScript and CSS files on demand to speed up page loads
 Name:		minify
 Version:	2.1.5
-Release:	7
+Release:	8
 License:	New BSD License
 Group:		Applications/WWW
 #Source0:	https://minify.googlecode.com/files/%{name}-%{version}.zip
@@ -13,6 +13,10 @@ Source0:	https://github.com/mrclay/minify/tarball/master/%{name}-%{version}.tgz
 Patch0:		paths.patch
 Patch1:		pear-firephp.patch
 Patch2:		yui-path.patch
+# https://github.com/mrclay/minify/pull/42
+Patch3:		https://github.com/glensc/minify/commit/a82d70b0baaa85c8ca234e39918d678e2b4bea76.patch
+# https://github.com/mrclay/minify/pull/43
+Patch4:		https://github.com/glensc/minify/commit/32abbfa328dcccf785452dd9cd032f224e378645.patch
 Source1:	apache.conf
 Source2:	lighttpd.conf
 URL:		http://code.google.com/p/minify/
@@ -82,6 +86,8 @@ mv *-minify-*/* .
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 %undos UPGRADING.txt
 
 find -type f | xargs chmod a-x
diff --git a/32abbfa328dcccf785452dd9cd032f224e378645.patch b/32abbfa328dcccf785452dd9cd032f224e378645.patch
new file mode 100644
index 0000000..3776b6e
--- /dev/null
+++ b/32abbfa328dcccf785452dd9cd032f224e378645.patch
@@ -0,0 +1,36 @@
+From 32abbfa328dcccf785452dd9cd032f224e378645 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen at delfi.ee>
+Date: Sun, 2 Dec 2012 23:20:22 +0200
+Subject: [PATCH] allow setGroup keys be list of groups comma separated
+
+this allows loading multiple groups on page with
+Minify_HTML_Helper::getUri, keeping array method for loading list of
+sources
+
+the backend side for handling this in Minify_Controller_MinApp is
+already present.
+---
+ min/lib/Minify/HTML/Helper.php |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/min/lib/Minify/HTML/Helper.php b/min/lib/Minify/HTML/Helper.php
+index 807fdc9..64afc03 100644
+--- a/min/lib/Minify/HTML/Helper.php
++++ b/min/lib/Minify/HTML/Helper.php
+@@ -103,8 +103,11 @@ public function setGroup($key, $checkLastModified = true)
+             }
+             if (is_file($this->groupsConfigFile)) {
+                 $gc = (require $this->groupsConfigFile);
+-                if (isset($gc[$key])) {
+-                    $this->_lastModified = self::getLastModified($gc[$key]);
++                $keys = explode(',', $key);
++                foreach ($keys as $key) {
++                    if (isset($gc[$key])) {
++                        $this->_lastModified = self::getLastModified($gc[$key], $this->_lastModified);
++                    }
+                 }
+             }
+         }
+-- 
+1.7.10
+
diff --git a/a82d70b0baaa85c8ca234e39918d678e2b4bea76.patch b/a82d70b0baaa85c8ca234e39918d678e2b4bea76.patch
new file mode 100644
index 0000000..c3d9190
--- /dev/null
+++ b/a82d70b0baaa85c8ca234e39918d678e2b4bea76.patch
@@ -0,0 +1,37 @@
+From a82d70b0baaa85c8ca234e39918d678e2b4bea76 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen at delfi.ee>
+Date: Sun, 25 Nov 2012 15:26:28 +0200
+Subject: [PATCH] use "Connection: close" of file_get_contents
+
+otherwise php will do keepalive request, and wait timeout seconds before
+can return actual response. similar problem does not happen with curl
+backend
+---
+ min/lib/Minify/JS/ClosureCompiler.php |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/min/lib/Minify/JS/ClosureCompiler.php b/min/lib/Minify/JS/ClosureCompiler.php
+index fb474d1..51f7cd1 100644
+--- a/min/lib/Minify/JS/ClosureCompiler.php
++++ b/min/lib/Minify/JS/ClosureCompiler.php
+@@ -69,7 +69,7 @@ public function min($js)
+         }
+         return $response;
+     }
+-    
++
+     protected $_fallbackFunc = null;
+ 
+     protected function _getResponse($postBody)
+@@ -79,7 +79,7 @@ protected function _getResponse($postBody)
+             $contents = file_get_contents(self::URL, false, stream_context_create(array(
+                 'http' => array(
+                     'method' => 'POST',
+-                    'header' => 'Content-type: application/x-www-form-urlencoded',
++                    'header' => "Content-type: application/x-www-form-urlencoded\r\nConnection: close\r\n",
+                     'content' => $postBody,
+                     'max_redirects' => 0,
+                     'timeout' => 15,
+-- 
+1.7.10
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/minify.git/commitdiff/f749a5bba75726391dec61c51eedebd2401ba453



More information about the pld-cvs-commit mailing list