Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e92f4b69db | ||
|
|
30d53b12f9 | ||
|
|
c6b358f378 | ||
|
|
2dd81eb711 | ||
|
|
1d94babe5a | ||
|
|
c4d56d4b53 | ||
|
|
85c194b517 | ||
|
|
342ce9dc15 |
5 changed files with 56 additions and 30 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -3,3 +3,11 @@ clog
|
|||
/php-justinrainbow-json-schema5-5.1.0-48817e5.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.0-e3c9bcc.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.1-429be23.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.2-b80053b.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.4-7ccb0e6.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.5-0d4fda8.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.6-d283e11.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.7-8560d43.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.8-dcb6e10.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.9-44c6787.tgz
|
||||
/php-justinrainbow-json-schema5-5.2.10-2ba9c8c.tgz
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
NAME=$(basename $PWD)
|
||||
OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
|
||||
PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
|
||||
MAJOR=$(sed -n '/^%global major/{s/.* //;p}' $NAME.spec)
|
||||
MINOR=$(sed -n '/^%global minor/{s/.* //;p}' $NAME.spec)
|
||||
VERSION=$MAJOR.$MINOR
|
||||
VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
|
||||
COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
|
||||
SHORT=${COMMIT:0:7}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
diff -up ./bin/validate-json.rpm ./bin/validate-json
|
||||
--- ./bin/validate-json.rpm 2017-03-23 08:58:50.000000000 +0100
|
||||
+++ ./bin/validate-json 2017-03-23 09:23:35.797857285 +0100
|
||||
--- ./bin/validate-json.rpm 2019-09-26 09:03:49.371018279 +0200
|
||||
+++ ./bin/validate-json 2019-09-26 09:06:21.033483985 +0200
|
||||
@@ -6,32 +6,7 @@
|
||||
* @author Christian Weiske <christian.weiske@netresearch.de>
|
||||
*/
|
||||
|
|
@ -12,7 +12,7 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json
|
|||
- *
|
||||
- * @return void
|
||||
- */
|
||||
-function __autoload($className)
|
||||
-spl_autoload_register(function ($className)
|
||||
-{
|
||||
- $className = ltrim($className, '\\');
|
||||
- $fileName = '';
|
||||
|
|
@ -25,7 +25,7 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json
|
|||
- if (stream_resolve_include_path($fileName)) {
|
||||
- require_once $fileName;
|
||||
- }
|
||||
-}
|
||||
-});
|
||||
-
|
||||
-// support running this tool from git checkout
|
||||
-if (is_dir(__DIR__ . '/../src/JsonSchema')) {
|
||||
|
|
@ -36,9 +36,9 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json
|
|||
$arOptions = array();
|
||||
$arArgs = array();
|
||||
diff -up ./src/JsonSchema/Uri/UriRetriever.php.rpm ./src/JsonSchema/Uri/UriRetriever.php
|
||||
--- ./src/JsonSchema/Uri/UriRetriever.php.rpm 2017-03-23 08:58:50.000000000 +0100
|
||||
+++ ./src/JsonSchema/Uri/UriRetriever.php 2017-03-23 09:23:35.797857285 +0100
|
||||
@@ -323,7 +323,8 @@ class UriRetriever implements BaseUriRet
|
||||
--- ./src/JsonSchema/Uri/UriRetriever.php.rpm 2019-09-26 09:03:13.000000000 +0200
|
||||
+++ ./src/JsonSchema/Uri/UriRetriever.php 2019-09-26 09:03:49.371018279 +0200
|
||||
@@ -342,7 +342,8 @@ class UriRetriever implements BaseUriRet
|
||||
}
|
||||
|
||||
// translate references to local files within the json-schema package
|
||||
|
|
@ -49,9 +49,9 @@ diff -up ./src/JsonSchema/Uri/UriRetriever.php.rpm ./src/JsonSchema/Uri/UriRetri
|
|||
return $uri;
|
||||
}
|
||||
diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
|
||||
--- ./tests/Uri/UriRetrieverTest.php.rpm 2017-03-23 08:58:50.000000000 +0100
|
||||
+++ ./tests/Uri/UriRetrieverTest.php 2017-03-23 09:28:28.992372836 +0100
|
||||
@@ -295,7 +295,8 @@ EOF;
|
||||
--- ./tests/Uri/UriRetrieverTest.php.rpm 2019-09-26 09:03:13.000000000 +0200
|
||||
+++ ./tests/Uri/UriRetrieverTest.php 2019-09-26 09:03:49.372018275 +0200
|
||||
@@ -296,7 +296,8 @@ EOF;
|
||||
public function testPackageURITranslation()
|
||||
{
|
||||
$retriever = new UriRetriever();
|
||||
|
|
@ -61,7 +61,7 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
|
|||
|
||||
$uri = $retriever->translate('package://foo/bar.json');
|
||||
$this->assertEquals("${root}foo/bar.json", $uri);
|
||||
@@ -304,7 +305,8 @@ EOF;
|
||||
@@ -305,7 +306,8 @@ EOF;
|
||||
public function testDefaultDistTranslations()
|
||||
{
|
||||
$retriever = new UriRetriever();
|
||||
|
|
@ -71,7 +71,7 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
|
|||
|
||||
$this->assertEquals(
|
||||
$root . 'json-schema-draft-03.json',
|
||||
@@ -322,11 +324,12 @@ EOF;
|
||||
@@ -323,11 +325,12 @@ EOF;
|
||||
$retriever = new UriRetriever();
|
||||
|
||||
// load schema from package
|
||||
|
|
@ -85,8 +85,8 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php
|
|||
+ $this->assertEquals('c2ef5714b639cea176fdeeafe418aa09', md5(json_encode($schema)));
|
||||
}
|
||||
|
||||
public function testJsonSchemaOrgMediaTypeHack()
|
||||
@@ -365,7 +367,7 @@ EOF;
|
||||
public function testInvalidContentTypeEndpointsDefault()
|
||||
@@ -389,7 +392,7 @@ EOF;
|
||||
'JsonSchema\Exception\JsonDecodingException',
|
||||
'JSON syntax is malformed'
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,18 @@
|
|||
# remirepo/fedora spec file for php-justinrainbow-json-schema5
|
||||
#
|
||||
# Copyright (c) 2016-2017 Remi Collet
|
||||
# Copyright (c) 2016-2019 Remi Collet
|
||||
# License: CC-BY-SA
|
||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
%global gh_commit 429be236f296ca249d61c65649cdf2652f4a5e80
|
||||
%global gh_commit 2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner justinrainbow
|
||||
%global gh_project json-schema
|
||||
%global php_home %{_datadir}/php
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
%global major 5
|
||||
%global minor 2.1
|
||||
|
||||
|
||||
# Some sample files, only used for tests
|
||||
|
|
@ -28,13 +27,12 @@
|
|||
%global eolv2 0
|
||||
|
||||
Name: php-%{gh_owner}-%{gh_project}%{major}
|
||||
Version: %{major}.%{minor}
|
||||
Version: 5.2.10
|
||||
Release: 1%{?dist}
|
||||
Summary: A library to validate a json schema
|
||||
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
||||
|
||||
# git snapshot to get upstream test suite
|
||||
Source0: %{name}-%{version}-%{gh_short}.tgz
|
||||
Source1: https://github.com/%{ts_owner}/%{ts_project}/archive/%{ts_commit}/%{ts_project}-%{ts_version}-%{ts_short}.tar.gz
|
||||
|
|
@ -56,11 +54,10 @@ BuildRequires: php-mbstring
|
|||
BuildRequires: php-pcre
|
||||
BuildRequires: php-spl
|
||||
# From composer.json, "require-dev": {
|
||||
# "json-schema/JSON-Schema-Test-Suite": "1.2.0",
|
||||
# "phpunit/phpunit": "^4.8.22",
|
||||
# "json-schema/json-schema-test-suite": "1.2.0",
|
||||
# "friendsofphp/php-cs-fixer": "^2.1",
|
||||
# "phpdocumentor/phpdocumentor": "^2.7"
|
||||
BuildRequires: php-composer(phpunit/phpunit) >= 4.8.22
|
||||
# "phpunit/phpunit": "^4.8.35"
|
||||
BuildRequires: php-composer(phpunit/phpunit) >= 4.8.35
|
||||
# Autoloader
|
||||
BuildRequires: php-composer(fedora/autoloader)
|
||||
# For composer schema
|
||||
|
|
@ -159,7 +156,7 @@ php bin/validate-json-test \
|
|||
|
||||
: Upstream test suite
|
||||
ret=0
|
||||
for cmd in php php56 php70 php71 php72; do
|
||||
for cmd in php php72 php73 php74 php80; do
|
||||
if which $cmd; then
|
||||
$cmd -d memory_limit=1G %{_bindir}/phpunit -d memory_limit=1G --verbose || ret=1
|
||||
fi
|
||||
|
|
@ -171,7 +168,6 @@ exit $ret
|
|||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license LICENSE
|
||||
%doc composer.json
|
||||
%doc *.md
|
||||
|
|
@ -181,6 +177,30 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu May 28 2020 Remi Collet <remi@remirepo.net> - 5.2.10-1
|
||||
- update to 5.2.10
|
||||
|
||||
* Thu Sep 26 2019 Remi Collet <remi@remirepo.net> - 5.2.9-1
|
||||
- update to 5.2.9
|
||||
|
||||
* Tue Jan 15 2019 Remi Collet <remi@remirepo.net> - 5.2.8-1
|
||||
- update to 5.2.8
|
||||
|
||||
* Thu Feb 15 2018 Remi Collet <remi@remirepo.net> - 5.2.7-1
|
||||
- Update to 5.2.7
|
||||
|
||||
* Sun Oct 22 2017 Remi Collet <remi@remirepo.net> - 5.2.6-1
|
||||
- Update to 5.2.6
|
||||
|
||||
* Wed Oct 11 2017 Remi Collet <remi@remirepo.net> - 5.2.5-1
|
||||
- Update to 5.2.5
|
||||
|
||||
* Thu Oct 5 2017 Remi Collet <remi@remirepo.net> - 5.2.4-1
|
||||
- Update to 5.2.4
|
||||
|
||||
* Tue Oct 3 2017 Remi Collet <remi@remirepo.net> - 5.2.2-1
|
||||
- Update to 5.2.2
|
||||
|
||||
* Wed May 17 2017 Remi Collet <remi@remirepo.net> - 5.2.1-1
|
||||
- Update to 5.2.1
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (JSON-Schema-Test-Suite-1.2.0-f3d5aeb.tar.gz) = 6b917a0a0b02d5b2be6457403fba0ae4d3789634da911ebbdc56986b99ae285ed8a7bc696abc668f2a95b55e33d7bfbf8709162fc0995d76ab2f0d05494a2d02
|
||||
SHA512 (php-justinrainbow-json-schema5-5.2.1-429be23.tgz) = c8b22be2ba601d4e9e2ec94470841f5cadc5a0a73bceb8bfeb5d7a16ed5fe8da0e3769e5843a16a38512bfbcfc99aece55003945e48f1bcfebd63e5b6e35f733
|
||||
SHA512 (php-justinrainbow-json-schema5-5.2.10-2ba9c8c.tgz) = 1c1e274c2cd1110fe2f18b765293fe540024d15cf130873250049b8538a55a9d31b9eedea70b1697d4e461df248781beed6f4cd0d46e0ec039fa30e104d0849c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue