-
Notifications
You must be signed in to change notification settings - Fork 9
Issue31 fixing tests #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Adding support to different directory structure on PEAR package
--------------------------------------------------------------- Added structure key support to PEAR package generator. It accepts a comma separated list as value or a simple value. This change make package generation more flexible and not dependent on a fixed structure.
- Loading branch information
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| .onion | ||
| vendor | ||
| tests/tmp | ||
| .idea/ | ||
This file contains hidden or 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 hidden or 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 hidden or 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,34 @@ | ||
| <?php | ||
|
|
||
| namespace tests\Onion\Package; | ||
|
|
||
| class PackageTest extends \PHPUnit_Framework_TestCase | ||
| { | ||
| public function testShouldUseIniFileConfiguredDirectoryStructure() | ||
| { | ||
| $logger = new \CLIFramework\Logger(); | ||
| $logger->quiet(); | ||
| $config = new \Onion\PackageConfigReader(); | ||
| $config->setLogger($logger); | ||
|
|
||
| $package = $config->read(__DIR__ . '/fixtures/stub.ini'); | ||
|
|
||
| $fileStructure = $package->getDefaultStructureConfig(); | ||
|
|
||
| $this->assertEquals(array('lib'), $fileStructure['php']); | ||
| } | ||
|
|
||
| public function testShouldUseDefaultDirectoryStructure() | ||
| { | ||
| $logger = new \CLIFramework\Logger(); | ||
| $logger->quiet(); | ||
| $config = new \Onion\PackageConfigReader(); | ||
| $config->setLogger($logger); | ||
|
|
||
| $package = $config->read(__DIR__ . '/fixtures/stub_with_no_structure.ini'); | ||
|
|
||
| $fileStructure = $package->getDefaultStructureConfig(); | ||
|
|
||
| $this->assertEquals(array('src'), $fileStructure['php']); | ||
| } | ||
| } |
This file contains hidden or 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,72 @@ | ||
| [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 <[email protected]> # also works | ||
| author = Yo-An Lin <[email protected]> | ||
| authors[] = Yo-An Lin <[email protected]> | ||
| 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 | ||
| pear.symfony-project.com/YAML = 0.0.0 | ||
| ; pear.phpunit.de/PHPUnit = 0.0.0 | ||
|
|
||
| ; extensions | ||
| ; extension/reflection = 0 | ||
| ; extension/ctype = 0 | ||
| extension/pcre = 0 | ||
|
|
||
|
|
||
| [require CLIFramework] | ||
| git = http://github.com/c9s/CLIFramework | ||
| type = pear | ||
|
|
||
| [require Asset] | ||
| git = https://github.com/kriswallsmith/assetic.git | ||
| ; autoload = ( | ||
| ; Assetic: src | ||
| ; ) | ||
|
|
||
| [require Smarty] | ||
| url = http://www.smarty.net/files/Smarty-3.1.8.tar.gz | ||
| bootstrap = path/to/init.php | ||
|
|
||
| [resource phpan] | ||
| type = pub | ||
| host = pubphp.org | ||
|
|
||
| [resource openpear] | ||
| type = pear | ||
| host = openpear.org | ||
|
|
||
| [resource corneltek] | ||
| type = pear | ||
| host = pear.corneltek.com | ||
|
|
||
| [roles] | ||
| onion.phar = script | ||
| changes.* = doc | ||
| *.md = doc | ||
|
|
||
| [repository] | ||
| git = git://github.com/c9s/Onion.git | ||
|
|
||
| [structure] | ||
| doc = doc, docs, examples | ||
| test = tests | ||
| php = lib | ||
| data = data |
This file contains hidden or 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,66 @@ | ||
| [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 <[email protected]> # also works | ||
| author = Yo-An Lin <[email protected]> | ||
| authors[] = Yo-An Lin <[email protected]> | ||
| 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 | ||
| pear.symfony-project.com/YAML = 0.0.0 | ||
| ; pear.phpunit.de/PHPUnit = 0.0.0 | ||
|
|
||
| ; extensions | ||
| ; extension/reflection = 0 | ||
| ; extension/ctype = 0 | ||
| extension/pcre = 0 | ||
|
|
||
|
|
||
| [require CLIFramework] | ||
| git = http://github.com/c9s/CLIFramework | ||
| type = pear | ||
|
|
||
| [require Asset] | ||
| git = https://github.com/kriswallsmith/assetic.git | ||
| ; autoload = ( | ||
| ; Assetic: src | ||
| ; ) | ||
|
|
||
| [require Smarty] | ||
| url = http://www.smarty.net/files/Smarty-3.1.8.tar.gz | ||
| bootstrap = path/to/init.php | ||
|
|
||
| [resource phpan] | ||
| type = pub | ||
| host = pubphp.org | ||
|
|
||
| [resource openpear] | ||
| type = pear | ||
| host = openpear.org | ||
|
|
||
| [resource corneltek] | ||
| type = pear | ||
| host = pear.corneltek.com | ||
|
|
||
| [roles] | ||
| onion.phar = script | ||
| changes.* = doc | ||
| *.md = doc | ||
|
|
||
| [repository] | ||
| git = git://github.com/c9s/Onion.git |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can write your idea in doc/plans (and expand it as a plan later) ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a folder of project configuration created by PhpStorm so the next developer do not need to have it :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool~ thanks ;-)
2012/9/17 Nelson Senna do Amaral [email protected]
Best Regards,
Yo-An Lin