summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json10
-rw-r--r--php-akamai-open-edgegrid-client.spec67
2 files changed, 42 insertions, 35 deletions
diff --git a/composer.json b/composer.json
index 587a9c5..203d37b 100644
--- a/composer.json
+++ b/composer.json
@@ -13,8 +13,8 @@
],
"require": {
"php": ">=5.5",
- "akamai-open/edgegrid-auth": "^0.6.2",
- "guzzlehttp/guzzle": "^6.0",
+ "akamai-open/edgegrid-auth": "^1.0.0@beta",
+ "guzzlehttp/guzzle": "^6.1.1",
"psr/log": "^1.0",
"monolog/monolog": "^1.15",
"league/climate": "~3.2"
@@ -58,7 +58,11 @@
"apigen generate"
],
"build-phar": "./tools/build-phar.sh",
- "fix-cs": "./tools/fix-cs.sh",
+ "fix-cs": [
+ "phpcbf --standard=PSR1,PSR2 ./src ./tests",
+ "php-cs-fixer fix --level=psr2 ./src",
+ "php-cs-fixer fix --level=psr2 ./tests"
+ ],
"check-version": "./tools/check-version.sh"
}
}
diff --git a/php-akamai-open-edgegrid-client.spec b/php-akamai-open-edgegrid-client.spec
index 6ad8fda..bf0a052 100644
--- a/php-akamai-open-edgegrid-client.spec
+++ b/php-akamai-open-edgegrid-client.spec
@@ -12,19 +12,21 @@
%global github_owner akamai-open
%global github_name AkamaiOPEN-edgegrid-php-client
-%global github_version 0.6.4
-%global github_commit 37996e211d3e13f8156789b4580640d9721669b4
+%global github_version 1.0.0
+%global github_commit cb8ba9da0f0bf6a3fcdc12057f4fd0f5d995d6cb
+%global github_prerelease beta1
+%global github_release .%{github_prerelease}
%global composer_vendor akamai-open
%global composer_project edgegrid-client
# "php": ">=5.5"
%global php_min_ver 5.5
-# "akamai-open/edgegrid-auth": "^0.6.2"
-%global akamai_open_edgegrid_auth_min_ver 0.6.2
-%global akamai_open_edgegrid_auth_max_ver 1.0
-# "guzzlehttp/guzzle": "^6.0"
-%global guzzle_min_ver 6.0
+# "akamai-open/edgegrid-auth": "^1.0.0@beta"
+%global akamai_open_edgegrid_auth_min_ver 1.0
+%global akamai_open_edgegrid_auth_max_ver 2.0
+# "guzzlehttp/guzzle": "^6.1.1"
+%global guzzle_min_ver 6.1.1
%global guzzle_max_ver 7.0
# "monolog/monolog": "^1.15"
%global monolog_min_ver 1.15
@@ -41,7 +43,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 1%{?github_release}%{?dist}
+Release: 0.1%{?github_release}%{?dist}
Summary: Implements the Akamai {OPEN} EdgeGrid Authentication
Group: Development/Libraries
@@ -56,16 +58,20 @@ BuildRequires: php-fedora-autoloader-devel
# Library version value and autoloader check
BuildRequires: php-cli
## composer.json
+BuildRequires: php-composer(akamai-open/edgegrid-auth) < %{akamai_open_edgegrid_auth_max_ver}
BuildRequires: php-composer(akamai-open/edgegrid-auth) >= %{akamai_open_edgegrid_auth_min_ver}
+BuildRequires: php-composer(guzzlehttp/guzzle) < %{guzzle_max_ver}
BuildRequires: php-composer(guzzlehttp/guzzle) >= %{guzzle_min_ver}
+BuildRequires: php-composer(monolog/monolog) < %{monolog_max_ver}
BuildRequires: php-composer(monolog/monolog) >= %{monolog_min_ver}
+BuildRequires: php-composer(psr/log) < %{psr_log_max_ver}
BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver}
# Tests
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
-## phpcompatinfo (computed from version 0.6.3)
+## phpcompatinfo (computed from version 1.0.0beta1)
BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-reflection
@@ -81,7 +87,7 @@ Requires: php-composer(monolog/monolog) < %{monolog_max_ver}
Requires: php-composer(monolog/monolog) >= %{monolog_min_ver}
Requires: php-composer(psr/log) < %{psr_log_max_ver}
Requires: php-composer(psr/log) >= %{psr_log_min_ver}
-# phpcompatinfo (computed from version 0.6.3)
+# phpcompatinfo (computed from version 1.0.0beta1)
Requires: php-json
Requires: php-pcre
# Autoloader
@@ -99,8 +105,6 @@ of Guzzle [2], as both a drop-in replacement client, and middleware.
For more information visit the Akamai {OPEN} Developer Community [3].
Autoloader: %{phpdir}/Akamai/Open/EdgeGrid/autoload-client.php
-(Note: Compat autoloader %{phpdir}/Akamai/Open/EdgeGrid/autoload.php
-will be removed in version 1.0.0)
[1] https://developer.akamai.com/introduction/Client_Auth.html
[2] https://github.com/guzzle/guzzle
@@ -113,6 +117,7 @@ will be removed in version 1.0.0)
: Remove CLI
rm -f src/Cli.php
+
%build
: Create autoloader
%{_bindir}/phpab --template fedora --output src/autoload-client.php src/
@@ -127,24 +132,21 @@ cat <<'AUTOLOAD' | tee -a src/autoload-client.php
));
AUTOLOAD
-: Compat autoloader
-ln -s autoload-client.php src/autoload.php
-
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid
-cp -rp src/* %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/
+mkdir -p %{buildroot}%{phpdir}/Akamai/Open
+cp -rp src %{buildroot}%{phpdir}/Akamai/Open/EdgeGrid
%check
: Library version value and autoloader check
%{_bindir}/php -r '
- require_once "%{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload.php";
+ require_once "%{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload-client.php";
$version = \Akamai\Open\EdgeGrid\Client::VERSION;
- echo "Version $version (expected %{version})\n";
- exit(version_compare("%{version}", "$version", "=") ? 0 : 1);
+ echo "Version $version (expected %{version}%{?github_prerelease})\n";
+ exit(version_compare("%{version}%{?github_prerelease}", "$version", "=") ? 0 : 1);
'
%if %{with_tests}
@@ -156,16 +158,13 @@ require_once '%{buildroot}%{phpdir}/Akamai/Open/EdgeGrid/autoload-client.php';
BOOTSTRAP
: Upstream tests
-%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
-
-: Upstream tests with SCLs if available
-SCL_RETURN_CODE=0
-for SCL in php56 php70 php71; do
- if which $SCL; then
- $SCL %{_bindir}/phpunit --bootstrap bootstrap.php || SCL_RETURN_CODE=1
+RETURN_CODE=0
+for PHP_EXEC in php php56 php70 php71; do
+ if which $PHP_EXEC; then
+ $PHP_EXEC %{_bindir}/phpunit --bootstrap bootstrap.php || RETURN_CODE=1
fi
done
-exit $SCL_RETURN_CODE
+exit $RETURN_CODE
%else
: Tests skipped
%endif
@@ -182,7 +181,6 @@ rm -rf %{buildroot}
%doc *.md
%doc composer.json
%{phpdir}/Akamai/Open/EdgeGrid/autoload-client.php
-%{phpdir}/Akamai/Open/EdgeGrid/autoload.php
%{phpdir}/Akamai/Open/EdgeGrid/Client.php
%{phpdir}/Akamai/Open/EdgeGrid/Exception
%{phpdir}/Akamai/Open/EdgeGrid/Exception.php
@@ -190,19 +188,24 @@ rm -rf %{buildroot}
%changelog
-* Tue Dec 27 2016 Remi Collet <remim@remirepo.net> - 0.6.4-1
+* Sat Mar 11 2017 Shawn Iwinski <shawn@iwin.ski> - 1.0.0-0.1.beta1
+- Update to 1.0.0beta1 (RHBZ #1408816)
+- Added max versions to BuildRequires dependencies
+- Removed compat autoloader
+
+* Tue Dec 27 2016 Remi Collet <remi@remirepo.net> - 0.6.4-1
- update to 0.6.4 (no change)
* Mon Dec 26 2016 Shawn Iwinski <shawn@iwin.ski> - 0.6.3-1
- Update to 0.6.3 (RHBZ #1408612)
-* Sun Dec 25 2016 Remi Collet <remim@remirepo.net> - 0.6.3-1
+* Sun Dec 25 2016 Remi Collet <remi@remirepo.net> - 0.6.3-1
- update to 0.6.3
* Sat Dec 24 2016 Shawn Iwinski <shawn@iwin.ski> - 0.6.2-2
- Minor spec-only modifications
-* Thu Dec 22 2016 Remi Collet <remim@remirepo.net> - 0.6.2-1
+* Thu Dec 22 2016 Remi Collet <remi@remirepo.net> - 0.6.2-1
- update to 0.6.2
- Use php-composer(fedora/autoloader)