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
0 parents
commit e5d033a
Showing
14 changed files
with
282 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage_clover: clover.xml | ||
json_path: coveralls-upload.json | ||
src_dir: src |
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,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,9 @@ | ||
* text eol=lf | ||
|
||
/tests export-ignore | ||
/vendor export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.scrutinizer.yml export-ignore | ||
.travis.yml export-ignore | ||
phpunit.xml.dist export-ignore |
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,3 @@ | ||
vendor/ | ||
composer.lock | ||
phpunit.xml |
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,25 @@ | ||
filter: | ||
paths: | ||
- src/* | ||
before_commands: | ||
- 'composer install --dev --prefer-source' | ||
checks: | ||
php: | ||
code_rating: true | ||
duplication: false | ||
tools: | ||
external_code_coverage: true | ||
php_mess_detector: true | ||
php_code_sniffer: true | ||
sensiolabs_security_checker: true | ||
php_pdepend: true | ||
php_loc: | ||
enabled: true | ||
excluded_dirs: | ||
- tests | ||
- vendor | ||
php_cpd: | ||
enabled: true | ||
excluded_dirs: | ||
- tests | ||
- vendor |
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,36 @@ | ||
sudo: false | ||
|
||
language: php | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 5.5 | ||
env: | ||
- EXECUTE_CS_CHECK=true | ||
- php: 5.6 | ||
env: | ||
- EXECUTE_COVERAGE=true | ||
- php: 7 | ||
- php: hhvm | ||
|
||
before_install: | ||
- if [[ $EXECUTE_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
- composer self-update | ||
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then composer require --no-update satooshi/php-coveralls:dev-master ; fi | ||
|
||
install: | ||
- travis_retry composer install --no-interaction --ignore-platform-reqs | ||
|
||
script: | ||
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover coverage.clover ; fi | ||
- if [[ $EXECUTE_COVERAGE != 'true' ]]; then ./vendor/bin/phpunit ; fi | ||
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs --standard=PSR2 src tests ; fi | ||
|
||
after_script: | ||
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar ; fi | ||
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover ; fi |
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,3 @@ | ||
## 0.1.0 - unreleased | ||
|
||
- Initial release |
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,28 @@ | ||
# Contributing | ||
|
||
Contributions are **welcome** and will be fully **credited**. | ||
|
||
We accept contributions via Pull Requests on [Github](https://github.com/woohoolabs/yang). | ||
|
||
## Pull Requests | ||
|
||
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). | ||
|
||
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. | ||
|
||
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). | ||
|
||
- **Create feature branches** - Don't ask us to pull from your master branch. | ||
|
||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. | ||
|
||
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. | ||
|
||
## Running Tests | ||
|
||
Woohoo Labs. Yang has a PHPUnit test suite. To run the tests, run the following command from the project folder | ||
after you have copied phpunit.xml.dist to phpunit.xml: | ||
|
||
``` bash | ||
$ phpunit | ||
``` |
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,21 @@ | ||
# The MIT License (MIT) | ||
|
||
#### Copyright (c) 2015 Máté Kocsis <kocsismate@woohoolabs.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,78 @@ | ||
# Woohoo Labs. Yang | ||
|
||
[![Latest Version on Packagist][ico-version]][link-packagist] | ||
[![Software License][ico-license]](LICENSE.md) | ||
[![Build Status][ico-travis]][link-travis] | ||
[![Coverage Status][ico-scrutinizer]][link-scrutinizer] | ||
[![Quality Score][ico-code-quality]][link-code-quality] | ||
[![Total Downloads][ico-downloads]][link-downloads] | ||
|
||
**Woohoo Labs. Yang is a PHP framework which helps you to communicate with JSON API servers.** | ||
|
||
## Introduction | ||
|
||
[JSON API](http://jsonapi.org) specification | ||
[reached 1.0 on 29th May 2015](http://www.programmableweb.com/news/new-json-api-specification-aims-to-speed-api-development/2015/06/10) | ||
and we also believe it is a big day for RESTful API-s as this specification makes APIs more robust and future-proof | ||
than they have ever been. Woohoo Labs. Yang (named after Yin-Yang) was born to bring efficiency and elegance for your | ||
JSON API client implementations. | ||
|
||
## Install | ||
|
||
You need [Composer](https://getcomposer.org) to install this library. Run the command below and you will get the latest | ||
version: | ||
|
||
```bash | ||
$ composer require woohoolabs/yang | ||
``` | ||
|
||
## Basic Usage | ||
|
||
## Advanced usage | ||
|
||
## Examples | ||
|
||
## Versioning | ||
|
||
This library follows [SemVer v2.0.0](http://semver.org/). | ||
|
||
## Change log | ||
|
||
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. | ||
|
||
## Testing | ||
|
||
Woohoo Labs. Yang has a PHPUnit test suite. To run the tests, run the following command from the project folder | ||
after you have copied phpunit.xml.dist to phpunit.xml: | ||
|
||
``` bash | ||
$ phpunit | ||
``` | ||
|
||
## Contributing | ||
|
||
Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | ||
|
||
## Credits | ||
|
||
- [Máté Kocsis][link-author] | ||
- [All Contributors][link-contributors] | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see the [License File](LICENSE.md) for more information. | ||
|
||
[ico-version]: https://img.shields.io/packagist/v/woohoolabs/yang.svg | ||
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg | ||
[ico-travis]: https://img.shields.io/travis/woohoolabs/yang/master.svg | ||
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/woohoolabs/yang.svg | ||
[ico-code-quality]: https://img.shields.io/scrutinizer/g/woohoolabs/yang.svg | ||
[ico-downloads]: https://img.shields.io/packagist/dt/woohoolabs/yang.svg | ||
|
||
[link-packagist]: https://packagist.org/packages/woohoolabs/yang | ||
[link-travis]: https://travis-ci.org/woohoolabs/yang | ||
[link-scrutinizer]: https://scrutinizer-ci.com/g/woohoolabs/yang/code-structure | ||
[link-code-quality]: https://scrutinizer-ci.com/g/woohoolabs/yang | ||
[link-downloads]: https://packagist.org/packages/woohoolabs/yang | ||
[link-author]: https://github.com/kocsismate | ||
[link-contributors]: ../../contributors |
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,36 @@ | ||
{ | ||
"name": "woohoolabs/yang", | ||
"description": "Woohoo Labs. Yang", | ||
"type": "library", | ||
"keywords": ["Woohoo Labs.", "Yang", "HATEOAS", "JSON API", "PSR-7"], | ||
"homepage": "http://yang.woohoolabs.com", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name":"Máté Kocsis", | ||
"email":"kocsismate@woohoolabs.com" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/woohoolabs/yang/issues", | ||
"source": "https://github.com/woohoolabs/yang" | ||
}, | ||
"require": { | ||
"php":">=5.5.0", | ||
"guzzlehttp/guzzle": "^6.0.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/PHPUnit": "^4.4.0", | ||
"squizlabs/php_codesniffer": "^2.3.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"WoohooLabs\\Yang\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"WoohooLabsTest\\Yang\\": "tests/" | ||
} | ||
} | ||
} |
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,12 @@ | ||
<phpunit bootstrap="./vendor/autoload.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="WoohooLabs\\Yang Tests"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
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,6 @@ | ||
<?php | ||
namespace WoohooLabs\Yang\JsonApi; | ||
|
||
class JsonApiClient | ||
{ | ||
} |
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,10 @@ | ||
<?php | ||
namespace WoohooLabsTest\Yang\JsonApi; | ||
|
||
class JsonApiClientTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function test() | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
} |