Permalink
Browse files

- trunk tagged as version 0.3.3

git-svn-id: svn://phpunit.de/phpunit/phpUnderControl/tags/0.3.3@2254 c4a080f7-5c17-0410-a942-8af0f0140c7b
  • Loading branch information...
0 parents commit a3cf2c639e7b9ddecec45768b8f10a0d8072013a @manuelpichler manuelpichler committed Jan 22, 2008
Showing with 18,098 additions and 0 deletions.
  1. +36 −0 CHANGELOG
  2. +107 −0 bin/clearSetup.php
  3. +40 −0 bin/phpuc.bat
  4. +53 −0 bin/phpuc.php
  5. +42 −0 build.xml
  6. +185 −0 data/css/SyntaxHighlighter.css
  7. +328 −0 data/css/php-under-control.css
  8. +43 −0 data/footer.jsp
  9. +74 −0 data/header.jsp
  10. BIN data/images/php-under-control/error.png
  11. BIN data/images/php-under-control/failed.png
  12. BIN data/images/php-under-control/header-center.png
  13. BIN data/images/php-under-control/header-left-logo.png
  14. BIN data/images/php-under-control/info.png
  15. BIN data/images/php-under-control/skipped.png
  16. BIN data/images/php-under-control/success.png
  17. BIN data/images/php-under-control/tab-active.png
  18. BIN data/images/php-under-control/tab-inactive.png
  19. BIN data/images/php-under-control/warning.png
  20. +542 −0 data/index.jsp
  21. +10 −0 data/js/shBrushPhp.js
  22. +161 −0 data/js/shCore.js
  23. +105 −0 data/main.jsp
  24. +128 −0 data/metrics.cewolf.jsp
  25. +93 −0 data/metrics.jsp
  26. +42 −0 data/phpcs.jsp
  27. +42 −0 data/phpunit-pmd.jsp
  28. +39 −0 data/phpunit.jsp
  29. +66 −0 data/xsl/buildresults.xsl
  30. +102 −0 data/xsl/errors.xsl
  31. +82 −0 data/xsl/header.xsl
  32. +509 −0 data/xsl/modifications.xsl
  33. +174 −0 data/xsl/phpcs-details.xsl
  34. +104 −0 data/xsl/phpcs.xsl
  35. +98 −0 data/xsl/phpdoc.xsl
  36. +60 −0 data/xsl/phphelper.xsl
  37. +294 −0 data/xsl/phpunit-details.xsl
  38. +257 −0 data/xsl/phpunit-pmd-details.xsl
  39. +99 −0 data/xsl/phpunit-pmd.xsl
  40. +266 −0 data/xsl/phpunit.xsl
  41. +129 −0 docs/build.xml
  42. +176 −0 docs/config.xml
  43. +727 −0 docs/layout.svg
  44. BIN docs/layout/header.png
  45. BIN docs/layout/kore-header.png
  46. BIN docs/layout/tabs.png
  47. +724 −0 docs/phpUnderControl-kore.svg
  48. +210 −0 example/src/Math.php
  49. +110 −0 example/tests/MathTest.php
  50. +40 −0 lib/ezc/autoload/base_autoload.php
  51. +122 −0 lib/ezc/autoload/graph_autoload.php
  52. +739 −0 package.xml
  53. +155 −0 src/Commands/AbstractCommand.php
  54. +103 −0 src/Commands/ExampleCommand.php
  55. +73 −0 src/Commands/GraphCommand.php
  56. +129 −0 src/Commands/InstallCommand.php
  57. +71 −0 src/Commands/ProjectCommand.php
  58. +174 −0 src/Console/ConsoleArgs.php
  59. +70 −0 src/Console/ConsoleExtensionI.php
  60. +526 −0 src/Console/ConsoleInput.php
  61. +300 −0 src/Console/ConsoleInputDefinition.php
  62. +211 −0 src/Console/ConsoleOutput.php
  63. +212 −0 src/Data/BuildFile.php
  64. +224 −0 src/Data/BuildTarget.php
  65. +185 −0 src/Data/ConfigArtifactsPublisher.php
  66. +153 −0 src/Data/ConfigExecutePublisher.php
  67. +161 −0 src/Data/ConfigFile.php
  68. +329 −0 src/Data/ConfigProject.php
  69. +68 −0 src/Data/ConfigPublisherI.php
  70. +133 −0 src/Data/LogFile.php
  71. +103 −0 src/Data/LogFileIterator.php
  72. +62 −0 src/Exceptions/ConsoleException.php
  73. +62 −0 src/Exceptions/ErrorException.php
  74. +62 −0 src/Exceptions/ExecuteException.php
  75. +62 −0 src/Exceptions/ValidateException.php
  76. +89 −0 src/Graph/ChartFactory.php
  77. +87 −0 src/Graph/ChartI.php
  78. +107 −0 src/Graph/DotChart.php
  79. +96 −0 src/Graph/DotChartOptions.php
  80. +116 −0 src/Graph/GraphPalette.php
  81. +338 −0 src/Graph/Input/AbstractInput.php
  82. +117 −0 src/Graph/Input/BuildBreakdownInput.php
  83. +122 −0 src/Graph/Input/BuildBreakdownTimelineInput.php
  84. +108 −0 src/Graph/Input/CodeViolationInput.php
  85. +113 −0 src/Graph/Input/InputI.php
  86. +115 −0 src/Graph/Input/InputIterator.php
  87. +90 −0 src/Graph/Input/InputLoader.php
  88. +119 −0 src/Graph/Input/InputRule.php
  89. +106 −0 src/Graph/Input/TestCodeRatioInput.php
  90. +106 −0 src/Graph/Input/UnitCoverageInput.php
  91. +92 −0 src/Graph/Input/UnitTestInput.php
  92. +175 −0 src/Graph/LineChart.php
  93. +139 −0 src/Graph/PieChart.php
  94. +165 −0 src/PhpUnderControl.php
  95. +203 −0 src/Tasks/AbstractPearTask.php
  96. +144 −0 src/Tasks/AbstractTask.php
  97. +115 −0 src/Tasks/CreateFileTask.php
  98. +179 −0 src/Tasks/CruiseControlTask.php
  99. +141 −0 src/Tasks/ExampleTask.php
  100. +161 −0 src/Tasks/GenerateGraphTask.php
  101. +97 −0 src/Tasks/GraphTask.php
  102. +145 −0 src/Tasks/ModifyFileTask.php
  103. +166 −0 src/Tasks/PhpCodeSnifferTask.php
  104. +121 −0 src/Tasks/PhpDocumentorTask.php
  105. +204 −0 src/Tasks/PhpUnitTask.php
  106. +153 −0 src/Tasks/ProjectTask.php
  107. +106 −0 src/Tasks/TaskI.php
  108. +106 −0 src/Util/Autoloader.php
  109. +263 −0 src/Util/FileUtil.php
  110. +72 −0 src/Util/PhpFileFilterIterator.php
  111. +20 −0 template/project.xml
  112. +230 −0 tests/AbstractTest.php
  113. +100 −0 tests/AllTests.php
  114. +94 −0 tests/Console/ConsoleAllTests.php
  115. +248 −0 tests/Console/ConsoleArgsTest.php
  116. +88 −0 tests/Data/AbstractConfigTest.php
  117. +168 −0 tests/Data/BuildFileTest.php
  118. +175 −0 tests/Data/BuildTargetTest.php
  119. +140 −0 tests/Data/ConfigFileTest.php
  120. +94 −0 tests/Data/ConfigProjectTest.php
  121. +100 −0 tests/Data/DataAllTests.php
  122. +163 −0 tests/Tasks/AbstractPearTaskTest.php
  123. +179 −0 tests/Tasks/CruiseControlTaskTest.php
  124. +136 −0 tests/Tasks/PhpCodeSnifferTaskTest.php
  125. +195 −0 tests/Tasks/ProjectTaskTest.php
  126. +98 −0 tests/Tasks/TasksAllTests.php
  127. +214 −0 tests/Util/FileUtilTest.php
  128. +94 −0 tests/Util/UtilAllTests.php
