Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
245 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/* | ||
* This file is part of the Onion package. | ||
* | ||
* (c) Yo-An Lin <cornelius.howl@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
*/ | ||
namespace Onion\Exception; | ||
use Exception; | ||
|
||
class InvalidConfigException extends Exception | ||
{ | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/* | ||
* This file is part of the Onion package. | ||
* | ||
* (c) Yo-An Lin <cornelius.howl@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
*/ | ||
namespace Onion; | ||
|
||
class Package | ||
{ | ||
|
||
public $name; | ||
public $version; | ||
public $desc; | ||
|
||
/** | ||
* ConfigContainer object | ||
*/ | ||
public $config; | ||
|
||
|
||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/* | ||
* This file is part of the Onion package. | ||
* | ||
* (c) Yo-An Lin <cornelius.howl@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
*/ | ||
namespace Onion; | ||
use PHPUnit_Framework_TestCase; | ||
class PackageConfigReaderTest extends PHPUnit_Framework_TestCase | ||
{ | ||
function test() | ||
{ | ||
$logger = new \CLIFramework\Logger; | ||
ok( $logger ); | ||
|
||
$reader = new PackageConfigReader; | ||
$reader->setLogger( $logger ); | ||
|
||
ob_start(); | ||
$reader->info( 'msg' ); | ||
$reader->error( 'msg' ); | ||
$reader->info2( 'msg' ); | ||
ob_end_clean(); | ||
|
||
ok( $reader ); | ||
|
||
ob_start(); | ||
$pkg = $reader->read( 'tests/data/package.ini' ); | ||
ob_end_clean(); | ||
|
||
ok( $pkg ); | ||
|
||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[package] | ||
name = Onion | ||
summary = A Simple PHP Packager Builder. | ||
desc = "Onion, The fast approch to make packages for PHP. Onion is | ||
able to generate a PEAR-compatible package.xml file from a very simple config file." | ||
version = 0.0.8 | ||
stability = alpha | ||
|
||
; homepage = http://php-onion.org ; optional | ||
; license = PHP ; optional, default to PHP | ||
; version.api = 0.0.1 ; optional, defualt to "version" | ||
; author = Yo-An Lin <cornelius.howl@gmail.com> # also works | ||
author = Yo-An Lin <cornelius.howl@gmail.com> | ||
authors[] = Yo-An Lin <cornelius.howl@gmail.com> | ||
channel = pear.corneltek.com | ||
|
||
[require] | ||
php = 5.3 | ||
pearinstaller = 1.4.1 | ||
|
||
; packages | ||
pear.corneltek.com/GetOptionKit = 0.0.2 | ||
pear.corneltek.com/CLIFramework = 0.0.2 | ||
pear.corneltek.com/Universal = 0.0.2 | ||
|
||
Test = resource | ||
|
||
|
||
; extensions | ||
; extension/reflection = 0 | ||
; extension/ctype = 0 | ||
extension/pcre = 0 | ||
|
||
[resource UrlLibrary] | ||
type = library | ||
url = http://foo.com/path/to/lib.tgz | ||
library = src | ||
autoload = PSR-0 | ||
|
||
[resource CLIFramework] | ||
type = pear | ||
git = http://github.com/c9s/CLIFramework.git | ||
|
||
[roles] | ||
onion.phar = script | ||
changes.* = doc | ||
*.md = doc | ||
|
||
[repository] | ||
git = git://github.com/c9s/Onion.git |