svn: /pear2/Pyrus_Developer/trunk/ src/Pyrus/Developer/CoverageAnalyzer/make-coverage-phar.php www/CoverageAnalyzer/cover.css www/CoverageAnalyzer/index.php

[email protected] (Brett Bieber)
Newsgroups php.pear.cvs,php.pear.core
Message-ID <[email protected]>
saltybeagle                              Wed, 26 May 2010 18:14:42 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=299806

Log:
Add simple index.php file that will render the coverage DB so building the .phar isn't necessary for development.

Changed paths:
    U   pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/make-coverage-phar.php
    A   pear2/Pyrus_Developer/trunk/www/
    A   pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/
    A   pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/cover.css
    A   pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/index.php

Modified: pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/make-coverage-phar.php
===================================================================
--- pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/make-coverage-phar.php	2010-05-26 17:16:09 UTC (rev 299805)
+++ pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/CoverageAnalyzer/make-coverage-phar.php	2010-05-26 18:14:42 UTC (rev 299806)
@@ -14,36 +14,17 @@
 exit -1;
 __HALT_COMPILER();');

-$phar['Web/Controller.php'] = file_get_contents(__DIR__ . '/Web/Controller.php');
-$phar['Web/View.php'] = file_get_contents(__DIR__ . '/Web/View.php');
-$phar['Web/Aggregator.php'] = file_get_contents(__DIR__ . '/Web/Aggregator.php');
-$phar['Web/Exception.php'] = file_get_contents(__DIR__ . '/Web/Exception.php');
-
-$phar['SourceFile.php'] = file_get_contents(__DIR__ . '/SourceFile.php');
-$phar['Aggregator.php'] = file_get_contents(__DIR__ . '/Aggregator.php');
-$phar['Exception.php'] = file_get_contents(__DIR__ . '/Exception.php');
-$phar['Sqlite.php'] = file_get_contents(__DIR__ . '/Sqlite.php');
+$phar['Web/Controller.php']     = file_get_contents(__DIR__ . '/Web/Controller.php');
+$phar['Web/View.php']           = file_get_contents(__DIR__ . '/Web/View.php');
+$phar['Web/Aggregator.php']     = file_get_contents(__DIR__ . '/Web/Aggregator.php');
+$phar['Web/Exception.php']      = file_get_contents(__DIR__ . '/Web/Exception.php');
+$phar['SourceFile.php']         = file_get_contents(__DIR__ . '/SourceFile.php');
+$phar['Aggregator.php']         = file_get_contents(__DIR__ . '/Aggregator.php');
+$phar['Exception.php']          = file_get_contents(__DIR__ . '/Exception.php');
+$phar['Sqlite.php']             = file_get_contents(__DIR__ . '/Sqlite.php');
 $phar['SourceFile/PerTest.php'] = file_get_contents(__DIR__ . '/SourceFile/PerTest.php');

-$phar['cover.css'] = '
-.ln {background-color:#f6bd0f; padding-right: 4px;}
-.cv {background-color:#afd8f8;}
-.nc {background-color:#d64646;}
-.dead {background-color:#ff8e46;}
-
-ul { list-style-type: none; }
-
-div.bad, div.ok, div.good {
-    white-space:pre;
-    font-family:courier;
-    width: 160px;
-    float: left;
-    margin-right: 10px;
-}
-.bad {background-color:#d64646; }
-.ok {background-color:#f6bd0f; }
-.good {background-color:#588526;}
-';
+$phar['cover.css'] = file_get_contents(__DIR__ . '/../../../www/CoverageAnalyzer/cover.css');
 $phar['index.php'] = '<?php
 namespace PEAR2\Pyrus\Developer\CoverageAnalyzer {
 session_start();

Added: pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/cover.css
===================================================================
--- pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/cover.css	                        (rev 0)
+++ pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/cover.css	2010-05-26 18:14:42 UTC (rev 299806)
@@ -0,0 +1,17 @@
+.ln {background-color:#f6bd0f; padding-right: 4px;}
+.cv {background-color:#afd8f8;}
+.nc {background-color:#d64646;}
+.dead {background-color:#ff8e46;}
+
+ul { list-style-type: none; }
+
+div.bad, div.ok, div.good {
+    white-space:pre;
+    font-family:courier;
+    width: 160px;
+    float: left;
+    margin-right: 10px;
+}
+.bad {background-color:#d64646; }
+.ok {background-color:#f6bd0f; }
+.good {background-color:#588526;}
\ No newline at end of file

Added: pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/index.php
===================================================================
--- pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/index.php	                        (rev 0)
+++ pear2/Pyrus_Developer/trunk/www/CoverageAnalyzer/index.php	2010-05-26 18:14:42 UTC (rev 299806)
@@ -0,0 +1,9 @@
+<?php
+require_once dirname(__DIR__).'/../../autoload.php';
+
+session_start();
+$view = new PEAR2\Pyrus\Developer\CoverageAnalyzer\Web\View;
+$rooturl = parse_url($_SERVER['REQUEST_URI']);
+$rooturl = $rooturl['path'];
+$controller = new PEAR2\Pyrus\Developer\CoverageAnalyzer\Web\Controller($view, $rooturl);
+$controller->route();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.