diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9ae4198 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +export AWS_ACCESS_KEY_ID := foo +export AWS_SECRET_ACCESS_KEY := bar +export AWS_CSM_ENABLED := false +export AWS_REGION := current +export AWS_BUCKET := default + +tests: + bin/phpunit + bin/phpspec run diff --git a/Readme.md b/Readme.md index e3143be..c398b97 100644 --- a/Readme.md +++ b/Readme.md @@ -187,5 +187,5 @@ __*Note:*__ Use stream functions for big files. * Fork the repo. * Fix an issue or add a new adapter or improve something or whatever you want. * Follow the PSR-2 style. -* Run the tests. (add more tests if is needed). +* Run `make tests`. (add more tests if is needed). * Make a pull request. diff --git a/composer.json b/composer.json index 0b9ff86..6ace707 100644 --- a/composer.json +++ b/composer.json @@ -4,14 +4,14 @@ "type": "lib", "require": { "psr/log": "^1.0", - "ralouphie/mimey": "^1.0" + "ralouphie/mimey": "^1.0", + "aws/aws-sdk-php": "3.19.3" }, "require-dev": { "phpspec/phpspec": "^2.5", "phpunit/phpunit": "4.8.*", "squizlabs/php_codesniffer": "2.*", - "henrikbjorn/phpspec-code-coverage": "2.*", - "aws/aws-sdk-php": "^3.0.0" + "henrikbjorn/phpspec-code-coverage": "2.*" }, "license": "MIT", "config": { diff --git a/composer.lock b/composer.lock index 919e868..8b4e1ba 100644 --- a/composer.lock +++ b/composer.lock @@ -1,91 +1,11 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ddab848aebc629a0bb0ec54fc06a4bf5", + "content-hash": "27f101abac5e389e5dcc261744791e7c", "packages": [ - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21T11:40:51+00:00" - }, - { - "name": "ralouphie/mimey", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/mimey.git", - "reference": "d69688d4856daa13a9124c819d148ccc2235dea2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/mimey/zipball/d69688d4856daa13a9124c819d148ccc2235dea2", - "reference": "d69688d4856daa13a9124c819d148ccc2235dea2", - "shasum": "" - }, - "require": { - "php": "^5.3|^7.0" - }, - "require-dev": { - "phpunit/phpunit": "~3.7.0", - "satooshi/php-coveralls": ">=1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Mimey\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "PHP package for converting file extensions to MIME types and vice versa.", - "time": "2017-01-27T20:57:22+00:00" - } - ], - "packages-dev": [ { "name": "aws/aws-sdk-php", "version": "3.19.3", @@ -166,72 +86,18 @@ ], "time": "2016-08-30T17:56:50+00:00" }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14T21:17:01+00:00" - }, { "name": "guzzlehttp/guzzle", - "version": "6.2.1", + "version": "6.2.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" + "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60", + "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60", "shasum": "" }, "require": { @@ -280,32 +146,32 @@ "rest", "web service" ], - "time": "2016-07-15T17:22:37+00:00" + "time": "2016-10-08T15:01:37+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.2.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", "shasum": "" }, "require": { "php": ">=5.5.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -331,7 +197,7 @@ "keywords": [ "promise" ], - "time": "2016-05-18T16:56:05+00:00" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", @@ -392,84 +258,224 @@ "time": "2016-06-24T23:00:38+00:00" }, { - "name": "henrikbjorn/phpspec-code-coverage", - "version": "2.1.0", + "name": "mtdowling/jmespath.php", + "version": "2.4.0", "source": { "type": "git", - "url": "https://github.com/henrikbjorn/PhpSpecCodeCoverageExtension.git", - "reference": "528a0c69a524f8acba5f66bc59ae8dc9bc409045" + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/henrikbjorn/PhpSpecCodeCoverageExtension/zipball/528a0c69a524f8acba5f66bc59ae8dc9bc409045", - "reference": "528a0c69a524f8acba5f66bc59ae8dc9bc409045", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac", "shasum": "" }, "require": { - "php": "^5.3.3|^5.4|^5.5|^5.6|^7.0", - "phpspec/phpspec": "^2.0", - "phpunit/php-code-coverage": "^2.2.4|^3" + "php": ">=5.4.0" }, "require-dev": { - "bossa/phpspec2-expect": "^1.0" + "phpunit/phpunit": "~4.0" }, - "suggest": { - "ext-xdebug": "To allow coverage generation when not using a recent version of phpdbg" + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2016-12-03T22:08:25+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "PhpSpec\\Extension\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Integrates CodeCoverage with PhpSpec", - "time": "2016-05-05T18:25:12+00:00" + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" }, { - "name": "mtdowling/jmespath.php", - "version": "2.3.0", + "name": "psr/log", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "192f93e43c2c97acde7694993ab171b3de284093" + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/192f93e43c2c97acde7694993ab171b3de284093", - "reference": "192f93e43c2c97acde7694993ab171b3de284093", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21T11:40:51+00:00" + }, + { + "name": "ralouphie/mimey", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/mimey.git", + "reference": "d69688d4856daa13a9124c819d148ccc2235dea2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/mimey/zipball/d69688d4856daa13a9124c819d148ccc2235dea2", + "reference": "d69688d4856daa13a9124c819d148ccc2235dea2", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^5.3|^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" }, - "bin": [ - "bin/jp.php" + "type": "library", + "autoload": { + "psr-4": { + "Mimey\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "PHP package for converting file extensions to MIME types and vice versa.", + "time": "2017-01-27T20:57:22+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "JmesPath\\": "src/" - }, - "files": [ - "src/JmesPath.php" - ] + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -477,17 +483,62 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" } ], - "description": "Declaratively specify how to extract elements from a JSON document", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", "keywords": [ - "json", - "jsonpath" + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "henrikbjorn/phpspec-code-coverage", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/henrikbjorn/PhpSpecCodeCoverageExtension.git", + "reference": "528a0c69a524f8acba5f66bc59ae8dc9bc409045" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/henrikbjorn/PhpSpecCodeCoverageExtension/zipball/528a0c69a524f8acba5f66bc59ae8dc9bc409045", + "reference": "528a0c69a524f8acba5f66bc59ae8dc9bc409045", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^5.4|^5.5|^5.6|^7.0", + "phpspec/phpspec": "^2.0", + "phpunit/php-code-coverage": "^2.2.4|^3" + }, + "require-dev": { + "bossa/phpspec2-expect": "^1.0" + }, + "suggest": { + "ext-xdebug": "To allow coverage generation when not using a recent version of phpdbg" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpSpec\\Extension\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2016-01-05T18:25:05+00:00" + "description": "Integrates CodeCoverage with PhpSpec", + "abandoned": true, + "time": "2016-05-05T18:25:12+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -662,8 +713,7 @@ "authors": [ { "name": "Chris Boulton", - "homepage": "http://github.com/chrisboulton", - "role": "Original developer" + "homepage": "http://github.com/chrisboulton" } ], "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", @@ -1178,58 +1228,9 @@ "mock", "xunit" ], + "abandoned": true, "time": "2015-10-02T06:51:40+00:00" }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, { "name": "sebastian/comparator", "version": "1.2.0",