Compare commits

...

2 Commits

Author SHA1 Message Date
Gregory Oschwald
543a8c07d0 Prepare for 0.6.2 2014-05-08 15:29:50 -07:00
Gregory Oschwald
0ce625f29a Fix phar with new versions of Guzzle 2014-05-08 15:28:16 -07:00
3 changed files with 23 additions and 1 deletions

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
0.6.2 (2014-05-08)
------------------
* The Phar build was broken with Guzzle 3.9.0+. This has been fixed.
0.6.1 (2014-05-01)
------------------

View File

@ -1,5 +1,5 @@
{
"main": "vendor/autoload.php",
"main": "phar-stub.php",
"output": "geoip2.phar",
"compactors": [
"Herrera\\Box\\Compactor\\Composer",

17
phar-stub.php Normal file
View File

@ -0,0 +1,17 @@
<?php
require_once 'vendor/autoload.php';
// The following was taken from Guzzle (MIT license)
// Copy the cacert.pem file from the phar if it is not in the temp folder.
$from = 'phar://geoip2.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem';
$certFile = sys_get_temp_dir() . '/guzzle-cacert.pem';
// Only copy when the file size is different
if (!file_exists($certFile) || filesize($certFile) != filesize($from)) {
if (!copy($from, $certFile)) {
throw new RuntimeException("Could not copy {$from} to {$certFile}: "
. var_export(error_get_last(), true));
}
}