Permalink
Browse files

Change namespace from pear2 to PEAR2, as approved by the PEAR Group.

  • Loading branch information...
1 parent 5cc63a1 commit d5106b76537451135e36c196f4a8eca7c7cfea53 @saltybeagle saltybeagle committed May 12, 2010
View
@@ -2,7 +2,7 @@
<commands version="2.0" xmlns="http://pear2.php.net/dtd/customcommand-2.0">
<command>
<name>scs-update</name>
- <class>pear2\SimpleChannelServer\CLI</class>
+ <class>PEAR2\SimpleChannelServer\CLI</class>
<function>pyrusUpdate</function>
<autoloadpath/>
<summary>Simple channel server: Update all releases of a within the get/ directory.</summary>
@@ -21,7 +21,7 @@ In addition, the handle configuration variable must be set to your handle
</command>
<command>
<name>scs-create</name>
- <class>pear2\SimpleChannelServer\CLI</class>
+ <class>PEAR2\SimpleChannelServer\CLI</class>
<function>pyrusCreate</function>
<autoloadpath/>
<summary>Simple channel server: Create a channel.xml, get/ and rest/ directory for a channel</summary>
@@ -60,7 +60,7 @@ specified by the location of the channel.xml file.
</command>
<command>
<name>scs-add-maintainer</name>
- <class>pear2\SimpleChannelServer\CLI</class>
+ <class>PEAR2\SimpleChannelServer\CLI</class>
<function>pyrusAddMaintainer</function>
<autoloadpath/>
<summary>Simple Channel Server: Add a new maintaing developer to the channel</summary>
@@ -93,7 +93,7 @@ to be listed prior to making their first release.
</command>
<command>
<name>scs-add-category</name>
- <class>pear2\SimpleChannelServer\CLI</class>
+ <class>PEAR2\SimpleChannelServer\CLI</class>
<function>pyrusAddCategory</function>
<autoloadpath/>
<summary>Simple Channel Server: Add a new category to the channel</summary>
@@ -120,7 +120,7 @@ command to create a new category.
</command>
<command>
<name>scs-categorize</name>
- <class>pear2\SimpleChannelServer\CLI</class>
+ <class>PEAR2\SimpleChannelServer\CLI</class>
<function>pyrusCategorize</function>
<autoloadpath/>
<summary>Simple Channel Server: Categorize a package</summary>
@@ -146,7 +146,7 @@ Use this command to add a package to a category.
</command>
<command>
<name>scs-release</name>
- <class>pear2\SimpleChannelServer\CLI</class>
+ <class>PEAR2\SimpleChannelServer\CLI</class>
<function>pyrusRelease</function>
<autoloadpath/>
<summary>Simple Channel Server: Release a package</summary>
@@ -21,16 +21,16 @@
var_dump($category);
}
*/
-$channel = new pear2\SimpleChannelServer\Channel('pear2.php.net','Brett Bieber\'s PEAR Channel','salty');
+$channel = new PEAR2\SimpleChannelServer\Channel('pear2.php.net','Brett Bieber\'s PEAR Channel','salty');
-//$scs = new pear2\SimpleChannelServer\Main($channel,'/Library/WebServer/Documents/pearserver','/home/bbieber/pyrus/php');
-$scs = new pear2\SimpleChannelServer\Main($channel,'/home/cellog/testapache/htdocs',\pear2\Pyrus\Config::current()->location);
-$categories = pear2\SimpleChannelServer\Categories::create('Default', 'This is the default category');
+//$scs = new PEAR2\SimpleChannelServer\Main($channel,'/Library/WebServer/Documents/pearserver','/home/bbieber/pyrus/php');
+$scs = new PEAR2\SimpleChannelServer\Main($channel,'/home/cellog/testapache/htdocs',\PEAR2\Pyrus\Config::current()->location);
+$categories = PEAR2\SimpleChannelServer\Categories::create('Default', 'This is the default category');
$scs->saveChannel();
-$scs->saveRelease(new \pear2\Pyrus\Package(dirname(__FILE__) . '/../package.xml'), 'cellog');
+$scs->saveRelease(new \PEAR2\Pyrus\Package(dirname(__FILE__) . '/../package.xml'), 'cellog');
echo 'did it'.PHP_EOL;
/*
-$manager = new pear2\SimpleChannelServer\REST_Manager('/Library/WebServer/Documents/pearserver','pear2.php.net','rest/',array('cellog'));
-var_dump($manager->saveRelease(new \pear2\Pyrus\Package(dirname(__FILE__) . '/../package.xml'),'cellog'));
+$manager = new PEAR2\SimpleChannelServer\REST_Manager('/Library/WebServer/Documents/pearserver','pear2.php.net','rest/',array('cellog'));
+var_dump($manager->saveRelease(new \PEAR2\Pyrus\Package(dirname(__FILE__) . '/../package.xml'),'cellog'));
*/
?>
@@ -25,7 +25,7 @@
$dir = new DirectoryIterator($dirname);
foreach ($dir as $file) {
if (!$file->isDot() && substr($file->getFilename(), -3) != 'tar') {
- $scs->saveRelease(new \pear2\Pyrus\Package($dirname.$file->getFilename()), 'saltybeagle');
+ $scs->saveRelease(new \PEAR2\Pyrus\Package($dirname.$file->getFilename()), 'saltybeagle');
}
}
View
@@ -1,12 +1,12 @@
<?php
-$pyrus = new \pear2\Pyrus\Package(__DIR__ . '/../../Pyrus/package.xml');
-$pyrus->setPackagingFilter('pear2\Pyrus\PackageFile\v2Iterator\MinimalPackageFilter');
+$pyrus = new \PEAR2\Pyrus\Package(__DIR__ . '/../../Pyrus/package.xml');
+$pyrus->setPackagingFilter('PEAR2\Pyrus\PackageFile\v2Iterator\MinimalPackageFilter');
$extrafiles = array(
- new \pear2\Pyrus\Package(__DIR__ . '/../../HTTP_Request/package.xml'),
+ new \PEAR2\Pyrus\Package(__DIR__ . '/../../HTTP_Request/package.xml'),
$pyrus,
- new \pear2\Pyrus\Package(__DIR__ . '/../../Pyrus_Developer/package.xml'),
- new \pear2\Pyrus\Package(__DIR__ . '/../../Exception/package.xml'),
- new \pear2\Pyrus\Package(__DIR__ . '/../../MultiErrors/package.xml'),
+ new \PEAR2\Pyrus\Package(__DIR__ . '/../../Pyrus_Developer/package.xml'),
+ new \PEAR2\Pyrus\Package(__DIR__ . '/../../Exception/package.xml'),
+ new \PEAR2\Pyrus\Package(__DIR__ . '/../../MultiErrors/package.xml'),
);
?>
View
@@ -3,34 +3,34 @@
ini_set('display_errors',true);
require_once dirname(__FILE__).'/../../autoload.php';
-$a = new \pear2\Pyrus\Developer\PackageFile\PEAR2SVN(dirname(__FILE__), 'PEAR2_SimpleChannelServer');
+$a = new \PEAR2\Pyrus\Developer\PackageFile\PEAR2SVN(dirname(__FILE__), 'PEAR2_SimpleChannelServer');
-$package = new \pear2\Pyrus\Package('package.xml');
+$package = new \PEAR2\Pyrus\Package('package.xml');
$outfile = $package->name.'-'.$package->version['release'];
-$a = new \pear2\Pyrus\Package\Creator(array(
- //new \pear2\Pyrus\Developer\Creator\Tar($outfile.'.tar', 'none'),
- new \pear2\Pyrus\Developer\Creator\Phar($outfile.'.tgz', false, Phar::TAR, Phar::GZ),),
+$a = new \PEAR2\Pyrus\Package\Creator(array(
+ //new \PEAR2\Pyrus\Developer\Creator\Tar($outfile.'.tar', 'none'),
+ new \PEAR2\Pyrus\Developer\Creator\Phar($outfile.'.tgz', false, Phar::TAR, Phar::GZ),),
dirname(__FILE__).'/../../Exception/src',
dirname(__FILE__).'/../../Autoload/src',
dirname(__FILE__).'/../../MultiErrors/src');
$a->render($package);
-$a = new \pear2\Pyrus\Package\Creator(array(
- new \pear2\Pyrus\Developer\Creator\Phar(__DIR__ . '/pearscs.phar', '<?php
+$a = new \PEAR2\Pyrus\Package\Creator(array(
+ new \PEAR2\Pyrus\Developer\Creator\Phar(__DIR__ . '/pearscs.phar', '<?php
function __autoload($class)
{
include \'phar://\' . PYRUS_PHAR_FILE . \'/PEAR2_SimpleChannelServer-' .
$package->version['release'] . '/php/\' . implode(\'/\', explode(\'_\', $class)) . \'.php\';
}
set_include_path(\'phar://\' . PYRUS_PHAR_FILE . \'/PEAR2_SimpleChannelServer-' .
$package->version['release'] . '/php/\'.PATH_SEPARATOR.get_include_path());
-$cli = new \pear2\SimpleChannelServer\CLI();
+$cli = new \PEAR2\SimpleChannelServer\CLI();
$cli->process();
'),),
dirname(__FILE__) . '/../../Exception/src',
dirname(__FILE__) . '/../../Autoload/src',
dirname(__FILE__) . '/../../MultiErrors/src');
-$b = new \pear2\Pyrus\Package(__DIR__ . '/package.xml');
+$b = new \PEAR2\Pyrus\Package(__DIR__ . '/package.xml');
$rp = __DIR__ . '/../../HTTP_Request/src/HTTP';
$additional_files = array(
@@ -43,9 +43,9 @@ function __autoload($class)
'php/PEAR2/HTTP/Request/Response.php' => $rp . '/Request/Response.php',
'php/PEAR2/HTTP/Request/Uri.php' => $rp . '/Request/Uri.php',
);
-$pyrus = new \pear2\Pyrus\Package(__DIR__ . '/../../Pyrus/package.xml');
-$pyrus_developer = new \pear2\Pyrus\Package(__DIR__ . '/../../Pyrus_Developer/package.xml');
-$exception = new \pear2\Pyrus\Package(__DIR__ . '/../../Exception/package.xml');
+$pyrus = new \PEAR2\Pyrus\Package(__DIR__ . '/../../Pyrus/package.xml');
+$pyrus_developer = new \PEAR2\Pyrus\Package(__DIR__ . '/../../Pyrus_Developer/package.xml');
+$exception = new \PEAR2\Pyrus\Package(__DIR__ . '/../../Exception/package.xml');
foreach (array('Pyrus' => $pyrus,
'Pyrus_Developer' => $pyrus_developer,
'Exception' => $exception) as $add_dir=>$add_package) {
View
@@ -27,8 +27,8 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<email>brett.bieber@gmail.com</email>
<active>yes</active>
</lead>
- <date>2009-12-19</date>
- <time>16:28:03</time>
+ <date>2010-04-01</date>
+ <time>10:17:41</time>
<version>
<release>0.1.0</release>
<api>0.1.0</api>
@@ -52,7 +52,7 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<dir name="scripts" baseinstalldir="/">
<file role="script" name="pearscs"/>
</dir>
- <dir name="src" baseinstalldir="pear2">
+ <dir name="src" baseinstalldir="PEAR2">
<dir name="SimpleChannelServer">
<dir name="Categories">
<file role="php" name="Exception.php"/>
View
@@ -27,8 +27,8 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<email>brett.bieber@gmail.com</email>
<active>yes</active>
</lead>
- <date>2009-12-19</date>
- <time>16:28:03</time>
+ <date>2010-04-01</date>
+ <time>10:17:41</time>
<version>
<release>0.1.0</release>
<api>0.1.0</api>
@@ -43,18 +43,18 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<contents>
<dir name="/">
<file role="script" name="script/pearscs"/>
- <file role="php" name="php/pear2/SimpleChannelServer/REST/Release.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/REST/Package.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/REST/Manager.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/REST/Maintainer.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/REST/Category.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/Main.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/Get.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/Exception.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/CLI.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/Channel.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/Categories/Exception.php"/>
- <file role="php" name="php/pear2/SimpleChannelServer/Categories.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/REST/Release.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/REST/Package.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/REST/Manager.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/REST/Maintainer.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/REST/Category.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/Main.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/Get.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/Exception.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/CLI.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/Channel.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/Categories/Exception.php"/>
+ <file role="php" name="php/PEAR2/SimpleChannelServer/Categories.php"/>
<file role="doc" name="doc/PEAR2_SimpleChannelServer/pear2.php.net/examples/examples/upgradeFromChiara.php"/>
<file role="doc" name="doc/PEAR2_SimpleChannelServer/pear2.php.net/examples/examples/update_channel.php"/>
<file role="data" name="customcommand/PEAR2_SimpleChannelServer/pear2.php.net/commands.xml"/>
@@ -83,18 +83,18 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<install name="customcommand/PEAR2_SimpleChannelServer/pear2.php.net/commands.xml" as="pear2.php.net/commands.xml"/>
<install name="doc/PEAR2_SimpleChannelServer/pear2.php.net/examples/examples/update_channel.php" as="pear2.php.net/examples/examples/update_channel.php"/>
<install name="doc/PEAR2_SimpleChannelServer/pear2.php.net/examples/examples/upgradeFromChiara.php" as="pear2.php.net/examples/examples/upgradeFromChiara.php"/>
- <install name="php/pear2/SimpleChannelServer/Categories.php" as="pear2/SimpleChannelServer/Categories.php"/>
- <install name="php/pear2/SimpleChannelServer/Categories/Exception.php" as="pear2/SimpleChannelServer/Categories/Exception.php"/>
- <install name="php/pear2/SimpleChannelServer/Channel.php" as="pear2/SimpleChannelServer/Channel.php"/>
- <install name="php/pear2/SimpleChannelServer/CLI.php" as="pear2/SimpleChannelServer/CLI.php"/>
- <install name="php/pear2/SimpleChannelServer/Exception.php" as="pear2/SimpleChannelServer/Exception.php"/>
- <install name="php/pear2/SimpleChannelServer/Get.php" as="pear2/SimpleChannelServer/Get.php"/>
- <install name="php/pear2/SimpleChannelServer/Main.php" as="pear2/SimpleChannelServer/Main.php"/>
- <install name="php/pear2/SimpleChannelServer/REST/Category.php" as="pear2/SimpleChannelServer/REST/Category.php"/>
- <install name="php/pear2/SimpleChannelServer/REST/Maintainer.php" as="pear2/SimpleChannelServer/REST/Maintainer.php"/>
- <install name="php/pear2/SimpleChannelServer/REST/Manager.php" as="pear2/SimpleChannelServer/REST/Manager.php"/>
- <install name="php/pear2/SimpleChannelServer/REST/Package.php" as="pear2/SimpleChannelServer/REST/Package.php"/>
- <install name="php/pear2/SimpleChannelServer/REST/Release.php" as="pear2/SimpleChannelServer/REST/Release.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/Categories.php" as="PEAR2/SimpleChannelServer/Categories.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/Categories/Exception.php" as="PEAR2/SimpleChannelServer/Categories/Exception.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/Channel.php" as="PEAR2/SimpleChannelServer/Channel.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/CLI.php" as="PEAR2/SimpleChannelServer/CLI.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/Exception.php" as="PEAR2/SimpleChannelServer/Exception.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/Get.php" as="PEAR2/SimpleChannelServer/Get.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/Main.php" as="PEAR2/SimpleChannelServer/Main.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/REST/Category.php" as="PEAR2/SimpleChannelServer/REST/Category.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/REST/Maintainer.php" as="PEAR2/SimpleChannelServer/REST/Maintainer.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/REST/Manager.php" as="PEAR2/SimpleChannelServer/REST/Manager.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/REST/Package.php" as="PEAR2/SimpleChannelServer/REST/Package.php"/>
+ <install name="php/PEAR2/SimpleChannelServer/REST/Release.php" as="PEAR2/SimpleChannelServer/REST/Release.php"/>
<install name="script/pearscs" as="pearscs"/>
</filelist>
</phprelease>
View
@@ -8,5 +8,5 @@ if (file_exists(dirname(__FILE__).'/../../../autoload.php')) {
require_once $autoload;
-$cli = new \pear2\SimpleChannelServer\CLI();
+$cli = new \PEAR2\SimpleChannelServer\CLI();
$cli->process();
@@ -1,11 +1,11 @@
<?php
-namespace pear2\SimpleChannelServer;
+namespace PEAR2\SimpleChannelServer;
class CLI
{
/**
* Channel object
*
- * @var \pear2\Pyrus\Channel
+ * @var \PEAR2\Pyrus\Channel
*/
protected $channel;
@@ -21,7 +21,7 @@ class CLI
/**
* The simplechannelserver object
*
- * @var pear2\SimpleChannelServer\Main
+ * @var PEAR2\SimpleChannelServer\Main
*/
public $scs;
@@ -30,7 +30,7 @@ public function __construct()
$channel_file = getcwd() . '/channel.xml';
$this->dir = getcwd();
if (file_exists($channel_file)) {
- $this->channel = new \pear2\Pyrus\Channel(new \pear2\Pyrus\ChannelFile($channel_file));
+ $this->channel = new \PEAR2\Pyrus\Channel(new \PEAR2\Pyrus\ChannelFile($channel_file));
$this->scs = new Main($this->channel, $this->dir);
}
}
@@ -176,15 +176,15 @@ function pyrusUpdate($frontend, $args)
if (null === $frontend) {
$maintainer = $args;
} else {
- $chan = \pear2\Pyrus\Config::current()->default_channel;
- \pear2\Pyrus\Config::current()->default_channel = $this->channel->name;
- $maintainer = \pear2\Pyrus\Config::current()->handle;
- \pear2\Pyrus\Config::current()->default_channel = $chan;
+ $chan = \PEAR2\Pyrus\Config::current()->default_channel;
+ \PEAR2\Pyrus\Config::current()->default_channel = $this->channel->name;
+ $maintainer = \PEAR2\Pyrus\Config::current()->handle;
+ \PEAR2\Pyrus\Config::current()->default_channel = $chan;
}
$dirname = $this->dir . '/get/';
$dir = new \DirectoryIterator($dirname);
- $errs = new \pear2\MultiErrors;
+ $errs = new \PEAR2\MultiErrors;
foreach ($dir as $file) {
if (!$file->isDot()
&& !$file->isDir()
@@ -217,10 +217,10 @@ public function handleRelease()
function pyrusRelease($frontend, $args)
{
if (null !== $frontend) {
- $chan = \pear2\Pyrus\Config::current()->default_channel;
- \pear2\Pyrus\Config::current()->default_channel = $this->channel->name;
- $args['maintainer'] = \pear2\Pyrus\Config::current()->handle;
- \pear2\Pyrus\Config::current()->default_channel = $chan;
+ $chan = \PEAR2\Pyrus\Config::current()->default_channel;
+ \PEAR2\Pyrus\Config::current()->default_channel = $this->channel->name;
+ $args['maintainer'] = \PEAR2\Pyrus\Config::current()->handle;
+ \PEAR2\Pyrus\Config::current()->default_channel = $chan;
}
$this->scs->saveRelease($args['path'], $args['maintainer']);
echo 'Release successfully saved.'.PHP_EOL;
Oops, something went wrong.

0 comments on commit d5106b7

Please sign in to comment.