Permalink
Browse files

move Pyrus_Developer to trunk/branches

  • Loading branch information...
0 parents commit dc470fd6d30baaf24d9ac5a8c7600c0b34177737 @cellog cellog committed Jul 26, 2009
Showing with 5,590 additions and 0 deletions.
  1. +2 −0 CREDITS
  2. +5 −0 README
  3. +1 −0 RELEASE-0.1.0
  4. +299 −0 customcommand/commands.xml
  5. +12 −0 data/phartemplate.php
  6. +103 −0 package.xml
  7. +109 −0 package_compatible.xml
  8. +10 −0 src/Pyrus/Developer/CoverageAnalyzer/AbstractSourceDecorator.php
  9. +175 −0 src/Pyrus/Developer/CoverageAnalyzer/Aggregator.php
  10. +381 −0 src/Pyrus/Developer/CoverageAnalyzer/DefaultSourceDecorator.php
  11. +5 −0 src/Pyrus/Developer/CoverageAnalyzer/Exception.php
  12. +101 −0 src/Pyrus/Developer/CoverageAnalyzer/SourceFile.php
  13. +45 −0 src/Pyrus/Developer/CoverageAnalyzer/SourceFile/PerTest.php
  14. +836 −0 src/Pyrus/Developer/CoverageAnalyzer/Sqlite.php
  15. +74 −0 src/Pyrus/Developer/CoverageAnalyzer/Web/Aggregator.php
  16. +90 −0 src/Pyrus/Developer/CoverageAnalyzer/Web/Controller.php
  17. +5 −0 src/Pyrus/Developer/CoverageAnalyzer/Web/Exception.php
  18. +407 −0 src/Pyrus/Developer/CoverageAnalyzer/Web/View.php
  19. +43 −0 src/Pyrus/Developer/CoverageAnalyzer/make-coverage-phar.php
  20. BIN src/Pyrus/Developer/CoverageAnalyzer/pear2coverage.phar.php
  21. +91 −0 src/Pyrus/Developer/CoverageAnalyzer/test-modified.php
  22. +26 −0 src/Pyrus/Developer/CoverageAnalyzer/test.php
  23. +3 −0 src/Pyrus/Developer/Creator/Exception.php
  24. +218 −0 src/Pyrus/Developer/Creator/Phar.php
  25. +57 −0 src/Pyrus/Developer/Creator/Phar/PHPArchive.php
  26. +171 −0 src/Pyrus/Developer/Creator/Tar.php
  27. +75 −0 src/Pyrus/Developer/Creator/Xml.php
  28. +79 −0 src/Pyrus/Developer/Creator/Zip.php
  29. +393 −0 src/Pyrus/Developer/PackageFile/Commands.php
  30. +409 −0 src/Pyrus/Developer/PackageFile/PEAR2SVN.php
  31. +49 −0 src/Pyrus/Developer/PackageFile/PEAR2SVN/Filter.php
  32. +148 −0 src/Pyrus/Developer/PackageFile/PECL.php
  33. +87 −0 src/Pyrus/Developer/PackageFile/PECL/Filter.php
  34. +118 −0 src/Pyrus/Developer/PackageFile/v2.php
  35. +3 −0 src/Pyrus/Developer/Runphpt/Exception.php
  36. +960 −0 src/Pyrus/Developer/Runphpt/Runner.php
