summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-08-20 11:34:52 +0200
committerRemi Collet <remi@remirepo.net>2018-08-20 11:34:52 +0200
commita58f176566ee036fb409ee5f69fbc3817c1bf405 (patch)
treed7a2fdb48b977f83fffe1beb2a69f12a09cc3154
parent7d0da3bc5c04dd56e91fb8d610cc044427cdc99d (diff)
update to 1.2.1
use phpunit7 open https://github.com/google/recaptcha/issues/250 - CHANGELOG
-rw-r--r--.gitignore8
-rw-r--r--composer.json19
-rw-r--r--php-google-recaptcha.spec34
3 files changed, 49 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index 1b41db8..d4695b7 100644
--- a/composer.json
+++ b/composer.json
@@ -1,9 +1,9 @@
{
"name": "google/recaptcha",
- "description": "Client library for reCAPTCHA, a free service that protect websites from spam and abuse.",
+ "description": "Client library for reCAPTCHA, a free service that protects websites from spam and abuse.",
"type": "library",
"keywords": ["recaptcha", "captcha", "spam", "abuse"],
- "homepage": "http://www.google.com/recaptcha/",
+ "homepage": "https://www.google.com/recaptcha/",
"license": "BSD-3-Clause",
"support": {
"forum": "https://groups.google.com/forum/#!forum/recaptcha",
@@ -13,7 +13,9 @@
"php": ">=5.5"
},
"require-dev": {
- "phpunit/phpunit": "^4.8"
+ "phpunit/phpunit": "^4.8.36|^5.7.27|^6.59|^7",
+ "friendsofphp/php-cs-fixer": "^2.2.20|^2.12",
+ "php-coveralls/php-coveralls": "^2.1"
},
"autoload": {
"psr-4": {
@@ -22,7 +24,16 @@
},
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "1.2.x-dev"
}
+ },
+ "scripts": {
+ "lint": "vendor/bin/php-cs-fixer -vvv fix --using-cache=no --dry-run .",
+ "lint-fix": "vendor/bin/php-cs-fixer -vvv fix --using-cache=no .",
+ "test": "vendor/bin/phpunit --colors=always",
+ "serve-examples": "@php -S localhost:8080 -t examples"
+ },
+ "config": {
+ "process-timeout": 0
}
}
diff --git a/php-google-recaptcha.spec b/php-google-recaptcha.spec
index ae0b404..61bb4b1 100644
--- a/php-google-recaptcha.spec
+++ b/php-google-recaptcha.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 5a56d15ca10a7b75158178752b2ad8f755eb4f78
+%global gh_commit e7add3be59211482ecdb942288f52da64a35f61a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner google
%global gh_project recaptcha
@@ -14,7 +14,7 @@
%global psr0 ReCaptcha
Name: php-%{gh_owner}-%{gh_project}
-Version: 1.1.3
+Version: 1.2.1
Release: 1%{?dist}
Summary: reCAPTCHA PHP client library
@@ -27,12 +27,21 @@ BuildArch: noarch
%if %{with_tests}
BuildRequires: php(language) >= 5.5
BuildRequires: php-curl
+BuildRequires: php-date
BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-spl
# For tests, from composer.json "require-dev": {
-# "phpunit/phpunit": "^4.8"
-BuildRequires: php-composer(phpunit/phpunit) >= 4.8
+# "phpunit/phpunit": "^4.8.36|^5.7.27|^6.59|^7"
+# remirepo:1
+%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
+BuildRequires: phpunit7
+%global phpunit %{_bindir}/phpunit7
+# remirepo:4
+%else
+BuildRequires: php-composer(phpunit/phpunit) >= 4.8.36
+%global phpunit %{_bindir}/phpunit
+%endif
%endif
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
@@ -40,8 +49,9 @@ BuildRequires: php-composer(fedora/autoloader)
# From composer.json, "require": {
# "php": ">=5.5"
Requires: php(language) >= 5.5
-# From phpcompatinfo report for 1.1.2
+# From phpcompatinfo report for 1.2.1
Requires: php-curl
+Requires: php-date
Requires: php-json
Requires: php-pcre
Requires: php-spl
@@ -59,6 +69,8 @@ reCAPTCHA is a free CAPTCHA service that protect websites from spam and abuse.
This is Google authored code that provides plugins for third-party integration
with reCAPTCHA.
+See https://www.google.com/recaptcha/
+
Autoloader: %{_datadir}/php/%{psr0}/autoload.php
@@ -89,9 +101,10 @@ cp -pr src/%{psr0} %{buildroot}%{_datadir}/php/%{psr0}
BOOTSTRAP=%{buildroot}%{_datadir}/php/%{psr0}/autoload.php
ret=0
-for cmd in php56 php70 php71 php; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit --bootstrap=$BOOTSTRAP --verbose || ret=0
+for cmdarg in "php %phpunit" "php56 %{_bindir}/phpunit" "php70 %{_bindir}/phpunit6" php71 php72 php73; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit7} --bootstrap=$BOOTSTRAP --verbose || ret=0
fi
done
exit $ret
@@ -109,6 +122,11 @@ exit $ret
%changelog
+* Mon Aug 20 2018 Remi Collet <remi@remirepo.net> - 1.2.1-1
+- update to 1.2.1
+- use phpunit7
+- open https://github.com/google/recaptcha/issues/250 - CHANGELOG
+
* Fri Mar 10 2017 Remi Collet <remi@remirepo.net> - 1.1.3-1
- Update to 1.1.3
- raise dependency on PHP 5.5