<?php
/**
- * The Horde_Element:: class is the entry point for the various Horde
- * element actions provided by the package.
+ * The Components:: class is the entry point for the various component actions
+ * provided by the package.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * The Horde_Element:: class is the entry point for the various Horde
- * element actions provided by the package.
+ * The Components:: class is the entry point for the various component actions
+ * provided by the package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element
+class Components
{
/**
* The main entry point for the application.
$config->handleModules($modules);
try {
self::_validateArguments($config);
- } catch (Horde_Element_Exception $e) {
+ } catch (Components_Exception $e) {
$parser->parserError($e->getMessage());
return;
}
static private function _prepareConfig(Horde_Argv_Parser $parser)
{
- $config = new Horde_Element_Configs();
+ $config = new Components_Configs();
$config->addConfigurationType(
- new Horde_Element_Config_Cli(
+ new Components_Config_Cli(
$parser
)
);
static private function _prepareModules()
{
- $modules = new Horde_Element_Modules();
- $modules->addModulesFromDirectory(dirname(__FILE__) . '/Element/Module');
+ $modules = new Components_Modules();
+ $modules->addModulesFromDirectory(dirname(__FILE__) . '/Components/Module');
return $modules;
}
- static private function _validateArguments(Horde_Element_Config $config)
+ static private function _validateArguments(Components_Config $config)
{
$arguments = $config->getArguments();
if (empty($arguments[0])) {
- throw new Horde_Element_Exception('Please specify the path of the PEAR package!');
+ throw new Components_Exception('Please specify the path of the PEAR package!');
}
if (!is_dir($arguments[0])) {
- throw new Horde_Element_Exception(sprintf('%s specifies no directory!', $arguments[0]));
+ throw new Components_Exception(sprintf('%s specifies no directory!', $arguments[0]));
}
if (!file_exists($arguments[0] . '/package.xml')) {
- throw new Horde_Element_Exception(sprintf('There is no package.xml at %s!', $arguments[0]));
+ throw new Components_Exception(sprintf('There is no package.xml at %s!', $arguments[0]));
}
}
}
\ No newline at end of file
<?php
/**
- * Horde_Element_Config:: interface represents a configuration type for the Horde
+ * Components_Config:: interface represents a configuration type for the Horde
* element tool.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Config:: interface represents a configuration type for the Horde
+ * Components_Config:: interface represents a configuration type for the Horde
* element tool.
*
* Copyright 2009-2010 The Horde Project (http://www.horde.org/)
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-interface Horde_Element_Config
+interface Components_Config
{
/**
* Provide each configuration handler with the list of supported modules.
*
- * @param Horde_Element_Modules $modules A list of modules.
+ * @param Components_Modules $modules A list of modules.
* @return NULL
*/
- public function handleModules(Horde_Element_Modules $modules);
+ public function handleModules(Components_Modules $modules);
/**
* Return the options provided by the configuration handlers.
<?php
/**
- * Horde_Element_Config_Cli:: class provides the command line interface for the Horde
+ * Components_Config_Cli:: class provides the command line interface for the Horde
* element tool.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Config_Cli:: class provides the command line interface for the Horde
+ * Components_Config_Cli:: class provides the command line interface for the Horde
* element tool.
*
* Copyright 2009-2010 The Horde Project (http://www.horde.org/)
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Config_Cli
-implements Horde_Element_Config
+class Components_Config_Cli
+implements Components_Config
{
/**
* The command line argument parser.
/**
* Load the options for the list of supported modules.
*
- * @param Horde_Element_Modules $modules A list of modules.
+ * @param Components_Modules $modules A list of modules.
* @return NULL
*/
- public function handleModules(Horde_Element_Modules $modules)
+ public function handleModules(Components_Modules $modules)
{
foreach ($modules as $module) {
$this->_addOptionsFromModule($this->_parser, $module);
* Add an option group from the provided module to the parser.
*
* @param Horde_Argv_Parser $parser The parser.
- * @param Horde_Element_Module $module The module providing the option group.
+ * @param Components_Module $module The module providing the option group.
*
* @return NULL
*/
<?php
/**
- * Horde_Element_Configs:: class represents configuration for the
+ * Components_Configs:: class represents configuration for the
* Horde element tool.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Configs:: class represents configuration for the
+ * Components_Configs:: class represents configuration for the
* Horde element tool.
*
* Copyright 2009-2010 The Horde Project (http://www.horde.org/)
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Configs
-implements Horde_Element_Config
+class Components_Configs
+implements Components_Config
{
/**
/**
* Add a configuration type to the configuration handler.
*
- * @param Horde_Element_Config $type The configuration type.
+ * @param Components_Config $type The configuration type.
*
* @return NULL
*/
- public function addConfigurationType(Horde_Element_Config $type) {
+ public function addConfigurationType(Components_Config $type) {
$this->_configs[] = $type;
}
/**
* Provide each configuration handler with the list of supported modules.
*
- * @param Horde_Element_Modules $modules A list of modules.
+ * @param Components_Modules $modules A list of modules.
* @return NULL
*/
- public function handleModules(Horde_Element_Modules $modules)
+ public function handleModules(Components_Modules $modules)
{
foreach ($this->_configs as $config) {
$config->handleModules($modules);
<?php
/**
- * Horde_Element_Constants:: provides the constants for this package.
+ * Components_Constants:: provides the constants for this package.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Constants:: provides the constants for this package.
+ * Components_Constants:: provides the constants for this package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Constants
+class Components_Constants
{
const DATA_DIR = '@data_dir@';
array(dirname(__FILE__), '..', '..', '..', 'data')
);
}
- return self::DATA_DIR . DIRECTORY_SEPARATOR . 'Element';
+ return self::DATA_DIR . DIRECTORY_SEPARATOR . 'Components';
}
}
<?php
/**
- * This class provides the standard error class for the Element package.
+ * This class provides the standard error class for the Components
+ * package.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * This class provides the standard error class for the Element package.
+ * This class provides the standard error class for the Components
+ * package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Exception
+class Components_Exception
extends Exception
{
}
<?php
/**
- * Horde_Element_Module:: represents a task for a Horde element.
+ * Components_Module:: represents a task for a Horde component.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Module:: represents a task for a Horde element.
+ * Components_Module:: represents a task for a Horde component.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-interface Horde_Element_Module
+interface Components_Module
{
public function getOptionGroupTitle();
public function getOptionGroupOptions();
- public function handle(Horde_Element_Config $config);
+ public function handle(Components_Config $config);
- public function run(Horde_Element_Config $config);
+ public function run(Components_Config $config);
}
\ No newline at end of file
<?php
/**
- * Horde_Element_Module_CiSetup:: generates the configuration for Hudson based
+ * Components_Module_CiSetup:: generates the configuration for Hudson based
* continuous integration of a Horde PEAR package.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Module_CiSetup:: generates the configuration for Hudson based
+ * Components_Module_CiSetup:: generates the configuration for Hudson based
* continuous integration of a Horde PEAR package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Module_CiSetup
-implements Horde_Element_Module
+class Components_Module_CiSetup
+implements Components_Module
{
public function getOptionGroupTitle()
{
);
}
- public function handle(Horde_Element_Config $config)
+ public function handle(Components_Config $config)
{
$options = $config->getOptions();
if (!empty($options['cisetup']) | !empty($options['ciprebuild'])) {
}
}
- public function run(Horde_Element_Config $config)
+ public function run(Components_Config $config)
{
$options = $config->getOptions();
if (!empty($options['cisetup'])) {
$in = file_get_contents(
- Horde_Element_Constants::getDataDirectory()
- . DIRECTORY_SEPARATOR . 'hudson-element-config.xml.template',
+ Components_Constants::getDataDirectory()
+ . DIRECTORY_SEPARATOR . 'hudson-component-config.xml.template',
'r'
);
file_put_contents(
if (!empty($options['ciprebuild'])) {
$in = file_get_contents(
- Horde_Element_Constants::getDataDirectory()
- . DIRECTORY_SEPARATOR . 'hudson-element-build.xml.template',
+ Components_Constants::getDataDirectory()
+ . DIRECTORY_SEPARATOR . 'hudson-component-build.xml.template',
'r'
);
file_put_contents(
sprintf($in, $options['toolsdir'])
);
$in = file_get_contents(
- Horde_Element_Constants::getDataDirectory()
- . DIRECTORY_SEPARATOR . 'hudson-element-phpunit.xml.template',
+ Components_Constants::getDataDirectory()
+ . DIRECTORY_SEPARATOR . 'hudson-component-phpunit.xml.template',
'r'
);
file_put_contents(
<?php
/**
- * Horde_Element_Module_DevPackage:: generates a development snapshot for the
+ * Components_Module_DevPackage:: generates a development snapshot for the
* specified package.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Module_DevPackage:: generates a development snapshot for the
+ * Components_Module_DevPackage:: generates a development snapshot for the
* specified package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Module_DevPackage
-implements Horde_Element_Module
+class Components_Module_DevPackage
+implements Components_Module
{
public function getOptionGroupTitle()
{
);
}
- public function handle(Horde_Element_Config $config)
+ public function handle(Components_Config $config)
{
$options = $config->getOptions();
if (!empty($options['devpackage'])) {
}
}
- public function run(Horde_Element_Config $config)
+ public function run(Components_Config $config)
{
$options = $config->getOptions();
<?php
/**
- * Horde_Element_Module_Installer:: installs a Horde element including
+ * Components_Module_Installer:: installs a Horde element including
* its dependencies.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Module_Installer:: installs a Horde element including
+ * Components_Module_Installer:: installs a Horde element including
* its dependencies.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Module_Installer
-implements Horde_Element_Module
+class Components_Module_Installer
+implements Components_Module
{
private $_run;
);
}
- public function handle(Horde_Element_Config $config)
+ public function handle(Components_Config $config)
{
$options = $config->getOptions();
if (!empty($options['install'])) {
}
}
- public function run(Horde_Element_Config $config)
+ public function run(Components_Config $config)
{
$options = $config->getOptions();
-
$pear = new PEAR();
$pear->setErrorHandling(PEAR_ERROR_DIE);
<?php
/**
- * Horde_Element_Module_PearPackageXml:: can update the package.xml of
+ * Components_Module_PearPackageXml:: can update the package.xml of
* a Horde element.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * Horde_Element_Module_PearPackageXml:: can update the package.xml of
+ * Components_Module_PearPackageXml:: can update the package.xml of
* a Horde element.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Module_PearPackageXml
-implements Horde_Element_Module
+class Components_Module_PearPackageXml
+implements Components_Module
{
public function getOptionGroupTitle()
{
);
}
- public function handle(Horde_Element_Config $config)
+ public function handle(Components_Config $config)
{
$options = $config->getOptions();
if (!empty($options['packagexml']) ||
}
}
- public function run(Horde_Element_Config $config)
+ public function run(Components_Config $config)
{
$arguments = $config->getArguments();
$package_file = $arguments[0] . '/package.xml';
);
if ($package instanceOf PEAR_Error) {
- throw new Horde_Element_Exception($package->getMessage());
+ throw new Components_Exception($package->getMessage());
}
/**
* @todo: Looks like this throws away any <replace /> tags we have in
<?php
/**
- * The Horde_Element_Modules:: class handles a set of Element modules.
+ * The Components_Modules:: class handles a set of Components modules.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
- * The Horde_Element_Modules:: class handles a set of Element modules.
+ * The Components_Modules:: class handles a set of Components modules.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_Modules
+class Components_Modules
implements Iterator, Countable
{
/**
/**
* Add all modules found in the specified directory.
*
- * @param string $module_directory Load the modules from this dirrectory.
+ * @param string $module_directory Load the modules from this directory.
*
* @return NULL
*/
public function addModulesFromDirectory(
$module_directory,
- $base = 'Horde_Element_Module_'
+ $base = 'Components_Module_'
) {
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($module_directory)) as $file) {
if ($file->isFile() && preg_match('/.php$/', $file->getFilename())) {
/**
* Implementation of the Iterator next() method. Returns the next module.
*
- * @return Horde_Element_Module|null The next module or null if there are no more
+ * @return Components_Module|null The next module or null if there are no more
* modules.
*/
public function next()
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.9.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Element</name>
+ <name>Components</name>
<channel>pear.horde.org</channel>
- <summary>A package for handling Horde elements.</summary>
+ <summary>A package for handling Horde components.</summary>
<description>The package provides utility methods required
- when preparing a new element release for Horde. It also includes
+ when preparing a new component release for Horde. It also includes
quality control checks.</description>
<lead>
<name>Gunnar Wrobel</name>
<contents>
<dir baseinstalldir="/" name="/">
<dir name="data">
- <file name="hudson-element-build.xml.template" role="data" />
- <file name="hudson-element-config.xml.template" role="data" />
- <file name="hudson-element-phpunit.xml.template" role="data" />
+ <file name="hudson-component-build.xml.template" role="data" />
+ <file name="hudson-component-config.xml.template" role="data" />
+ <file name="hudson-component-phpunit.xml.template" role="data" />
</dir> <!-- /data -->
<dir name="lib">
- <dir name="Horde">
- <dir name="Element">
+ <dir name="Components">
<dir name="Config">
<file name="Cli.php" role="php" />
- </dir> <!-- /lib/Horde/Element/Config -->
+ </dir> <!-- /lib/Components/Config -->
<dir name="Module">
<file name="CiSetup.php" role="php" />
<file name="DevPackage.php" role="php" />
<file name="Installer.php" role="php" />
<file name="PearPackageXml.php" role="php" />
- </dir> <!-- /lib/Horde/Element/Module -->
+ </dir> <!-- /lib/Components/Module -->
<file name="Config.php" role="php" />
<file name="Configs.php" role="php" />
<file name="Constants.php" role="php">
<file name="Exception.php" role="php" />
<file name="Module.php" role="php" />
<file name="Modules.php" role="php" />
- </dir> <!-- /lib/Horde/Element -->
- <file name="Element.php" role="php" />
- </dir> <!-- /lib/Horde -->
+ </dir> <!-- /lib/Components -->
+ <file name="Components.php" role="php" />
</dir> <!-- /lib -->
<dir name="script">
- <file name="horde-element.php" role="script" />
+ <file name="horde-components.php" role="script" />
</dir> <!-- /script -->
<dir name="test">
- <dir name="Horde">
- <dir name="Element">
+ <dir name="Components">
<dir name="fixture">
<dir name="simple">
<dir name="lib">
<file name="New.php" role="test" />
<file name="Second.php" role="test" />
- </dir> <!-- /test/Horde/Element/fixture/simple/lib -->
- </dir> <!-- /test/Horde/Element/fixture/simple -->
- </dir> <!-- /test/Horde/Element/fixture -->
+ </dir> <!-- /test/Components/fixture/simple/lib -->
+ </dir> <!-- /test/Components/fixture/simple -->
+ </dir> <!-- /test/Components/fixture -->
<dir name="Integration">
- <file name="ElementTest.php" role="test" />
- </dir> <!-- /test/Horde/Element/Integration -->
+ <file name="ComponentsTest.php" role="test" />
+ </dir> <!-- /test/Components/Integration -->
<dir name="Stub">
<file name="Parser.php" role="test" />
- </dir> <!-- /test/Horde/Element/Stub -->
+ </dir> <!-- /test/Components/Stub -->
<file name="AllTests.php" role="test" />
<file name="Autoload.php" role="test" />
<file name="phpunit.xml" role="test" />
<file name="StoryTestCase.php" role="test" />
- </dir> <!-- /test/Horde/Element -->
- </dir> <!-- /test/Horde -->
+ </dir> <!-- /test/Components -->
</dir> <!-- /test -->
<file name="COPYING" role="doc" />
</dir> <!-- / -->
<name>Argv</name>
<channel>pear.horde.org</channel>
</package>
+ <package>
+ <name>Injector</name>
+ <channel>pear.horde.org</channel>
+ </package>
</required>
<optional>
<package>
</dependencies>
<phprelease>
<filelist>
- <install as="hudson-element-build.xml.template" name="data/hudson-element-build.xml.template" />
- <install as="hudson-element-config.xml.template" name="data/hudson-element-config.xml.template" />
- <install as="hudson-element-phpunit.xml.template" name="data/hudson-element-phpunit.xml.template" />
- <install as="Horde/Element.php" name="lib/Horde/Element.php" />
- <install as="Horde/Element/Config.php" name="lib/Horde/Element/Config.php" />
- <install as="Horde/Element/Configs.php" name="lib/Horde/Element/Configs.php" />
- <install as="Horde/Element/Constants.php" name="lib/Horde/Element/Constants.php" />
- <install as="Horde/Element/Exception.php" name="lib/Horde/Element/Exception.php" />
- <install as="Horde/Element/Module.php" name="lib/Horde/Element/Module.php" />
- <install as="Horde/Element/Modules.php" name="lib/Horde/Element/Modules.php" />
- <install as="Horde/Element/Config/Cli.php" name="lib/Horde/Element/Config/Cli.php" />
- <install as="Horde/Element/Module/CiSetup.php" name="lib/Horde/Element/Module/CiSetup.php" />
- <install as="Horde/Element/Module/DevPackage.php" name="lib/Horde/Element/Module/DevPackage.php" />
- <install as="Horde/Element/Module/Installer.php" name="lib/Horde/Element/Module/Installer.php" />
- <install as="Horde/Element/Module/PearPackageXml.php" name="lib/Horde/Element/Module/PearPackageXml.php" />
- <install as="horde-element" name="script/horde-element.php" />
- <install as="Horde/Element/AllTests.php" name="test/Horde/Element/AllTests.php" />
- <install as="Horde/Element/Autoload.php" name="test/Horde/Element/Autoload.php" />
- <install as="Horde/Element/phpunit.xml" name="test/Horde/Element/phpunit.xml" />
- <install as="Horde/Element/StoryTestCase.php" name="test/Horde/Element/StoryTestCase.php" />
- <install as="Horde/Element/fixture/simple/lib/New.php" name="test/Horde/Element/fixture/simple/lib/New.php" />
- <install as="Horde/Element/fixture/simple/lib/Second.php" name="test/Horde/Element/fixture/simple/lib/Second.php" />
- <install as="Horde/Element/Integration/ElementTest.php" name="test/Horde/Element/Integration/ElementTest.php" />
- <install as="Horde/Element/Stub/Parser.php" name="test/Horde/Element/Stub/Parser.php" />
+ <install as="hudson-component-build.xml.template" name="data/hudson-component-build.xml.template" />
+ <install as="hudson-component-config.xml.template" name="data/hudson-component-config.xml.template" />
+ <install as="hudson-component-phpunit.xml.template" name="data/hudson-component-phpunit.xml.template" />
+ <install as="Components.php" name="lib/Components.php" />
+ <install as="Components/Config.php" name="lib/Components/Config.php" />
+ <install as="Components/Configs.php" name="lib/Components/Configs.php" />
+ <install as="Components/Constants.php" name="lib/Components/Constants.php" />
+ <install as="Components/Exception.php" name="lib/Components/Exception.php" />
+ <install as="Components/Module.php" name="lib/Components/Module.php" />
+ <install as="Components/Modules.php" name="lib/Components/Modules.php" />
+ <install as="Components/Config/Cli.php" name="lib/Components/Config/Cli.php" />
+ <install as="Components/Module/CiSetup.php" name="lib/Components/Module/CiSetup.php" />
+ <install as="Components/Module/DevPackage.php" name="lib/Components/Module/DevPackage.php" />
+ <install as="Components/Module/Installer.php" name="lib/Components/Module/Installer.php" />
+ <install as="Components/Module/PearPackageXml.php" name="lib/Components/Module/PearPackageXml.php" />
+ <install as="horde-components" name="script/horde-components.php" />
+ <install as="Components/AllTests.php" name="test/Components/AllTests.php" />
+ <install as="Components/Autoload.php" name="test/Components/Autoload.php" />
+ <install as="Components/phpunit.xml" name="test/Components/phpunit.xml" />
+ <install as="Components/StoryTestCase.php" name="test/Components/StoryTestCase.php" />
+ <install as="Components/fixture/simple/lib/New.php" name="test/Components/fixture/simple/lib/New.php" />
+ <install as="Components/fixture/simple/lib/Second.php" name="test/Components/fixture/simple/lib/Second.php" />
+ <install as="Components/Integration/ComponentsTest.php" name="test/Components/Integration/ComponentsTest.php" />
+ <install as="Components/Stub/Parser.php" name="test/Components/Stub/Parser.php" />
</filelist>
</phprelease>
<changelog>
#!/usr/bin/env php
<?php
require_once 'Horde/Autoloader/Default.php';
-Horde_Element::main();
+Components::main();
<?php
/**
- * All tests for the Horde_Element:: package.
+ * All tests for the Components:: package.
*
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @subpackage UnitTests
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
* Define the main method
*/
if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Element_AllTests::main');
+ define('PHPUnit_MAIN_METHOD', 'Components_AllTests::main');
}
/**
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @subpackage UnitTests
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_AllTests extends Horde_Test_AllTests
+class Components_AllTests extends Horde_Test_AllTests
{
}
-Horde_Element_AllTests::init('Horde_Element', __FILE__);
+Components_AllTests::init('Components', __FILE__);
-if (PHPUnit_MAIN_METHOD == 'Horde_Element_AllTests::main') {
- Horde_Element_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Components_AllTests::main') {
+ Components_AllTests::main();
}
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @subpackage UnitTests
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
if (!spl_autoload_functions()) {
--- /dev/null
+<?php
+/**
+ * Test the Components package.
+ *
+ * PHP version 5
+ *
+ * @category Horde
+ * @package Components
+ * @subpackage UnitTests
+ * @author Gunnar Wrobel <wrobel@pardus.de>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Components
+ */
+
+/**
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/../Autoload.php';
+
+/**
+ * Test the Components package.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Horde
+ * @package Components
+ * @subpackage UnitTests
+ * @author Gunnar Wrobel <wrobel@pardus.de>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Components
+ */
+class Components_Integration_ComponentsTest
+extends Components_StoryTestCase
+{
+ /**
+ * @scenario
+ */
+ public function theHelpOptionResultsInHelpOutput()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the help option')
+ ->then('the help will be displayed');
+ }
+
+ /**
+ * @scenario
+ */
+ public function thePearpackagexmlModuleAddsThePOptionInTheHelpOutput()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the help option')
+ ->then('the help will contain the "p" option.');
+ }
+
+ /**
+ * @scenario
+ */
+ public function thePearpackagexmlModuleAddsTheUOptionInTheHelpOutput()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the help option')
+ ->then('the help will contain the "u" option.');
+ }
+
+ /**
+ * @scenario
+ */
+ public function theDevpackageModuleAddsTheDOptionInTheHelpOutput()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the help option')
+ ->then('the help will contain the "d" option.');
+ }
+
+ /**
+ * @scenario
+ */
+ public function theThePOptionProvidesAnUpdatedPackageXml()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the packagexml option and a Horde element')
+ ->then('the new package.xml of the Horde element will be printed.');
+ }
+
+ /**
+ * @todo Test (and fix) the reactions to three more scenarios:
+ * - invalid XML in the package.xml (e.g. tag missing)
+ * - empty file list
+ * - file list with just one entry.
+ *
+ * All three scenarios yield errors which are still hard to
+ * understand.
+ */
+
+ /**
+ * @scenario
+ */
+ public function theInstallerModuleAddsTheIOptionInTheHelpOutput()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the help option')
+ ->then('the help will contain the "i" option.');
+ }
+
+ /**
+ * @scenario
+ */
+ public function theTheIOptionInstallsThePackageFromTheCurrentTree()
+ {
+ $this->given('the default Components setup')
+ ->when('calling the package with the install option and a Horde element')
+ ->then('a new PEAR configuration file will be installed')
+ ->and('the PEAR package will be installed')
+ ->and('the non-Horde dependencies of the Horde element will get installed from the network.')
+ ->and('the Horde dependencies of the Horde element will get installed from the current tree.')
+ ->and('the Horde element will be installed');
+ }
+}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * Test the Element package.
- *
- * PHP version 5
- *
- * @category Horde
- * @package Element
- * @subpackage UnitTests
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
- */
-
-/**
- * Prepare the test setup.
- */
-require_once dirname(__FILE__) . '/../Autoload.php';
-
-/**
- * Test the Element package.
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package Element
- * @subpackage UnitTests
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
- */
-class Horde_Element_Integration_ElementTest
-extends Horde_Element_StoryTestCase
-{
- /**
- * @scenario
- */
- public function theHelpOptionResultsInHelpOutput()
- {
- $this->given('the default Element setup')
- ->when('calling the package with the help option')
- ->then('the help will be displayed');
- }
-
- /**
- * @scenario
- */
- public function thePearpackagexmlModuleAddsThePOptionInTheHelpOutput()
- {
- $this->given('the default Element setup')
- ->when('calling the package with the help option')
- ->then('the help will contain the "p" option.');
- }
-
- /**
- * @scenario
- */
- public function thePearpackagexmlModuleAddsTheUOptionInTheHelpOutput()
- {
- $this->given('the default Element setup')
- ->when('calling the package with the help option')
- ->then('the help will contain the "u" option.');
- }
-
- /**
- * @scenario
- */
- public function theDevpackageModuleAddsTheDOptionInTheHelpOutput()
- {
- $this->given('the default Element setup')
- ->when('calling the package with the help option')
- ->then('the help will contain the "d" option.');
- }
-
- /**
- * @scenario
- */
- public function theThePOptionProvidesAnUpdatedPackageXml()
- {
- $this->given('the default Element setup')
- ->when('calling the package with the packagexml option and a Horde element')
- ->then('the new package.xml of the Horde element will be printed.');
- }
-
- /**
- * @todo Test (and fix) the reactions to three more scenarios:
- * - invalid XML in the package.xml (e.g. tag missing)
- * - empty file list
- * - file list with just one entry.
- *
- * All three scenarios yield errors which are still hard to
- * understand.
- */
-
- /**
- * @scenario
- */
- public function theInstallerModuleAddsTheIOptionInTheHelpOutput()
- {
- $this->given('the default Element setup')
- ->when('calling the package with the help option')
- ->then('the help will contain the "i" option.');
- }
-
- /**
- * @scenario
- */
- public function theTheIOptionInstallsThePackageFromTheCurrentTree()
- {
- $this->given('the default Element setup')
- ->when('calling the package with the install option and a Horde element')
- ->then('a new PEAR configuration file will be installed')
- ->and('the PEAR package will be installed')
- ->and('the non-Horde dependencies of the Horde element will get installed from the network.')
- ->and('the Horde dependencies of the Horde element will get installed from the current tree.')
- ->and('the Horde element will be installed');
- }
-}
\ No newline at end of file
* PHP version 5
*
* @category Horde
- * @package Element
+ * @package Components
* @subpackage UnitTests
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
/**
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Element
+ * @package Components
* @subpackage UnitTests
* @author Gunnar Wrobel <wrobel@pardus.de>
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Element
+ * @link http://pear.horde.org/index.php?package=Components
*/
-class Horde_Element_StoryTestCase
+class Components_StoryTestCase
extends PHPUnit_Extensions_Story_TestCase
{
public function tearDown()
public function runGiven(&$world, $action, $arguments)
{
switch($action) {
- case 'the default Element setup':
+ case 'the default Components setup':
break;
default:
return $this->notImplemented($action);
switch($action) {
case 'calling the package with the help option':
$_SERVER['argv'] = array(
- 'horde-element',
+ 'horde-components',
'--help',
dirname(__FILE__) . '/fixture/empty'
);
ob_start();
$parameters = array();
- $parameters['cli']['parser']['class'] = 'Horde_Element_Stub_Parser';
- Horde_Element::main($parameters);
+ $parameters['cli']['parser']['class'] = 'Components_Stub_Parser';
+ Components::main($parameters);
$world['output'] = ob_get_contents();
ob_end_clean();
break;
case 'calling the package with the packagexml option and a Horde element':
$_SERVER['argv'] = array(
- 'horde-element',
+ 'horde-components',
'--packagexml',
dirname(__FILE__) . '/fixture/simple'
);
ob_start();
$parameters = array();
- $parameters['cli']['parser']['class'] = 'Horde_Element_Stub_Parser';
+ $parameters['cli']['parser']['class'] = 'Components_Stub_Parser';
$old_errorreporting = error_reporting(E_ALL & ~E_STRICT);
- Horde_Element::main($parameters);
+ Components::main($parameters);
error_reporting($old_errorreporting);
$world['output'] = ob_get_contents();
ob_end_clean();
break;
case 'calling the package with the install option and a Horde element':
$_SERVER['argv'] = array(
- 'horde-element',
+ 'horde-components',
'--install=' . $this->_getTemporaryDirectory(),
- dirname(__FILE__) . '/../../../'
+ dirname(__FILE__) . '/../../'
);
ob_start();
$parameters = array();
- $parameters['cli']['parser']['class'] = 'Horde_Element_Stub_Parser';
+ $parameters['cli']['parser']['class'] = 'Components_Stub_Parser';
$old_errorreporting = error_reporting(E_ALL & ~E_STRICT);
- Horde_Element::main($parameters);
+ Components::main($parameters);
error_reporting($old_errorreporting);
$world['output'] = ob_get_contents();
ob_end_clean();
. 'pear' . DIRECTORY_SEPARATOR
. 'php' . DIRECTORY_SEPARATOR
. 'Horde' . DIRECTORY_SEPARATOR
- . 'Element.php'
+ . 'Components.php'
)
);
break;
private function _getTemporaryDirectory()
{
$this->_temp_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR
- . 'Horde_Element_' . mt_rand();
+ . 'Components_' . mt_rand();
mkdir($this->_temp_dir);
return $this->_temp_dir;
}
<?php
-class Horde_Element_Stub_Parser
+class Components_Stub_Parser
extends Horde_Argv_Parser
{
public function parserExit($status = 0, $msg = null)
<name>Fixture</name>
<channel>pear.horde.org</channel>
<summary>Test fixture.</summary>
- <description>A dummy package.xml used for testing the Horde_Element package.</description>
+ <description>A dummy package.xml used for testing the Components package.</description>
<lead>
<name>Gunnar Wrobel</name>
<user>wrobel</user>