Skip to content

Commit

Permalink
Merge pull request #13 from Potherca/develop
Browse files Browse the repository at this point in the history
Release v0.3.0
  • Loading branch information
Potherca committed Apr 20, 2016
2 parents 6fa45ef + 3b2ccb0 commit f221ee6
Show file tree
Hide file tree
Showing 19 changed files with 963 additions and 336 deletions.
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
build
vendor
/* Directories to ignore */
/build
/vendor
/tests/fixtures/integration-test-repository

composer.lock
phpunit.xml
/* Files to ignore */
.env
/composer.lock
/phpunit.xml
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ install:
script:
- vendor/bin/phpunit --configuration build/phpunit.xml && cat build/testdox.txt build/coverage.txt

after_script:
after_success:
- bash <(curl -s https://codecov.io/bash)
- php vendor/bin/coveralls -v
37 changes: 32 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,57 @@ and [Semantic Versioning](http://semver.org/) conventions.
### Security
-->

## v0.2.0 - 2015-07-21 - Improvements and UnitTests
## [v0.3.0] - 2016-04-20 - Metadata for directories and various other bugfixes

### Added

- Adds various @throws annotations
- Adds timestamps for files and folders
- Adds integration tests to validate output against comparable output from LocalAdapter

### Changed

- Changes the default for file visibility to visible
- Changes guessing MIME type for files to always use the file's content instead of extension to guarantee results are the same across different filesystem adapters
- Changes method name of ApiInterface::getRecursiveMetadata() to ApiInterface::getTreeMetadata()

### Fixed

- Fixes bug that caused invalid repository names to be accepted (issue #4)
- Fixes bug that caused incorrect Metadata for directories to be returned (issue #6)
- Fixes bug that didn't validate paths ended in a trailing slash (issue #8)
- Fixes bug in permission comparison
- Fixes various links in the README file

## [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
## [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

### Added

- 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.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
[unreleased]: https://github.com/potherca/flysystem-github/compare/v0.3.0...HEAD
[v0.3.0]: https://github.com/potherca/flysystem-github/compare/v0.2.0...v0.3.0
[v0.2.0]: https://github.com/potherca/flysystem-github/compare/v0.1.0...v0.2.0
[v0.1.0]: https://github.com/potherca/flysystem-github/compare/v0.0.0...v0.1.0
[keep-a-changelog]: http://keepachangelog.com/
[Semantic Versioning]: http://semver.org/
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/potherca/flysystem-github).


## 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).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
- **Document any change in behaviour** - Make sure the `README.md`, `CHANGELOG.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/). Randomly breaking public APIs is not an option.

Expand All @@ -21,7 +20,6 @@ We accept contributions via Pull Requests on [Github](https://github.com/potherc

- **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

``` bash
Expand Down
53 changes: 43 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Flysystem Adapter for Github

[![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.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)
[![Latest Version][Latest Version Badge]][Release Page]
[![Software License][Software License Badge]][License file]
[![Build Status][Build Status Badge]][Travis Page]
[![Coverage Status][Coverage Status Badge]][Coveralls Page]
[![Quality Score][Quality Score Badge]][Scrutinizer Page]
[![Total Downloads][Total Downloads Badge]][Packagist Page]

## Install

Expand Down Expand Up @@ -89,26 +89,59 @@ $filesystem = new Filesystem($adapter);

## Testing

The unit-tests can be run with the following command:

``` bash
$ composer test
```

To run integration tests, which use the Github API, a [Github API token] might be needed (to stop the tests hitting the API Limit).
An API key can be added by setting it in the environment as `GITHUB_API_KEY` or by creating an `.env` file in the integration tests directory and setting it there.
See `tests/integration-tests/.env.example` for an example.

To run the integration test, run the following command (this will also run the unit-tests):

``` bash
$ composer test-all
```

## 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.
Please see [CONTRIBUTING] for details.

## Change Log

Please see [CHANGELOG](CHANGELOG.md) for details.
Please see [CHANGELOG] for details.

## Credits

- [Potherca](https://github.com/potherca)
- [Potherca]
- [Contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
The MIT License (MIT). Please see [License File] for more information.

[Release Page]: https://github.com/potherca/flysystem-github/releases
[License File]: LICENSE.md
[Travis Page]: https://travis-ci.org/Potherca/flysystem-github
[Coveralls Page]: https://coveralls.io/github/potherca/flysystem-github
[Scrutinizer Page]: https://scrutinizer-ci.com/g/potherca/flysystem-github
[Packagist Page]: https://packagist.org/packages/potherca/flysystem-github

[Latest Version Badge]: https://img.shields.io/github/release/potherca/flysystem-github.svg
[Software License Badge]: https://img.shields.io/badge/license-MIT-brightgreen.svg
[Build Status Badge]: https://img.shields.io/travis/Potherca/flysystem-github.svg
[Coverage Status Badge]: https://coveralls.io/repos/potherca/flysystem-github/badge.svg
[Quality Score Badge]: https://img.shields.io/scrutinizer/g/potherca/flysystem-github.svg
[Total Downloads Badge]: https://img.shields.io/packagist/dt/potherca/flysystem-github.svg

[Contributors]: https://github.com/Potherca/flysystem-github/graphs/contributors
[CHANGELOG]: CHANGELOG.md
[CONTRIBUTING]: CONTRIBUTING.md
[Potherca]: https://github.com/potherca
[Github API token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
19 changes: 15 additions & 4 deletions build/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
<?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"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"

backupGlobals="false"

beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutResourceUsageDuringSmallTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"

enforceTimeLimit="true"
failOnRisky="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 name="Flysystem Github Adapter - Unit Tests">
<directory>../tests/unit-tests</directory>
</testsuite>
<testsuite name="Flysystem Github Adapter - Integration Tests">
<directory suffix=".php">../tests/integration-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"/>
Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@
}
],
"require": {
"php" : ">=5.5",
"php" : ">=5.4",
"knplabs/github-api": "^1.4",
"league/flysystem": "^1.0"
},
"require-dev": {
"phpunit/phpunit" : "^4.7.7",
"satooshi/php-coveralls": "^0.6.1",
"scrutinizer/ocular": "^1.1",
"whatthejeff/nyancat-phpunit-resultprinter": "^1.2"
"php" : ">=5.5",
"josegonzalez/dotenv": "~2.0",
"phpunit/phpunit" : "~4.8",
"satooshi/php-coveralls": "~0.6",
"scrutinizer/ocular": "~1.1",
"whatthejeff/nyancat-phpunit-resultprinter": "~1.2"
},
"autoload": {
"psr-4": {
Expand All @@ -46,6 +48,7 @@
}
},
"scripts": {
"test" : "phpunit"
"test" : "phpunit",
"test-all" : "phpunit --configuration build/phpunit.xml"
}
}
13 changes: 10 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<?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"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"

backupGlobals="false"
strict="true"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutResourceUsageDuringSmallTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"

enforceTimeLimit="true"
failOnRisky="true"

bootstrap="vendor/autoload.php"
checkForUnintentionallyCoveredCode="true"
colors="true"
Expand All @@ -19,8 +26,8 @@
printerClass="NyanCat\PHPUnit\ResultPrinter"
>
<testsuites>
<testsuite name="Flysystem Github Adapter Test Suite">
<directory>tests</directory>
<testsuite name="Flysystem Github Adapter - Unit Tests">
<directory>tests/unit-tests</directory>
</testsuite>
</testsuites>
<filter>
Expand Down
Loading

0 comments on commit f221ee6

Please sign in to comment.