@@ -0,0 +1,2 @@
+;; maintainers of Pyrus
+Gregory Beaver [cellog] <cellog@php.net> (lead)
@@ -0,0 +1,5 @@
+Developer tools for the Pyrus installer
+
+This package contains several custom commands for Pyrus,
+including command to automatically generate a package.xml,
+and commands to create a package from an existing package.xml
@@ -0,0 +1 @@
+Initial development release
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<commands version="2.0" xmlns="http://pear2.php.net/dtd/customcommand-2.0">
+ <command>
+ <name>make</name>
+ <class>pear2\Pyrus\Developer\PackageFile\Commands</class>
+ <function>makePackageXml</function>
+ <autoloadpath></autoloadpath>
+ <summary>Create or update a package.xml from a standard PEAR2 directory layout</summary>
+ <shortcut>mk</shortcut>
+ <options>
+ <option>
+ <name>nocompatible</name>
+ <shortopt>n</shortopt>
+ <type><bool/></type>
+ <doc>Do not generate package_compatible.xml</doc>
+ </option>
+ <option>
+ <name>packagexmlsetup</name>
+ <shortopt>s</shortopt>
+ <type><bool/></type>
+ <doc>php file to execute that does customization of the package.xml</doc>
+ </option>
+ <option>
+ <name>package</name>
+ <shortopt>p</shortopt>
+ <type><string/></type>
+ <doc>also create a package release. value should be a comma-delimited list of formats desired</doc>
+ </option>
+ <option>
+ <name>stub</name>
+ <shortopt>u</shortopt>
+ <type><string/></type>
+ <doc>Path to stub for phar archive (ignored if --package not passed)</doc>
+ </option>
+ <option>
+ <name>extrasetup</name>
+ <shortopt>e</shortopt>
+ <type><string/></type>
+ <doc>Path to script with extra needed setup (ignored if --package not passed)</doc>
+ </option>
+ </options>
+ <arguments>
+ <argument>
+ <name>packagename</name>
+ <multiple>0</multiple>
+ <optional>1</optional>
+ <doc>Name of the package to create, default is grabbed from existing package.xml.</doc>
+ </argument>
+ <argument>
+ <name>channel</name>
+ <multiple>0</multiple>
+ <optional>1</optional>
+ <doc>Name of the channel of the package to create, default is grabbed from existing package.xml or pear2.php.net.</doc>
+ </argument>
+ <argument>
+ <name>dir</name>
+ <multiple>0</multiple>
+ <optional>1</optional>
+ <doc>path to directory to make the packagefile for.</doc>
+ </argument>
+ </arguments>
+ <doc>Make a package.xml file from a standard PEAR2 directory layout.
+
+This command looks for these standard files:
+
+CREDITS, README, RELEASE-X.Y.Z (where X.Y.Z is the release version)
+API-X.Y.Z (where X.Y.Z is the API version)
+
+and for a standard directory layout of
+
+src/ PHP files
+data/ Data files
+tests/ Test files
+doc/ Documentation files
+examples/ Example files (documentation)
+scripts/ Executable files, scripts
+www/ Web files
+customrole/ Custom installer role xml definition files
+customtask/ Custom installer task xml definition files
+customcommand/ Custom command xml definition files
+
+The CREDITS file must have this format:
+
+;; comments ignored
+Maintainer One [handle1] &lt;email@example.com&gt; (role)
+Maintainer Two [handle2] &lt;email@example.com&gt; (role)
+
+Where role is one of lead, developer, contributor, helper.
+
+The first line of README is used as the summary of the package.
+RELEASE-X.Y.Z is used as the release notes.
+
+if --packagexmlsetup is specified, the script should work with variable
+$package for modifying the package.xml, and $compatible for the compatible
+one (if present). If --packagexmlsetup is not specified, and packagexmlsetup.php
+exists in the same directory where the package.xml will go, it will be used.
+
+if --package is specified, it should be a comma-delimited list of package formats,
+such as --package=phar,tar,zip
+ </doc>
+ </command>
+ <command>
+ <name>pickle</name>
+ <class>pear2\Pyrus\Developer\PackageFile\Commands</class>
+ <function>makePECLPackage</function>
+ <autoloadpath></autoloadpath>
+ <summary>Create or update a package.xml and then package a PECL extension release</summary>
+ <shortcut>pi</shortcut>
+ <options>
+ <option>
+ <name>donotpackage</name>
+ <shortopt>n</shortopt>
+ <type><bool/></type>
+ <doc>Generate package.xml only, do not package a release</doc>
+ </option>
+ </options>
+ <arguments>
+ <argument>
+ <name>packagename</name>
+ <multiple>0</multiple>
+ <optional>1</optional>
+ <doc>Name of the package to create. If blank, the name is drawn from existng package.xml</doc>
+ </argument>
+ <argument>
+ <name>channel</name>
+ <multiple>0</multiple>
+ <optional>1</optional>
+ <doc>Name of the channel of the package to create, default is pecl.php.net or whatever is in package.xml.</doc>
+ </argument>
+ <argument>
+ <name>dir</name>
+ <multiple>0</multiple>
+ <optional>1</optional>
+ <doc>path to Package directory, default is the current directory.</doc>
+ </argument>
+ <argument>
+ <name>extension</name>
+ <multiple>1</multiple>
+ <optional>1</optional>
+ <doc>source file extension (default is c, cc, h, m4, w32, re, y, l, frag).</doc>
+ </argument>
+ </arguments>
+ <doc>Create or update a package.xml and then package a PECL extension release.
+
+This command looks for these standard files:
+
+CREDITS, README, RELEASE-X.Y.Z (where X.Y.Z is the release version),
+API-X.Y.Z (where X.Y.Z is the API version)
+
+and for a standard directory layout of
+
+/ Extension source files
+data/ Data files
+tests/ Test files
+doc/ Documentation files
+examples/ Example files (documentation)
+
+The CREDITS file must have this format:
+
+;; comments ignored
+Maintainer One [handle1] &lt;email@example.com&gt; (role)
+Maintainer Two [handle2] &lt;email@example.com&gt; (role)
+
+Where role is one of lead, developer, contributor, helper.
+
+The first line of README is used as the summary of the package.
+RELEASE-X.Y.Z is used as the release notes.
+ </doc>
+ </command>
+ <command>
+ <name>package</name>
+ <class>pear2\Pyrus\Developer\PackageFile\Commands</class>
+ <function>package</function>
+ <autoloadpath></autoloadpath>
+ <summary>Create a release from an existing package.xml</summary>
+ <shortcut>p</shortcut>
+ <options>
+ <option>
+ <name>phar</name>
+ <shortopt>p</shortopt>
+ <type><bool/></type>
+ <doc>Create a phar archive</doc>
+ </option>
+ <option>
+ <name>tgz</name>
+ <shortopt>g</shortopt>
+ <type><bool/></type>
+ <doc>Create a tgz archive (default choice)</doc>
+ </option>
+ <option>
+ <name>tar</name>
+ <shortopt>t</shortopt>
+ <type><bool/></type>
+ <doc>Create a tar archive (default choice if zlib ext not present)</doc>
+ </option>
+ <option>
+ <name>zip</name>
+ <shortopt>z</shortopt>
+ <type><bool/></type>
+ <doc>Create a zip archive</doc>
+ </option>
+ <option>
+ <name>stub</name>
+ <shortopt>s</shortopt>
+ <type><string/></type>
+ <doc>Path to stub for phar archive</doc>
+ </option>
+ <option>
+ <name>extrasetup</name>
+ <shortopt>e</shortopt>
+ <type><string/></type>
+ <doc>Path to script with extra needed setup</doc>
+ </option>
+ <option>
+ <name>outputfile</name>
+ <shortopt>o</shortopt>
+ <type><string/></type>
+ <doc>Path file to output the result to</doc>
+ </option>
+ </options>
+ <arguments>
+ <argument>
+ <name>packagexml</name>
+ <multiple>0</multiple>
+ <optional>1</optional>
+ <doc>path to the package.xml for this package.</doc>
+ </argument>
+ </arguments>
+ <doc>Create a release from an existing package.xml
+
+If the package.xml is not specified, here is the search order
+
+ - ./package.xml
+ - if package.xml is version 1.0, ./package2.xml
+
+Use PEAR to validate package.xml version 1.0, Pyrus will not validate it.
+
+Packages with a PEAR2 package.xml are packaged using Pyrus, packages with
+a PEAR package.xml (pearinstaller dep is not >= 2.0.0a1) are packaged straight
+into a tar archive.
+
+By default, an attempt is made to make a .phar release for a Pyrus package,
+falling back to a .tgz or .tar. PEAR packages are only ever packaged as .tgz
+or .tar.
+
+If the --stub option is not explicit and stub.php exists in the same directory as
+package.xml, it will be used as the stub for phar archives.
+
+If the --extrasetup option is not explicit and extrasetup.php exists in the same
+directory as package.xml, it will be used for extra setup for all archives.
+ </doc>
+ </command>
+ <command>
+ <name>run-phpt</name>
+ <class>pear2\Pyrus\Developer\PackageFile\Commands</class>
+ <function>runTests</function>
+ <autoloadpath></autoloadpath>
+ <summary>Run PHPT tests</summary>
+ <shortcut>rp</shortcut>
+ <options>
+ <option>
+ <name>coverage</name>
+ <shortopt>x</shortopt>
+ <type><bool/></type>
+ <doc>Generate xdebug code coverage</doc>
+ </option>
+ <option>
+ <name>recursive</name>
+ <shortopt>r</shortopt>
+ <type><bool/></type>
+ <doc>Scan test directories recursively for tests to run</doc>
+ </option>
+ <option>
+ <name>modified</name>
+ <shortopt>m</shortopt>
+ <type><bool/></type>
+ <doc>Use code coverage database to only run modified tests</doc>
+ </option>
+ </options>
+ <arguments>
+ <argument>
+ <name>path</name>
+ <multiple>1</multiple>
+ <optional>1</optional>
+ <doc>path to tests, or to the tests directory followed by source directory if --modified (default is ./tests ./src).</doc>
+ </argument>
+ </arguments>
+ <doc>Run PHPT tests
+
+This command can be used to execute tests for PECL extensions, or for packages
+written using phpt tests.
+
+The --modified option allows running only tests that have been modified, added,
+or are affected by modified source files.
+
+Coverage can be viewed in a web browser by opening pear2coverage.phar.php
+ </doc>
+ </command>
+</commands>
@@ -0,0 +1,12 @@
+<?php
+if (!class_exists('Phar')) {
+ if (!class_exists('PHP_Archive')) {
+@PHPARCHIVE@
+ }
+ if (!in_array('phar', stream_get_wrappers(), true)) {
+ stream_wrapper_register('phar', 'PHP_Archive');
+ }
+}
+define('PYRUS_PHAR_FILE', __FILE__);
+include 'phar://' . __FILE__ . '/__index.php';
+__HALT_COMPILER();
Oops, something went wrong.

0 comments on commit dc470fd

Please sign in to comment.