Skip to content

Commit

Permalink
Move SCS fully under the Pyrus namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
helgi committed Jul 12, 2011
1 parent ab57266 commit a70e5ca
Show file tree
Hide file tree
Showing 22 changed files with 73 additions and 74 deletions.
3 changes: 2 additions & 1 deletion RELEASE-0.3.0
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Using \Pyrus instead of \PEAR2\Pyrus namespace as per the latest Pyrus
- Using \Pyrus instead of \PEAR2\Pyrus namespace as per the latest Pyrus
- Move the channel server itself to the Pyrus namespace
12 changes: 6 additions & 6 deletions customcommand/commands.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>Pyrus\SimpleChannelServer\CLI</class>
<function>pyrusUpdate</function>
<autoloadpath/>
<summary>Simple channel server: Update all releases of a within the get/ directory.</summary>
Expand All @@ -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>Pyrus\SimpleChannelServer\CLI</class>
<function>pyrusCreate</function>
<autoloadpath/>
<summary>Simple channel server: Create a channel.xml, get/ and rest/ directory for a channel</summary>
Expand Down Expand Up @@ -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>Pyrus\SimpleChannelServer\CLI</class>
<function>pyrusAddMaintainer</function>
<autoloadpath/>
<summary>Simple Channel Server: Add a new maintaing developer to the channel</summary>
Expand Down Expand Up @@ -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>Pyrus\SimpleChannelServer\CLI</class>
<function>pyrusAddCategory</function>
<autoloadpath/>
<summary>Simple Channel Server: Add a new category to the channel</summary>
Expand All @@ -120,7 +120,7 @@ command to create a new category.
</command>
<command>
<name>scs-categorize</name>
<class>PEAR2\SimpleChannelServer\CLI</class>
<class>Pyrus\SimpleChannelServer\CLI</class>
<function>pyrusCategorize</function>
<autoloadpath/>
<summary>Simple Channel Server: Categorize a package</summary>
Expand All @@ -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>Pyrus\SimpleChannelServer\CLI</class>
<function>pyrusRelease</function>
<autoloadpath/>
<summary>Simple Channel Server: Release a package</summary>
Expand Down
10 changes: 5 additions & 5 deletions examples/update_channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
var_dump($category);
}
*/
$channel = new PEAR2\SimpleChannelServer\Channel('pear2.php.net','Brett Bieber\'s PEAR Channel','salty');
$channel = new Pyrus\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',\Pyrus\Config::current()->location);
$categories = PEAR2\SimpleChannelServer\Categories::create('Default', 'This is the default category');
//$scs = new Pyrus\SimpleChannelServer\Main($channel,'/Library/WebServer/Documents/pearserver','/home/bbieber/pyrus/php');
$scs = new Pyrus\SimpleChannelServer\Main($channel,'/home/cellog/testapache/htdocs',\Pyrus\Config::current()->location);
$categories = Pyrus\SimpleChannelServer\Categories::create('Default', 'This is the default category');
$scs->saveChannel();
$scs->saveRelease(new \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'));
$manager = new Pyrus\SimpleChannelServer\REST_Manager('/Library/WebServer/Documents/pearserver','pear2.php.net','rest/',array('cellog'));
var_dump($manager->saveRelease(new \Pyrus\Package(dirname(__FILE__) . '/../package.xml'),'cellog'));
*/
?>
4 changes: 2 additions & 2 deletions extrasetup.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

$pyrus = new \Pyrus\Package(__DIR__ . '/../PEAR2_Pyrus/package.xml');
$pyrus = new \Pyrus\Package(__DIR__ . '/../Pyrus/package.xml');
$pyrus->setPackagingFilter('Pyrus\PackageFile\v2Iterator\MinimalPackageFilter');
$extrafiles = array(
new \Pyrus\Package(__DIR__ . '/../PEAR2_HTTP_Request/package.xml'),
$pyrus,
new \Pyrus\Package(__DIR__ . '/../PEAR2_Pyrus_Developer/package.xml'),
new \Pyrus\Package(__DIR__ . '/../Pyrus_Developer/package.xml'),
new \Pyrus\Package(__DIR__ . '/../PEAR2_Exception/package.xml'),
new \Pyrus\Package(__DIR__ . '/../PEAR2_MultiErrors/package.xml'),
);
Expand Down
11 changes: 5 additions & 6 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2011-05-11</date>
<time>18:21:17</time>
<date>2011-07-11</date>
<time>19:04:51</time>
<version>
<release>0.2.0</release>
<release>0.3.0</release>
<api>0.1.0</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>Fixes:

- Add support for channels using https [saltybeagle]</notes>
<notes/>
<contents>
<dir name="/">
<dir name="customcommand" baseinstalldir="/">
Expand Down Expand Up @@ -88,6 +86,7 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<package>
<name>PEAR2_Pyrus</name>
<channel>pear2.php.net</channel>
<min>0.5.0</min>
</package>
<package>
<name>PEAR2_MultiErrors</name>
Expand Down
11 changes: 5 additions & 6 deletions package_compatible.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2011-05-11</date>
<time>18:21:17</time>
<date>2011-07-11</date>
<time>19:04:51</time>
<version>
<release>0.2.0</release>
<release>0.3.0</release>
<api>0.1.0</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>Fixes:

- Add support for channels using https [saltybeagle]</notes>
<notes/>
<contents>
<dir name="/">
<file role="script" name="script/pearscs"/>
Expand Down Expand Up @@ -72,6 +70,7 @@ More information here: http://pear.php.net/manual/en/channels.scs.php
<package>
<name>PEAR2_Pyrus</name>
<channel>pear2.php.net</channel>
<min>0.5.0</min>
</package>
<package>
<name>PEAR2_MultiErrors</name>
Expand Down
4 changes: 2 additions & 2 deletions packagexmlsetup.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
$package->dependencies['required']->php = '5.3.0';
$package->dependencies['required']->package['pear2.php.net/PEAR2_Pyrus']->save();
$package->dependencies['required']->package['pear2.php.net/PEAR2_Pyrus']->min('0.5.0');
$package->dependencies['required']->package['pear2.php.net/PEAR2_MultiErrors']->save();

$compatible->dependencies['required']->php = '5.3.0';
$compatible->dependencies['required']->package['pear2.php.net/PEAR2_Pyrus']->save();
$compatible->dependencies['required']->package['pear2.php.net/PEAR2_Pyrus']->min('0.5.0');
$compatible->dependencies['required']->package['pear2.php.net/PEAR2_MultiErrors']->save();
?>
Binary file modified pearscs.phar
Binary file not shown.
2 changes: 1 addition & 1 deletion scripts/pearscs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ if (file_exists(__DIR__ . '/../autoload.php')) {

require_once $autoload;

$cli = new \PEAR2\SimpleChannelServer\CLI();
$cli = new \Pyrus\SimpleChannelServer\CLI();
$cli->process();
4 changes: 2 additions & 2 deletions src/PEAR2/SimpleChannelServer/CLI.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace PEAR2\SimpleChannelServer;
namespace Pyrus\SimpleChannelServer;
class CLI
{
/**
Expand All @@ -21,7 +21,7 @@ class CLI
/**
* The simplechannelserver object
*
* @var PEAR2\SimpleChannelServer\Main
* @var Pyrus\SimpleChannelServer\Main
*/
public $scs;

Expand Down
10 changes: 5 additions & 5 deletions src/PEAR2/SimpleChannelServer/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
* create('Name4', 'Description 4');
* file_put_contents('/path/to/serialize/categories.inf', serialize($cat));
* }
* $categories = PEAR2\SimpleChannelServer\Categories::getCategories();
* $categories = Pyrus\SimpleChannelServer\Categories::getCategories();
* $categories->link('SimpleChannelServer', 'Developer');
* </code>
*
* @category Developer
* @package PEAR2_SimpleChannelServer
* @package Pyrus_SimpleChannelServer
* @author Greg Beaver <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://svn.php.net/viewvc/pear2/sandbox/SimpleChannelServer/
* @link https://github.com/pyrus/Pyrus_SimpleChannelServer
*/
namespace PEAR2\SimpleChannelServer;
namespace Pyrus\SimpleChannelServer;
class Categories
{
/**
Expand Down Expand Up @@ -83,7 +83,7 @@ public function exists($category)
* @param string $description Description of the category
* @param string $alias Alias of the category
*
* @return PEAR2\SimpleChannelServer\Categories
* @return Pyrus\SimpleChannelServer\Categories
*/
public function create($name, $description, $alias = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/PEAR2/SimpleChannelServer/Categories/Exception.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
namespace PEAR2\SimpleChannelServer\Categories;
namespace Pyrus\SimpleChannelServer\Categories;
class Exception extends \Exception {}
6 changes: 3 additions & 3 deletions src/PEAR2/SimpleChannelServer/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Channel writer for simple channel server.
*
* @category Developer
* @package PEAR2_SimpleChannelServer
* @package Pyrus_SimpleChannelServer
* @author Brett Bieber <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://svn.php.net/viewvc/pear2/sandbox/SimpleChannelServer/
* @link https://github.com/pyrus/Pyrus_SimpleChannelServer
*/
namespace PEAR2\SimpleChannelServer;
namespace Pyrus\SimpleChannelServer;
class Channel extends \Pyrus\ChannelFile
{

Expand Down
2 changes: 1 addition & 1 deletion src/PEAR2/SimpleChannelServer/Exception.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
namespace PEAR2\SimpleChannelServer;
namespace Pyrus\SimpleChannelServer;
class Exception extends \Exception {}
2 changes: 1 addition & 1 deletion src/PEAR2/SimpleChannelServer/Get.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace PEAR2\SimpleChannelServer;
namespace Pyrus\SimpleChannelServer;
class Get
{
protected $get;
Expand Down
16 changes: 8 additions & 8 deletions src/PEAR2/SimpleChannelServer/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Class for a filesystem only PEAR compatible channel server.
*
* @category Developer
* @package PEAR2_SimpleChannelServer
* @package Pyrus_SimpleChannelServer
* @author Greg Beaver <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://svn.php.net/viewvc/pear2/sandbox/SimpleChannelServer/
* @link https://github.com/pyrus/Pyrus_SimpleChannelServer
*/
namespace PEAR2\SimpleChannelServer;
namespace Pyrus\SimpleChannelServer;
class Main
{
/**
Expand All @@ -19,7 +19,7 @@ class Main
* @var string
*/
protected $webpath;

/**
* Path to rest files
* @var string
Expand All @@ -32,21 +32,21 @@ class Main
/**
* REST manager
*
* @var PEAR2\SimpleChannelServer\REST\Manager
* @var Pyrus\SimpleChannelServer\REST\Manager
*/
protected $rest;

/**
* GET manager
*
* @var PEAR2\SimpleChannelServer\Get
* @var Pyrus\SimpleChannelServer\Get
*/
protected $get;

/**
* Construct simple channel server
*
* @param PEAR2\SimpleChannelServer\Channel $channel channel object
* @param Pyrus\SimpleChannelServer\Channel $channel channel object
* @param string $webpath full path to web files eg: /var/www/pear/
* @param string $pyruspath Path to the pyrus controlled PEAR installation
*/
Expand Down Expand Up @@ -86,7 +86,7 @@ function __construct($channel, $webpath, $pyruspath = null)
$e);
}
}

function categorize($package, $category)
{
$categories = new Categories($this->channel);
Expand Down
8 changes: 4 additions & 4 deletions src/PEAR2/SimpleChannelServer/REST/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Class for managing category information for the PEAR channel.
*
* @category Developer
* @package PEAR2_SimpleChannelServer
* @package Pyrus_SimpleChannelServer
* @author Greg Beaver <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://svn.php.net/viewvc/pear2/sandbox/SimpleChannelServer/
* @link https://github.com/pyrus/Pyrus_SimpleChannelServer
*/
namespace PEAR2\SimpleChannelServer\REST;
use PEAR2\SimpleChannelServer\Categories;
namespace Pyrus\SimpleChannelServer\REST;
use Pyrus\SimpleChannelServer\Categories;
class Category extends Manager
{
protected $_categories;
Expand Down
8 changes: 4 additions & 4 deletions src/PEAR2/SimpleChannelServer/REST/Maintainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Class for managing Maintainer files within the SimpleChannelServer.
*
* @category Developer
* @package PEAR2_SimpleChannelServer
* @package Pyrus_SimpleChannelServer
* @author Greg Beaver <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://svn.php.net/viewvc/pear2/sandbox/SimpleChannelServer/
* @link https://github.com/pyrus/Pyrus_SimpleChannelServer
*/
namespace PEAR2\SimpleChannelServer\REST;
use PEAR2\SimpleChannelServer\Exception;
namespace Pyrus\SimpleChannelServer\REST;
use Pyrus\SimpleChannelServer\Exception;
class Maintainer extends Manager
{
function save(\Pyrus\Package $new)
Expand Down
10 changes: 5 additions & 5 deletions src/PEAR2/SimpleChannelServer/REST/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Base class for managing a REST based PEAR compatible channel server.
*
* @category Developer
* @package PEAR2_SimpleChannelServer
* @package Pyrus_SimpleChannelServer
* @author Greg Beaver <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @link http://svn.php.net/viewvc/pear2/sandbox/SimpleChannelServer/
* @link https://github.com/pyrus/Pyrus_SimpleChannelServer
*/
namespace PEAR2\SimpleChannelServer\REST;
use PEAR2\SimpleChannelServer\Exception;
namespace Pyrus\SimpleChannelServer\REST;
use Pyrus\SimpleChannelServer\Exception;
class Manager
{
/**
Expand Down Expand Up @@ -64,7 +64,7 @@ function saveRelease(\Pyrus\Package $new, $releaser)
$this->chan . ' channel, and package is in ' .
$new->channel . ' channel');
}
$categories = new \PEAR2\SimpleChannelServer\Categories($this->channel);
$categories = new \Pyrus\SimpleChannelServer\Categories($this->channel);
$category = new Category($this->rest, $this->channel,
$this->uri, $categories);
$package = new Package($this->rest, $this->channel,
Expand Down
Loading

0 comments on commit a70e5ca

Please sign in to comment.