Author: jablko
Date: 2008-11-14 10:20:59 -0800 (Fri, 14 Nov 2008)
New Revision: 1597

Modified:
   trunk/qubit/plugins/sfAuditPlugin/config/audit.yml
   trunk/qubit/plugins/sfAuditPlugin/lib/task/AuditTask.class.php
Log:
Update audit configuration and ignore Selenium tests. Fix getPropsFromPath()


Modified: trunk/qubit/plugins/sfAuditPlugin/config/audit.yml
===================================================================
--- trunk/qubit/plugins/sfAuditPlugin/config/audit.yml  2008-11-14 18:18:29 UTC 
(rev 1596)
+++ trunk/qubit/plugins/sfAuditPlugin/config/audit.yml  2008-11-14 18:20:59 UTC 
(rev 1597)
@@ -50,6 +50,9 @@
 apps/qubit/lib/xslt/*.xsl:
   code:
 
+config/package.xml:
+  code:
+
 lib/drupal//*:
   code:
 
@@ -62,10 +65,11 @@
 lib/model/om//*:
   code:
 
-lib/xhtml-to-xslfo.xsl:
+lib/vendor//*:
   code:
+  props:
 
-package.xml.tmpl:
+lib/xhtml-to-xslfo.xsl:
   code:
 
 plugins/*/modules/*/templates//*:
@@ -81,5 +85,8 @@
   props:
     'svn:keywords':
 
-web/js/yui//*:
+test/selenium//*:
   code:
+
+web/vendor//*:
+  code:

Modified: trunk/qubit/plugins/sfAuditPlugin/lib/task/AuditTask.class.php
===================================================================
--- trunk/qubit/plugins/sfAuditPlugin/lib/task/AuditTask.class.php      
2008-11-14 18:18:29 UTC (rev 1596)
+++ trunk/qubit/plugins/sfAuditPlugin/lib/task/AuditTask.class.php      
2008-11-14 18:20:59 UTC (rev 1597)
@@ -110,22 +110,31 @@
 
   protected function getPropsFromPath($path)
   {
-    $propsPath = dirname($path).'/.svn/props/'.basename($path).'.svn-work';
+    // TODO: Find a better way to parse this?
+    $pattern = '/K \d+\n(\V+)\nV \d+\n(\V+)\n/';
 
-    // SVN > 1.4 does not write .svn-work unless local property changes are 
made
-    if (!file_exists($propsPath))
+    $paths = array();
+    $paths[] = dirname($path).'/.svn/props/'.basename($path).'.svn-work';
+    $paths[] = dirname($path).'/.svn/prop-base/'.basename($path).'.svn-base';
+
+    foreach ($paths as $path)
     {
-      $propsPath = 
dirname($path).'/.svn/prop-base/'.basename($path).'.svn-base';
+      if (file_exists($path))
+      {
+        if (false === $contents = file_get_contents($path))
+        {
+          // TODO: Error handling
+        }
+
+        break;
+      }
     }
 
-    // No properties
-    if (!file_exists($propsPath))
+    if (false === preg_match_all($pattern, $contents, $matches, 
PREG_SET_ORDER))
     {
-      return array();
+      // TODO: Error handling
     }
 
-    preg_match_all('/K \d+\n(\V+)\nV \d+\n(\V+)\n/', 
file_get_contents($propsPath), $matches, PREG_SET_ORDER);
-
     $props = array();
     foreach ($matches as $match)
     {


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to