From 8b337ba3709a394224cb0dda9a183298d7c8890b Mon Sep 17 00:00:00 2001 From: Spencer Rinehart Date: Fri, 5 Sep 2014 10:02:32 -0400 Subject: [PATCH] Integrate with coveralls. --- .coveralls.yml | 4 + .travis.yml | 1 + README.md | 2 +- build.php | 3 + composer.json | 1 + composer.lock | 532 +++++++++++++++++++++++++++++++++++++++++++++---- 6 files changed, 502 insertions(+), 41 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..a343c9a --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,4 @@ +service_name: travis-ci +src_dir: . +coverage_clover: clover.xml +json_path: coveralls-upload.json diff --git a/.travis.yml b/.travis.yml index f6f8853..529ceef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,3 +6,4 @@ php: before_script: - composer self-update || true script: ./build.php +after_script: ./vendor/bin/coveralls -v diff --git a/README.md b/README.md index 60268fe..ab28b19 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # util-php [![Build Status](http://img.shields.io/travis/dominionenterprises/util-php.svg?style=flat)](https://travis-ci.org/dominionenterprises/util-php) [![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/dominionenterprises/util-php.svg?style=flat)](https://scrutinizer-ci.com/g/dominionenterprises/util-php/) -[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/dominionenterprises/util-php.svg?style=flat)](https://scrutinizer-ci.com/g/dominionenterprises/util-php/) +[![Code Coverage](http://img.shields.io/coveralls/dominionenterprises/util-php.svg?style=flat)](https://coveralls.io/r/dominionenterprises/util-php) [![Latest Stable Version](http://img.shields.io/packagist/v/dominionenterprises/util.svg?style=flat)](https://packagist.org/packages/dominionenterprises/util) [![Total Downloads](http://img.shields.io/packagist/dt/dominionenterprises/util.svg?style=flat)](https://packagist.org/packages/dominionenterprises/util) diff --git a/build.php b/build.php index f186320..6f7a120 100755 --- a/build.php +++ b/build.php @@ -29,6 +29,9 @@ exit(1); } +$cloverCoverage = new PHP_CodeCoverage_Report_Clover(); +file_put_contents('clover.xml', $cloverCoverage->process($result->getCodeCoverage())); + $coverageFactory = new PHP_CodeCoverage_Report_Factory(); $coverageReport = $coverageFactory->create($result->getCodeCoverage()); if ($coverageReport->getNumExecutedLines() !== $coverageReport->getNumExecutableLines()) { diff --git a/composer.json b/composer.json index 847e0a6..fb5a23f 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ }, "require-dev": { "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "~0.6.1", "squizlabs/php_codesniffer": "~1.5", "dominionenterprises/dws-coding-standard": "~1.1" }, diff --git a/composer.lock b/composer.lock index 68b04ed..857fdae 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f947387491131bff1f03783cef826ac5", + "hash": "e5d85eafa83236889285b5b66b6fcec7", "packages": [ ], @@ -61,18 +61,110 @@ ], "time": "2014-01-06 14:45:56" }, + { + "name": "guzzle/guzzle", + "version": "v3.9.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "54991459675c1a2924122afbb0e5609ade581155" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155", + "reference": "54991459675c1a2924122afbb0e5609ade581155", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.9-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2014-08-11 04:32:36" + }, { "name": "ocramius/instantiator", - "version": "1.1.1", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/Ocramius/Instantiator.git", - "reference": "8aa99efa86c51319afc26d23254fe6a8b5a5144a" + "reference": "e24a12178906ff2e7471b8aaf3a0eb789b59f881" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/8aa99efa86c51319afc26d23254fe6a8b5a5144a", - "reference": "8aa99efa86c51319afc26d23254fe6a8b5a5144a", + "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/e24a12178906ff2e7471b8aaf3a0eb789b59f881", + "reference": "e24a12178906ff2e7471b8aaf3a0eb789b59f881", "shasum": "" }, "require": { @@ -114,7 +206,7 @@ "constructor", "instantiate" ], - "time": "2014-08-11 23:48:35" + "time": "2014-08-25 14:48:16" }, { "name": "ocramius/lazy-map", @@ -176,29 +268,29 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.0.10", + "version": "2.0.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6d196af48e8c100a3ae881940123e693da5a9217" + "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217", - "reference": "6d196af48e8c100a3ae881940123e693da5a9217", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53603b3c995f5aab6b59c8e08c3a663d2cc810b7", + "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3.1", - "phpunit/php-text-template": "~1.2.0", - "phpunit/php-token-stream": "~1.2.2", - "sebastian/environment": "~1.0.0", - "sebastian/version": "~1.0.3" + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "~1.0", + "sebastian/version": "~1.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4.0.14" + "phpunit/phpunit": "~4.1" }, "suggest": { "ext-dom": "*", @@ -237,7 +329,7 @@ "testing", "xunit" ], - "time": "2014-08-06 06:39:42" + "time": "2014-08-31 06:33:04" }, { "name": "phpunit/php-file-iterator", @@ -374,45 +466,44 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.2.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", @@ -420,20 +511,20 @@ "keywords": [ "tokenizer" ], - "time": "2014-03-03 05:10:30" + "time": "2014-08-31 06:12:13" }, { "name": "phpunit/phpunit", - "version": "4.2.0", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "58db726aa45fe26bca93f692cb3d77e9a46b7830" + "reference": "f0c2d374ad06ec1e56c721f4ed87c59ff35f440e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/58db726aa45fe26bca93f692cb3d77e9a46b7830", - "reference": "58db726aa45fe26bca93f692cb3d77e9a46b7830", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f0c2d374ad06ec1e56c721f4ed87c59ff35f440e", + "reference": "f0c2d374ad06ec1e56c721f4ed87c59ff35f440e", "shasum": "" }, "require": { @@ -494,7 +585,7 @@ "testing", "xunit" ], - "time": "2014-08-08 05:13:30" + "time": "2014-08-31 06:46:49" }, { "name": "phpunit/phpunit-mock-objects", @@ -554,6 +645,112 @@ ], "time": "2014-08-02 13:50:58" }, + { + "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-21 11:40:51" + }, + { + "name": "satooshi/php-coveralls", + "version": "v0.6.1", + "source": { + "type": "git", + "url": "https://github.com/satooshi/php-coveralls.git", + "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", + "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": ">=3.0", + "php": ">=5.3", + "psr/log": "1.0.0", + "symfony/config": ">=2.0", + "symfony/console": ">=2.0", + "symfony/stopwatch": ">=2.2", + "symfony/yaml": ">=2.0" + }, + "require-dev": { + "apigen/apigen": "2.8.*@stable", + "pdepend/pdepend": "dev-master", + "phpmd/phpmd": "dev-master", + "phpunit/php-invoker": ">=1.1.0,<1.2.0", + "phpunit/phpunit": "3.7.*@stable", + "sebastian/finder-facade": "dev-master", + "sebastian/phpcpd": "1.4.*@stable", + "squizlabs/php_codesniffer": "1.4.*@stable", + "theseer/fdomdocument": "dev-master" + }, + "bin": [ + "composer/bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-0": { + "Contrib\\Component": "src/", + "Contrib\\Bundle": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2013-05-04 08:07:33" + }, { "name": "sebastian/comparator", "version": "1.0.0", @@ -771,7 +968,8 @@ }, { "name": "Adam Harvey", - "email": "aharvey@php.net" + "email": "aharvey@php.net", + "role": "Lead" }, { "name": "Bernhard Schussek", @@ -896,19 +1094,273 @@ ], "time": "2014-08-05 23:54:05" }, + { + "name": "symfony/config", + "version": "v2.5.4", + "target-dir": "Symfony/Component/Config", + "source": { + "type": "git", + "url": "https://github.com/symfony/Config.git", + "reference": "080eabdc256c1d7a3a7cf6296271edb68eb1ab2b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Config/zipball/080eabdc256c1d7a3a7cf6296271edb68eb1ab2b", + "reference": "080eabdc256c1d7a3a7cf6296271edb68eb1ab2b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/filesystem": "~2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Config\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Config Component", + "homepage": "http://symfony.com", + "time": "2014-08-31 03:22:04" + }, + { + "name": "symfony/console", + "version": "v2.5.4", + "target-dir": "Symfony/Component/Console", + "source": { + "type": "git", + "url": "https://github.com/symfony/Console.git", + "reference": "748beed2a1e73179c3f5154d33fe6ae100c1aeb1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Console/zipball/748beed2a1e73179c3f5154d33fe6ae100c1aeb1", + "reference": "748beed2a1e73179c3f5154d33fe6ae100c1aeb1", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Console Component", + "homepage": "http://symfony.com", + "time": "2014-08-14 16:10:54" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.5.4", + "target-dir": "Symfony/Component/EventDispatcher", + "source": { + "type": "git", + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/8faf5cc7e80fde74a650a36e60d32ce3c3e0457b", + "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0", + "symfony/dependency-injection": "~2.0", + "symfony/stopwatch": "~2.2" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "http://symfony.com", + "time": "2014-07-28 13:20:46" + }, + { + "name": "symfony/filesystem", + "version": "v2.5.4", + "target-dir": "Symfony/Component/Filesystem", + "source": { + "type": "git", + "url": "https://github.com/symfony/Filesystem.git", + "reference": "a765efd199e02ff4001c115c318e219030be9364" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a765efd199e02ff4001c115c318e219030be9364", + "reference": "a765efd199e02ff4001c115c318e219030be9364", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "http://symfony.com", + "time": "2014-09-03 09:00:14" + }, + { + "name": "symfony/stopwatch", + "version": "v2.5.4", + "target-dir": "Symfony/Component/Stopwatch", + "source": { + "type": "git", + "url": "https://github.com/symfony/Stopwatch.git", + "reference": "22ab4f76cdeefd38b00022a6be5709190a2fd046" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/22ab4f76cdeefd38b00022a6be5709190a2fd046", + "reference": "22ab4f76cdeefd38b00022a6be5709190a2fd046", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Stopwatch\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "http://symfony.com", + "time": "2014-08-14 16:10:54" + }, { "name": "symfony/yaml", - "version": "v2.5.3", + "version": "v2.5.4", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f" + "reference": "01a7695bcfb013d0a15c6757e15aae120342986f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", - "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/01a7695bcfb013d0a15c6757e15aae120342986f", + "reference": "01a7695bcfb013d0a15c6757e15aae120342986f", "shasum": "" }, "require": { @@ -941,7 +1393,7 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-08-05 09:00:40" + "time": "2014-08-31 03:22:04" } ], "aliases": [