Hi!

Yesterday I was trying to use repoze.squeeze with html generated by Plone 
3.3rc4.
Integration in one pipeline was easy, but squeeze couldn't merge any JS or CSS
files.

I'm working on some fixes and test cases for them (should be ready today or tomorrow). Some part of this fixes are in 'ree-improvments' branch.

Running tests on current (trunk version) code gives few errors. I made patch to doctests (from README) - sha digest are diffrent (I guess because of changes in 0.4 and in 0.4.2). Also code must be changed to recognize what should parse respone.body or response.unicode_body (after changes in 0.4.1).

For now I send diff (made by svn diff command) because I haven't write access to SVN.

P.S. repoze.squeeze rocks! Very good job guys!


best regards,
Wojciech Lichota

--
e-mail: wojci...@lichota.pl
WWW:    http://lichota.pl/blog

Index: repoze/squeeze/README.txt
===================================================================
--- repoze/squeeze/README.txt	(revision 5870)
+++ repoze/squeeze/README.txt	(working copy)
@@ -98,8 +98,8 @@
       <meta>
       <title>Example page</title>
       <script type="text/javascript"
-      src="http://localhost/squeeze/5143af681b9e5f4a8a9a59ab9e52be94c36b6bcc.js";></script>
-      <style><!-- @import url(http://localhost/squeeze/fa0c046451639595d3b9b0ee7a85d09c2fcb5080.css); --></style>
+      src="http://localhost/squeeze/84b2797e33238e235897b0d939fd3e2ff651fa1e.js";></script>
+      <style><!-- @import url(http://localhost/squeeze/b6ce0a444ff460ac0058f943694824e274b25365.css); --></style>
     </head>
   </html>
 
@@ -112,7 +112,7 @@
 well. Squeeze has merged them with the `...@media` CSS2 syntax.
 
   >>> print open(os.path.join(
-  ...     cache_dir, 'fa0c046451639595d3b9b0ee7a85d09c2fcb5080.css')).read()
+  ...     cache_dir, 'b6ce0a444ff460ac0058f943694824e274b25365.css')).read()
   body { background: url(http://localhost/background.png) repeat-xy; }
   body { background-image: url(http://localhost/background.png) repeat-xy; }
   @media print {
@@ -177,7 +177,7 @@
 
 Running the application, we'll see that document is squeezed.
   
-  >>> '5143af681b9e5f4a8a9a59ab9e52be94c36b6bcc' in \
+  >>> '84b2797e33238e235897b0d939fd3e2ff651fa1e' in \
   ...     "".join(middleware(environ, start_response))
   True
 
Index: repoze/squeeze/processor.py
===================================================================
--- repoze/squeeze/processor.py	(revision 5870)
+++ repoze/squeeze/processor.py	(working copy)
@@ -130,10 +130,12 @@
 
             # process document body
             if response.charset is None:
-                return
+                body = response.body
+            else:
+                body = response.unicode_body
             changed, expires, body = self.process_html(
                 accept_request_data, request.host_url,
-                request.path, response.unicode_body)
+                request.path, body)
 
             # if document is unchanged, set the cache-headers as
             if not changed:

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to