Skip to content

Commit f221ee6

Browse files
committed
Merge pull request #13 from Potherca/develop
Release v0.3.0
2 parents 6fa45ef + 3b2ccb0 commit f221ee6

19 files changed

+963
-336
lines changed

Diff for: .gitignore

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
build
2-
vendor
1+
/* Directories to ignore */
2+
/build
3+
/vendor
4+
/tests/fixtures/integration-test-repository
35

4-
composer.lock
5-
phpunit.xml
6+
/* Files to ignore */
7+
.env
8+
/composer.lock
9+
/phpunit.xml

Diff for: .travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ install:
1919
script:
2020
- vendor/bin/phpunit --configuration build/phpunit.xml && cat build/testdox.txt build/coverage.txt
2121

22-
after_script:
22+
after_success:
23+
- bash <(curl -s https://codecov.io/bash)
2324
- php vendor/bin/coveralls -v

Diff for: CHANGELOG.md

+32-5
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,57 @@ and [Semantic Versioning](http://semver.org/) conventions.
1313
### Security
1414
-->
1515

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

1818
### Added
19+
20+
- Adds various @throws annotations
21+
- Adds timestamps for files and folders
22+
- Adds integration tests to validate output against comparable output from LocalAdapter
23+
24+
### Changed
25+
26+
- Changes the default for file visibility to visible
27+
- 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
28+
- Changes method name of ApiInterface::getRecursiveMetadata() to ApiInterface::getTreeMetadata()
29+
30+
### Fixed
31+
32+
- Fixes bug that caused invalid repository names to be accepted (issue #4)
33+
- Fixes bug that caused incorrect Metadata for directories to be returned (issue #6)
34+
- Fixes bug that didn't validate paths ended in a trailing slash (issue #8)
35+
- Fixes bug in permission comparison
36+
- Fixes various links in the README file
37+
38+
## [v0.2.0] - 2015-07-21 - Improvements and UnitTests
39+
40+
### Added
41+
1942
- Adds automated checks (a.k.a. unit-tests) for the Adapter, Client and Settings classes.
2043
- Adds various utility files for Travis builds, Coveralls and Composer
2144

2245
### Changed
46+
2347
- Makes the PHPUnit configuration more strict
2448
- Renames the Client class to "Api"
2549

26-
## v0.1.0 - 2015-07-18 - Read functionality
50+
## [v0.1.0] - 2015-07-18 - Read functionality
2751

2852
### Added
53+
2954
- Read functionality and Github API authentication have been implemented.
3055

3156
## v0.0.0 - 2015-05-11 - Project Setup
3257

3358
### Added
59+
3460
- Set up project basics like .gitignore file, PHPUnit Configuration file,
3561
Contributing guidelines, Composer file stating dependencies, MIT License, README
3662
file and this CHANGELOG file.
3763

38-
[unreleased]: https://github.com/potherca/flystystem-github/compare/v0.2.0...HEAD
39-
[0.2.0]: https://github.com/potherca/flystystem-github/compare/v0.1.0...v0.2.0
40-
[0.1.0]: https://github.com/potherca/flystystem-github/compare/v0.0.0...v0.1.0
64+
[unreleased]: https://github.com/potherca/flysystem-github/compare/v0.3.0...HEAD
65+
[v0.3.0]: https://github.com/potherca/flysystem-github/compare/v0.2.0...v0.3.0
66+
[v0.2.0]: https://github.com/potherca/flysystem-github/compare/v0.1.0...v0.2.0
67+
[v0.1.0]: https://github.com/potherca/flysystem-github/compare/v0.0.0...v0.1.0
4168
[keep-a-changelog]: http://keepachangelog.com/
4269
[Semantic Versioning]: http://semver.org/

Diff for: CONTRIBUTING.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ Contributions are **welcome** and will be fully **credited**.
44

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

7-
87
## Pull Requests
98

109
- **[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).
1110

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

14-
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
13+
- **Document any change in behaviour** - Make sure the `README.md`, `CHANGELOG.md` and any other relevant documentation are kept up-to-date.
1514

1615
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
1716

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

2221
- **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.
2322

24-
2523
## Running Tests
2624

2725
``` bash

Diff for: README.md

+43-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Flysystem Adapter for Github
22

3-
[![Latest Version](https://img.shields.io/github/release/potherca/flysystem-github.svg?style=flat-square)](https://github.com/potherca/flysystem-github/releases)
4-
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
5-
[![Build Status](https://img.shields.io/travis/potherca/flysystem-github.svg?style=flat-square)](https://travis-ci.org/potherca/flysystem-github)
6-
[![Coverage Status](https://coveralls.io/repos/potherca/flysystem-github/badge.svg)](https://coveralls.io/github/potherca/flysystem-github)
7-
[![Quality Score](https://img.shields.io/scrutinizer/g/potherca/flysystem-github.svg?style=flat-square)](https://scrutinizer-ci.com/g/potherca/flysystem-github)
8-
[![Total Downloads](https://img.shields.io/packagist/dt/potherca/flysystem-github.svg?style=flat-square)](https://packagist.org/packages/potherca/flysystem-github)
3+
[![Latest Version][Latest Version Badge]][Release Page]
4+
[![Software License][Software License Badge]][License file]
5+
[![Build Status][Build Status Badge]][Travis Page]
6+
[![Coverage Status][Coverage Status Badge]][Coveralls Page]
7+
[![Quality Score][Quality Score Badge]][Scrutinizer Page]
8+
[![Total Downloads][Total Downloads Badge]][Packagist Page]
99

1010
## Install
1111

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

9090
## Testing
9191

92+
The unit-tests can be run with the following command:
93+
9294
``` bash
9395
$ composer test
9496
```
9597

98+
To run integration tests, which use the Github API, a [Github API token] might be needed (to stop the tests hitting the API Limit).
99+
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.
100+
See `tests/integration-tests/.env.example` for an example.
101+
102+
To run the integration test, run the following command (this will also run the unit-tests):
103+
104+
``` bash
105+
$ composer test-all
106+
```
107+
96108
## Security
97109

98110
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
99111

100112
## Contributing
101113

102-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
114+
Please see [CONTRIBUTING] for details.
103115

104116
## Change Log
105117

106-
Please see [CHANGELOG](CHANGELOG.md) for details.
118+
Please see [CHANGELOG] for details.
107119

108120
## Credits
109121

110-
- [Potherca](https://github.com/potherca)
122+
- [Potherca]
123+
- [Contributors]
111124

112125
## License
113126

114-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
127+
The MIT License (MIT). Please see [License File] for more information.
128+
129+
[Release Page]: https://github.com/potherca/flysystem-github/releases
130+
[License File]: LICENSE.md
131+
[Travis Page]: https://travis-ci.org/Potherca/flysystem-github
132+
[Coveralls Page]: https://coveralls.io/github/potherca/flysystem-github
133+
[Scrutinizer Page]: https://scrutinizer-ci.com/g/potherca/flysystem-github
134+
[Packagist Page]: https://packagist.org/packages/potherca/flysystem-github
135+
136+
[Latest Version Badge]: https://img.shields.io/github/release/potherca/flysystem-github.svg
137+
[Software License Badge]: https://img.shields.io/badge/license-MIT-brightgreen.svg
138+
[Build Status Badge]: https://img.shields.io/travis/Potherca/flysystem-github.svg
139+
[Coverage Status Badge]: https://coveralls.io/repos/potherca/flysystem-github/badge.svg
140+
[Quality Score Badge]: https://img.shields.io/scrutinizer/g/potherca/flysystem-github.svg
141+
[Total Downloads Badge]: https://img.shields.io/packagist/dt/potherca/flysystem-github.svg
142+
143+
[Contributors]: https://github.com/Potherca/flysystem-github/graphs/contributors
144+
[CHANGELOG]: CHANGELOG.md
145+
[CONTRIBUTING]: CONTRIBUTING.md
146+
[Potherca]: https://github.com/potherca
147+
[Github API token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/

Diff for: build/phpunit.xml

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,41 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.7/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
55

66
backupGlobals="false"
7+
78
beStrictAboutChangesToGlobalState="true"
89
beStrictAboutOutputDuringTests="true"
9-
beStrictAboutTestSize="true"
10+
beStrictAboutCoversAnnotation="true"
11+
beStrictAboutResourceUsageDuringSmallTests="true"
1012
beStrictAboutTestsThatDoNotTestAnything="true"
1113
beStrictAboutTodoAnnotatedTests="true"
14+
15+
enforceTimeLimit="true"
16+
failOnRisky="true"
17+
1218
bootstrap="../vendor/autoload.php"
1319
checkForUnintentionallyCoveredCode="true"
1420
colors="true"
1521
forceCoversAnnotation="true"
1622
verbose="true"
1723
>
1824
<testsuites>
19-
<testsuite name="Flysystem Github Adapter Test Suite">
20-
<directory>../tests</directory>
25+
<testsuite name="Flysystem Github Adapter - Unit Tests">
26+
<directory>../tests/unit-tests</directory>
27+
</testsuite>
28+
<testsuite name="Flysystem Github Adapter - Integration Tests">
29+
<directory suffix=".php">../tests/integration-tests</directory>
2130
</testsuite>
2231
</testsuites>
32+
2333
<filter>
2434
<whitelist>
2535
<directory suffix=".php">src/</directory>
2636
</whitelist>
2737
</filter>
38+
2839
<logging>
2940
<log type="testdox-text" target="testdox.txt"/>
3041
<log type="tap" target="report.tap"/>

Diff for: composer.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@
2020
}
2121
],
2222
"require": {
23-
"php" : ">=5.5",
23+
"php" : ">=5.4",
2424
"knplabs/github-api": "^1.4",
2525
"league/flysystem": "^1.0"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit" : "^4.7.7",
29-
"satooshi/php-coveralls": "^0.6.1",
30-
"scrutinizer/ocular": "^1.1",
31-
"whatthejeff/nyancat-phpunit-resultprinter": "^1.2"
28+
"php" : ">=5.5",
29+
"josegonzalez/dotenv": "~2.0",
30+
"phpunit/phpunit" : "~4.8",
31+
"satooshi/php-coveralls": "~0.6",
32+
"scrutinizer/ocular": "~1.1",
33+
"whatthejeff/nyancat-phpunit-resultprinter": "~1.2"
3234
},
3335
"autoload": {
3436
"psr-4": {
@@ -46,6 +48,7 @@
4648
}
4749
},
4850
"scripts": {
49-
"test" : "phpunit"
51+
"test" : "phpunit",
52+
"test-all" : "phpunit --configuration build/phpunit.xml"
5053
}
5154
}

Diff for: phpunit.xml.dist

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.7/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
55

66
backupGlobals="false"
7+
strict="true"
78
beStrictAboutChangesToGlobalState="true"
89
beStrictAboutOutputDuringTests="true"
910
beStrictAboutTestSize="true"
11+
beStrictAboutCoversAnnotation="true"
12+
beStrictAboutResourceUsageDuringSmallTests="true"
1013
beStrictAboutTestsThatDoNotTestAnything="true"
1114
beStrictAboutTodoAnnotatedTests="true"
15+
16+
enforceTimeLimit="true"
17+
failOnRisky="true"
18+
1219
bootstrap="vendor/autoload.php"
1320
checkForUnintentionallyCoveredCode="true"
1421
colors="true"
@@ -19,8 +26,8 @@
1926
printerClass="NyanCat\PHPUnit\ResultPrinter"
2027
>
2128
<testsuites>
22-
<testsuite name="Flysystem Github Adapter Test Suite">
23-
<directory>tests</directory>
29+
<testsuite name="Flysystem Github Adapter - Unit Tests">
30+
<directory>tests/unit-tests</directory>
2431
</testsuite>
2532
</testsuites>
2633
<filter>

0 commit comments

Comments
 (0)