@@ -0,0 +1,36 @@
+phpUnderControl 0.3.1
+- Bugfix for different artifact locations.
+
+phpUnderControl 0.3.0
+
+Core
+- New console input class added.
+- New dynamic command/option layer for console started.
+- New ezcGraph based metrics view integrated.
+- Changed from static to dynamic autoloading.
+
+phpUnderControl 0.2.2
+---------------------
+
+Core
+- Default body background color set.
+- Documented example for the CruiseControl config.xml file and an ant build.xml
+ file for the phpUnderControl project added.
+
+phpUnderControl 0.2.1
+---------------------
+
+Core
+- Three new metric views added. Thanks to Sebastian for this great idea.
+ 1) Unit Tests vs. Number of Failing Unit Tests.
+ 2) Executable Lines of Code vs. Code Coverage in Percent.
+ 3) Classes/Methods vs. Number of Tested Classes/Methods
+- Dependency to latest PHP_CodeSniffer version 1.0.0RC3 increased.
+- CruiseControl config.xml file abstration implemented.
+- Source refactored to make the command line stuff testable.
+- Many code cleanups and documentation fixes.
+
+Tests
+- Test cases for the cli tool added.
+- Test cases for the build file abstraction added.
+- Test cases for some tasks added.
@@ -0,0 +1,107 @@
+#!/usr/bin/env php
+<?php
+/**
+ * This file is part of phpUnderControl.
+ *
+ * Copyright (c) 2007-2008, Manuel Pichler <mapi@phpundercontrol.org>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Manuel Pichler nor the names of his
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @author Manuel Pichler <mapi@phpundercontrol.org>
+ * @copyright 2007-2008 Manuel Pichler. All rights reserved.
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version SVN: $Id: phpuc.php 2010 2008-01-02 12:24:48Z mapi $
+ * @link http://www.phpundercontrol.org/
+ */
+
+if ( stripos( PHP_OS, 'WIN' ) === false )
+{
+ $rmcmd = 'rm -rf';
+ $copycmd = 'cp -rf';
+ $installDir = '/opt/cruisecontrol';
+}
+else
+{
+ $rmcmd = 'rmdir /S /Q';
+ $copycmd = 'xcopy /S /E /I';
+ $installDir = 'c:\Programme\CruiseControl';
+}
+if ( count( $GLOBALS['argv'] ) > 1 )
+{
+ $installDir = $GLOBALS['argv'][1];
+}
+
+$config = new DOMDocument( '1.0', 'UTF-8' );
+$config->formatOutput = true;
+$config->preserveWhiteSpace = false;
+$config->load( $installDir . '/config.xml' );
+
+$xpath = new DOMXPath( $config );
+$result = $xpath->query( '//project[@name="php-under-control"]' );
+
+if ( $result->length > 0 )
+{
+ $node = $result->item( 0 );
+ $node->parentNode->removeChild( $node );
+
+ $config->save( $installDir . '/config.xml' );
+}
+
+$projectDir = sprintf(
+ "%s%sprojects%sphp-under-control",
+ $installDir,
+ DIRECTORY_SEPARATOR,
+ DIRECTORY_SEPARATOR
+);
+if ( file_exists( $projectDir ) && is_dir( $projectDir ) )
+{
+ system( "{$rmcmd} {$projectDir}" );
+}
+
+$webappsOrig = sprintf(
+ "%s%swebapps%scruisecontrol.orig",
+ $installDir,
+ DIRECTORY_SEPARATOR,
+ DIRECTORY_SEPARATOR
+);
+if ( file_exists( $webappsOrig ) && is_dir( $webappsOrig ) )
+{
+ $webapps = sprintf(
+ "%s%swebapps%scruisecontrol",
+ $installDir,
+ DIRECTORY_SEPARATOR,
+ DIRECTORY_SEPARATOR
+ );
+
+ system( "{$rmcmd} {$webapps}" );
+
+ system( "{$copycmd} {$webappsOrig} {$webapps}" );
+}
@@ -0,0 +1,40 @@
+@echo off
+REM This file is part of phpUnderControl.
+REM
+REM Copyright (c) 2007-2008, Manuel Pichler <mapi@phpundercontrol.org>.
+REM All rights reserved.
+REM
+REM Redistribution and use in source and binary forms, with or without
+REM modification, are permitted provided that the following conditions
+REM are met:
+REM
+REM * Redistributions of source code must retain the above copyright
+REM notice, this list of conditions and the following disclaimer.
+REM
+REM * Redistributions in binary form must reproduce the above copyright
+REM notice, this list of conditions and the following disclaimer in
+REM the documentation and/or other materials provided with the
+REM distribution.
+REM
+REM * Neither the name of Manuel Pichler nor the names of his
+REM contributors may be used to endorse or promote products derived
+REM from this software without specific prior written permission.
+REM
+REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+REM LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
+REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+REM POSSIBILITY OF SUCH DAMAGE.
+REM
+REM $Id$
+REM
+
+set PHPBIN="@php_bin@"
+"@php_bin@" "@bin_dir@\phpuc" %*
@@ -0,0 +1,53 @@
+#!/usr/bin/env php
+<?php
+/**
+ * This file is part of phpUnderControl.
+ *
+ * Copyright (c) 2007-2008, Manuel Pichler <mapi@phpundercontrol.org>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Manuel Pichler nor the names of his
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @author Manuel Pichler <mapi@phpundercontrol.org>
+ * @copyright 2007-2008 Manuel Pichler. All rights reserved.
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version SVN: $Id:phpuc.php 2195 2008-01-18 14:02:18Z mapi $
+ * @link http://www.phpundercontrol.org/
+ */
+
+if ( strpos( '@php_dir@', '@php_dir' ) === 0 )
+{
+ require_once dirname( __FILE__ ) . '/../src/PhpUnderControl.php';
+}
+else
+{
+ require_once '@php_dir@/phpUnderControl/PhpUnderControl.php';
+}
+phpucPhpUnderControl::main();
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="phpUnderControl" basedir="." default="build">
+
+ <property name="output.dir" value="${basedir}/build" />
+
+ <target name="update">
+ <exec executable="svn">
+ <arg line="up"/>
+ </exec>
+ </target>
+
+ <target name="test">
+ <mkdir dir="${output.dir}/logs"/>
+ <mkdir dir="${output.dir}/coverage"/>
+ <exec dir="tests" executable="phpunit">
+ <arg line="--log-pmd ${output.dir}/logs/pmd.xml
+ --log-metrics ${output.dir}/logs/metrics.xml
+ --coverage-xml ${output.dir}/logs/coverage.xml
+ --coverage-html ${output.dir}/coverage
+ phpucAllTests AllTests.php"/>
+ </exec>
+ </target>
+
+ <target name="phpdoc">
+ <mkdir dir="${output.dir}/api"/>
+ <exec dir="src" executable="phpdoc">
+ <arg line="-ct type -ue on -t ${output.dir}/api -d ."/>
+ </exec>
+ </target>
+
+ <target name="sniff">
+ <mkdir dir="${output.dir}/logs"/>
+ <exec dir="src" executable="phpcs" output="${output.dir}/logs/codesniffer.xml">
+ <arg line="--report=checkstyle --standard=MapiSource ." />
+ </exec>
+ </target>
+
+ <target name="build">
+
+ </target>
+
+</project>
Oops, something went wrong.

0 comments on commit a3cf2c6

Please sign in to comment.