Skip to content

Commit

Permalink
Bump codacy/coverage from 1.4.1 to 1.4.2 (#59)
Browse files Browse the repository at this point in the history
* Fix adldap version

* Bump codacy/coverage from 1.4.1 to 1.4.2

Bumps [codacy/coverage](https://github.com/codacy/php-codacy-coverage) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/codacy/php-codacy-coverage/releases)
- [Commits](archived-codacy/php-codacy-coverage@1.4.1...1.4.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Merge

* Bump php version
  • Loading branch information
dependabot[bot] authored and prytoegrian committed Nov 17, 2018
1 parent f8223a2 commit d49d476
Show file tree
Hide file tree
Showing 247 changed files with 6,762 additions and 5,840 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: php
php:
- '7.0'
- '7.1'
notifications:
email:
Expand Down
8 changes: 8 additions & 0 deletions Vendor/codacy/coverage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ We have php5-curl dependency, if you have issues related to curl_init() please i
sudo apt-get install php5-curl
```

## Alternative Installation (using phar)

Setup codacy-coverage as phar, you can simply download a pre-compiled and ready-to-use version as a phar to any directory. Simply download the latest `codacy-coverage.phar` file from our [releases page](https://github.com/codacy/php-codacy-coverage/releases):

[Latest release](https://github.com/codacy/php-codacy-coverage/releases/latest)

That's it already.

## Updating Codacy

To update Codacy, you will need your project API token. You can find the token in Project -> Settings -> Integrations -> Project API.
Expand Down
9 changes: 9 additions & 0 deletions Vendor/codacy/coverage/box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"directories": [
"src",
"vendor"
],
"main": "bin/codacycoverage",
"output": "build/codacy-coverage.phar",
"stub": true
}
15 changes: 14 additions & 1 deletion Vendor/codacy/coverage/circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,21 @@ dependencies:
pre:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install -n
- go get github.com/aktau/github-release
- wget -O box.phar https://github.com/box-project/box2/releases/download/2.7.5/box-2.7.5.phar

test:
post:
- php vendor/bin/phpunit --coverage-clover build/coverage/xml tests
- php bin/codacycoverage clover build/coverage/xml

deployment:
master:
branch: master
commands:
- php bin/codacycoverage clover build/coverage/xml
release:
tag: /[0-9]+(\.[0-9]+)*/
commands:
- php -d phar.readonly=0 box.phar build
- git config user.name $CIRCLE_PROJECT_USERNAME
- github-release upload --user $CIRCLE_PROJECT_USERNAME --repo $CIRCLE_PROJECT_REPONAME --tag $CIRCLE_TAG --name codacy-coverage.phar --file build/codacy-coverage.phar
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ function __construct($baseUrl, $projectToken)
*/
public function sendCoverage($commit, $data)
{
$tempCertFile = $this->dumpCertificateBundle();

$url = $this->baseUrl . "/2.0/coverage/" . $commit . "/php";

$curl = curl_init($url);

curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt(
Expand All @@ -37,12 +40,14 @@ public function sendCoverage($commit, $data)
"project_token: " . $this->projectToken
)
);
curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
curl_setopt($curl, CURLOPT_CAINFO, $tempCertFile);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);

$json_response = curl_exec($curl);

unlink($tempCertFile);

$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);

if ($status < 200 || $status > 201) {
Expand All @@ -63,4 +68,18 @@ public function sendCoverage($commit, $data)
return $json['error'];
}
}

/**
* Store certificate bundle to temporary file to be available when used within phar context
*
* @return string Full qualified path to temporary file
*/
protected function dumpCertificateBundle()
{
$tempCertFile = tempnam(sys_get_temp_dir(), 'cacert');

copy(dirname(__FILE__) . '/cacert.pem', $tempCertFile);

return $tempCertFile;
}
}
1 change: 1 addition & 0 deletions Vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'253c157292f75eb38082b5acb06f3f01' => $vendorDir . '/nikic/fast-route/src/functions.php',
Expand Down
1 change: 1 addition & 0 deletions Vendor/composer/autoload_psr4.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
return array(
'Tightenco\\Collect\\' => array($vendorDir . '/tightenco/collect/src/Collect'),
'Symfony\\Polyfill\\Util\\' => array($vendorDir . '/symfony/polyfill-util'),
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
'Symfony\\Polyfill\\Php56\\' => array($vendorDir . '/symfony/polyfill-php56'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
Expand Down
6 changes: 6 additions & 0 deletions Vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class ComposerStaticInit5254fb3dcd0ada989877bc48f5b177e0
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'bd9634f2d41831496de0d3dfe4c94881' => __DIR__ . '/..' . '/symfony/polyfill-php56/bootstrap.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'253c157292f75eb38082b5acb06f3f01' => __DIR__ . '/..' . '/nikic/fast-route/src/functions.php',
Expand All @@ -25,6 +26,7 @@ class ComposerStaticInit5254fb3dcd0ada989877bc48f5b177e0
'S' =>
array (
'Symfony\\Polyfill\\Util\\' => 22,
'Symfony\\Polyfill\\Php72\\' => 23,
'Symfony\\Polyfill\\Php56\\' => 23,
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Component\\VarDumper\\' => 28,
Expand Down Expand Up @@ -81,6 +83,10 @@ class ComposerStaticInit5254fb3dcd0ada989877bc48f5b177e0
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-util',
),
'Symfony\\Polyfill\\Php72\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
),
'Symfony\\Polyfill\\Php56\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-php56',
Expand Down
Loading

0 comments on commit d49d476

Please sign in to comment.