-
Notifications
You must be signed in to change notification settings - Fork 6
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
17 changed files
with
1,849 additions
and
457 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,9 @@ | ||
* text=auto | ||
|
||
/tests export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/CHANGELOG.md export-ignore | ||
/README.md 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 |
---|---|---|
|
@@ -2,4 +2,4 @@ build | |
vendor | ||
|
||
composer.lock | ||
phpunit.xml | ||
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,23 @@ | ||
language: php | ||
|
||
php: | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- hhvm | ||
|
||
sudo: false | ||
|
||
matrix: | ||
allow_failures: | ||
- php: 7.0 | ||
- php: hhvm | ||
|
||
install: | ||
- composer install | ||
|
||
script: | ||
- vendor/bin/phpunit --configuration build/phpunit.xml && cat build/testdox.txt build/coverage.txt | ||
|
||
after_script: | ||
- php vendor/bin/coveralls -v |
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 |
---|---|---|
@@ -1,16 +1,42 @@ | ||
# Change Log | ||
All notable changes to the `flysystem-github` project will be documented in this | ||
file. This project adheres to [Semantic Versioning](http://semver.org/). | ||
file. This project adheres to the [keep-a-changelog](http://keepachangelog.com/) | ||
and [Semantic Versioning](http://semver.org/) conventions. | ||
|
||
## 0.1.0 - 2015-07-18 - Read functionality | ||
<!-- | ||
## [Unreleased][unreleased] | ||
### Added | ||
Read functionality and Github API authentication have been implemented. | ||
### Changed | ||
### Deprecated | ||
### Removed | ||
### Fixed | ||
### Security | ||
--> | ||
|
||
## v0.2.0 - 2015-07-21 - Improvements and UnitTests | ||
|
||
### Added | ||
- Adds automated checks (a.k.a. unit-tests) for the Adapter, Client and Settings classes. | ||
- Adds various utility files for Travis builds, Coveralls and Composer | ||
|
||
### Changed | ||
- Makes the PHPUnit configuration more strict | ||
- Renames the Client class to "Api" | ||
|
||
## v0.1.0 - 2015-07-18 - Read functionality | ||
|
||
### Added | ||
- Read functionality and Github API authentication have been implemented. | ||
|
||
## v0.0.0 - 2015-05-11 - Project Setup | ||
|
||
## 0.0.0 - 2015-05-11 - Project Setup | ||
### Added | ||
Set up project basics like .gitignore file, PHPUnit Configuration file, | ||
- Set up project basics like .gitignore file, PHPUnit Configuration file, | ||
Contributing guidelines, Composer file stating dependencies, MIT License, README | ||
file and this CHANGELOG file. | ||
|
||
[unreleased]: https://github.com/potherca/flystystem-github/compare/v0.1.0...HEAD | ||
[unreleased]: https://github.com/potherca/flystystem-github/compare/v0.2.0...HEAD | ||
[0.2.0]: https://github.com/potherca/flystystem-github/compare/v0.1.0...v0.2.0 | ||
[0.1.0]: https://github.com/potherca/flystystem-github/compare/v0.0.0...v0.1.0 | ||
[keep-a-changelog]: http://keepachangelog.com/ | ||
[Semantic Versioning]: http://semver.org/ |
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 |
---|---|---|
|
@@ -2,12 +2,11 @@ | |
|
||
[![Latest Version](https://img.shields.io/github/release/potherca/flysystem-github.svg?style=flat-square)](https://github.com/potherca/flysystem-github/releases) | ||
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) | ||
[![Build Status](https://img.shields.io/travis/potherca/flysystem-github/master.svg?style=flat-square)](https://travis-ci.org/potherca/flysystem-github) | ||
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/potherca/flysystem-github.svg?style=flat-square)](https://scrutinizer-ci.com/g/potherca/flysystem-github/code-structure) | ||
[![Build Status](https://img.shields.io/travis/potherca/flysystem-github.svg?style=flat-square)](https://travis-ci.org/potherca/flysystem-github) | ||
[![Coverage Status](https://coveralls.io/repos/potherca/flysystem-github/badge.svg)](https://coveralls.io/github/potherca/flysystem-github) | ||
[![Quality Score](https://img.shields.io/scrutinizer/g/potherca/flysystem-github.svg?style=flat-square)](https://scrutinizer-ci.com/g/potherca/flysystem-github) | ||
[![Total Downloads](https://img.shields.io/packagist/dt/potherca/flysystem-github.svg?style=flat-square)](https://packagist.org/packages/potherca/flysystem-github) | ||
|
||
|
||
## Install | ||
|
||
Via Composer | ||
|
@@ -28,27 +27,27 @@ limit. | |
### Basic Usage | ||
|
||
```php | ||
use Github\Client as GithubClient; | ||
use Github\Client; | ||
use League\Flysystem\Filesystem; | ||
use Potherca\Flysystem\Github\Client; | ||
use Potherca\Flysystem\Github\Api; | ||
use Potherca\Flysystem\Github\GithubAdapter; | ||
use Potherca\Flysystem\Github\Settings; | ||
|
||
$project = 'thephpleague/flysystem'; | ||
|
||
$settings = new Settings($project); | ||
|
||
$client = new Client(new GithubClient(), $settings); | ||
$adapter = new GithubAdapter($client); | ||
$api = new Api(new Client(), $settings); | ||
$adapter = new GithubAdapter($api); | ||
$filesystem = new Filesystem($adapter); | ||
``` | ||
|
||
### Authentication | ||
|
||
```php | ||
use Github\Client as GithubClient; | ||
use Github\Client; | ||
use League\Flysystem\Filesystem; | ||
use Potherca\Flysystem\Github\Client; | ||
use Potherca\Flysystem\Github\Api; | ||
use Potherca\Flysystem\Github\GithubAdapter; | ||
use Potherca\Flysystem\Github\Settings; | ||
|
||
|
@@ -58,19 +57,19 @@ $credentials = [Settings::AUTHENTICATE_USING_TOKEN, '83347e315b8bb4790a48ed6953a | |
|
||
$settings = new Settings($project, $credentials); | ||
|
||
$client = new Client(new GithubClient(), $settings); | ||
$adapter = new GithubAdapter($client); | ||
$api = new Api(new Client(), $settings); | ||
$adapter = new GithubAdapter($api); | ||
$filesystem = new Filesystem($adapter); | ||
``` | ||
|
||
### Cache Usage | ||
|
||
```php | ||
use Github\Client as GithubClient; | ||
use Github\Client; | ||
use Github\HttpClient\CachedHttpClient as CachedClient; | ||
use Github\HttpClient\Cache\FilesystemCache as Cache; | ||
use League\Flysystem\Filesystem; | ||
use Potherca\Flysystem\Github\Client; | ||
use Potherca\Flysystem\Github\Api; | ||
use Potherca\Flysystem\Github\GithubAdapter; | ||
use Potherca\Flysystem\Github\Settings; | ||
|
||
|
@@ -82,8 +81,8 @@ $cache = new Cache('/tmp/github-api-cache') | |
$cacheClient = new CachedClient(); | ||
$cacheClient->setCache($cache); | ||
|
||
$client = new Client($cacheClient, $settings); | ||
$adapter = new GithubAdapter($client); | ||
$api = new Api($cacheClient, $settings); | ||
$adapter = new GithubAdapter($api); | ||
$filesystem = new Filesystem($adapter); | ||
|
||
``` | ||
|
@@ -94,13 +93,17 @@ $filesystem = new Filesystem($adapter); | |
$ composer test | ||
``` | ||
|
||
## Security | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
|
||
## Contributing | ||
|
||
Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | ||
|
||
## Security | ||
## Change Log | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
Please see [CHANGELOG](CHANGELOG.md) for details. | ||
|
||
## Credits | ||
|
||
|
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,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.7/phpunit.xsd" | ||
|
||
backupGlobals="false" | ||
beStrictAboutChangesToGlobalState="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTestSize="true" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
bootstrap="../vendor/autoload.php" | ||
checkForUnintentionallyCoveredCode="true" | ||
colors="true" | ||
forceCoversAnnotation="true" | ||
verbose="true" | ||
> | ||
<testsuites> | ||
<testsuite name="Flysystem Github Adapter Test Suite"> | ||
<directory>../tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src/</directory> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log type="testdox-text" target="testdox.txt"/> | ||
<log type="tap" target="report.tap"/> | ||
<log type="junit" target="report.junit.xml"/> | ||
<log type="coverage-clover" showUncoveredFiles="true" target="logs/clover.xml"/> | ||
<log type="coverage-text" showUncoveredFiles="true" target="coverage.txt"/> | ||
</logging> | ||
</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
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
Oops, something went wrong.