Skip to content

Commit

Permalink
Merge release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Potherca committed Jul 21, 2015
2 parents 443e03a + 9f77b42 commit 6fa45ef
Show file tree
Hide file tree
Showing 17 changed files with 1,849 additions and 457 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ build
vendor

composer.lock
phpunit.xml
phpunit.xml
23 changes: 23 additions & 0 deletions .travis.yml
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
38 changes: 32 additions & 6 deletions CHANGELOG.md
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/
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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);

```
Expand All @@ -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

Expand Down
35 changes: 35 additions & 0 deletions build/phpunit.xml
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>
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
}
],
"require": {
"php" : ">=5.3.0",
"php" : ">=5.5",
"knplabs/github-api": "^1.4",
"league/flysystem": "^1.0"
},
"require-dev": {
"phpunit/phpunit" : "4.*",
"scrutinizer/ocular": "~1.1"
"phpunit/phpunit" : "^4.7.7",
"satooshi/php-coveralls": "^0.6.1",
"scrutinizer/ocular": "^1.1",
"whatthejeff/nyancat-phpunit-resultprinter": "^1.2"
},
"autoload": {
"psr-4": {
Expand All @@ -40,7 +42,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "0.2.0-dev"
}
},
"scripts": {
Expand Down
40 changes: 24 additions & 16 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<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"

printerFile="vendor/whatthejeff/nyancat-phpunit-resultprinter/src/NyanCat/PHPUnit/ResultPrinter.php"
printerClass="NyanCat\PHPUnit\ResultPrinter"
>
<testsuites>
<testsuite name="Potherca Test Suite">
<testsuite name="Flysystem Github Adapter Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand All @@ -20,10 +29,9 @@
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="testdox-text" target="php://stdout"/>
<log type="coverage-clover" showUncoveredFiles="true" target="build/logs/clover.xml"/>
<log type="coverage-text" showUncoveredFiles="true" target="php://stdout"/>
<log type="coverage-html" showUncoveredFiles="true" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
</logging>
</phpunit>
Loading

0 comments on commit 6fa45ef

Please sign in to comment.