From df2ea9c0509cb2644fb4e1d0353076e3cd891709 Mon Sep 17 00:00:00 2001 From: dannylamb Date: Wed, 7 Jun 2017 14:30:23 +0000 Subject: [PATCH 1/7] Adding OPTIONS request for integrating Hypercube with Api-X --- Hypercube/composer.lock | 333 +++++++++--------- .../src/Controller/HypercubeController.php | 25 ++ Hypercube/src/app.php | 2 + 3 files changed, 199 insertions(+), 161 deletions(-) diff --git a/Hypercube/composer.lock b/Hypercube/composer.lock index 799f4d04..82bf1c77 100644 --- a/Hypercube/composer.lock +++ b/Hypercube/composer.lock @@ -4,7 +4,6 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "514b7f18d8c36de085717c9a88727c42", "content-hash": "2b79558a960ae798fbc0562d917c9de9", "packages": [ { @@ -73,7 +72,7 @@ "docblock", "parser" ], - "time": "2017-02-24 16:22:25" + "time": "2017-02-24T16:22:25+00:00" }, { "name": "doctrine/cache", @@ -143,7 +142,7 @@ "cache", "caching" ], - "time": "2016-10-29 11:16:17" + "time": "2016-10-29T11:16:17+00:00" }, { "name": "doctrine/collections", @@ -210,7 +209,7 @@ "collections", "iterator" ], - "time": "2017-01-03 10:49:41" + "time": "2017-01-03T10:49:41+00:00" }, { "name": "doctrine/common", @@ -283,7 +282,7 @@ "persistence", "spl" ], - "time": "2017-01-13 14:02:13" + "time": "2017-01-13T14:02:13+00:00" }, { "name": "doctrine/dbal", @@ -354,7 +353,7 @@ "persistence", "queryobject" ], - "time": "2017-02-08 12:53:47" + "time": "2017-02-08T12:53:47+00:00" }, { "name": "doctrine/inflector", @@ -421,7 +420,7 @@ "singularize", "string" ], - "time": "2015-11-06 14:35:42" + "time": "2015-11-06T14:35:42+00:00" }, { "name": "doctrine/lexer", @@ -475,7 +474,7 @@ "lexer", "parser" ], - "time": "2014-09-09 13:34:57" + "time": "2014-09-09T13:34:57+00:00" }, { "name": "easyrdf/easyrdf", @@ -537,7 +536,7 @@ "rdfa", "sparql" ], - "time": "2015-02-27 09:45:49" + "time": "2015-02-27T09:45:49+00:00" }, { "name": "guzzlehttp/guzzle", @@ -599,7 +598,7 @@ "rest", "web service" ], - "time": "2017-02-28 22:50:30" + "time": "2017-02-28T22:50:30+00:00" }, { "name": "guzzlehttp/promises", @@ -650,7 +649,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20 10:07:11" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", @@ -715,7 +714,7 @@ "uri", "url" ], - "time": "2017-03-20 17:10:46" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "islandora/chullo", @@ -771,7 +770,7 @@ ], "description": "A PHP client for interacting with a Fedora 4 server.", "homepage": "https://github.com/islandora-claw/chullo", - "time": "2017-04-12 20:14:38" + "time": "2017-04-12T20:14:38+00:00" }, { "name": "islandora/crayfish-commons", @@ -779,12 +778,12 @@ "source": { "type": "git", "url": "https://github.com/Islandora-CLAW/Crayfish-Commons.git", - "reference": "3957f46bb560909caa8d1962b20ab9312fdf22b9" + "reference": "f6532974f83745320906ea9b143ef3b1413795d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Islandora-CLAW/Crayfish-Commons/zipball/3957f46bb560909caa8d1962b20ab9312fdf22b9", - "reference": "3957f46bb560909caa8d1962b20ab9312fdf22b9", + "url": "https://api.github.com/repos/Islandora-CLAW/Crayfish-Commons/zipball/f6532974f83745320906ea9b143ef3b1413795d9", + "reference": "f6532974f83745320906ea9b143ef3b1413795d9", "shasum": "" }, "require": { @@ -828,7 +827,7 @@ } ], "description": "Shared code amongst Islandora Crayfish microservices", - "time": "2017-04-21 21:41:55" + "time": "2017-06-07 01:23:03" }, { "name": "ml/iri", @@ -875,7 +874,7 @@ "uri", "url" ], - "time": "2014-01-21 13:43:39" + "time": "2014-01-21T13:43:39+00:00" }, { "name": "ml/json-ld", @@ -924,7 +923,7 @@ "JSON-LD", "jsonld" ], - "time": "2016-10-10 08:57:56" + "time": "2016-10-10T08:57:56+00:00" }, { "name": "monolog/monolog", @@ -1002,7 +1001,7 @@ "logging", "psr-3" ], - "time": "2017-03-13 07:08:03" + "time": "2017-03-13T07:08:03+00:00" }, { "name": "namshi/jose", @@ -1065,7 +1064,7 @@ "jwt", "token" ], - "time": "2016-12-05 07:27:31" + "time": "2016-12-05T07:27:31+00:00" }, { "name": "paragonie/random_compat", @@ -1113,7 +1112,7 @@ "pseudorandom", "random" ], - "time": "2017-03-13 16:27:32" + "time": "2017-03-13T16:27:32+00:00" }, { "name": "pimple/pimple", @@ -1159,7 +1158,7 @@ "container", "dependency injection" ], - "time": "2015-09-11 15:10:35" + "time": "2015-09-11T15:10:35+00:00" }, { "name": "psr/http-message", @@ -1209,7 +1208,7 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -1256,20 +1255,20 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "silex/silex", - "version": "v2.0.4", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "49ca08d853731d1635374e5019c8696cfd53c161" + "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/49ca08d853731d1635374e5019c8696cfd53c161", - "reference": "49ca08d853731d1635374e5019c8696cfd53c161", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/d5a9d9af14a1424ddecc3da481769cf64e7d3b34", + "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34", "shasum": "" }, "require": { @@ -1301,7 +1300,7 @@ "symfony/intl": "~2.8|^3.0", "symfony/monolog-bridge": "~2.8|^3.0", "symfony/options-resolver": "~2.8|^3.0", - "symfony/phpunit-bridge": "~2.8|^3.0", + "symfony/phpunit-bridge": "^3.2", "symfony/process": "~2.8|^3.0", "symfony/security": "~2.8|^3.0", "symfony/serializer": "~2.8|^3.0", @@ -1309,12 +1308,13 @@ "symfony/twig-bridge": "~2.8|^3.0", "symfony/validator": "~2.8|^3.0", "symfony/var-dumper": "~2.8|^3.0", - "twig/twig": "~1.27|~2.0" + "symfony/web-link": "^3.3", + "twig/twig": "~1.28|~2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1341,20 +1341,20 @@ "keywords": [ "microframework" ], - "time": "2016-11-06 18:09:06" + "time": "2017-05-03T15:21:42+00:00" }, { "name": "symfony/debug", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "56f613406446a4a0a031475cfd0a01751de22659" + "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/56f613406446a4a0a031475cfd0a01751de22659", - "reference": "56f613406446a4a0a031475cfd0a01751de22659", + "url": "https://api.github.com/repos/symfony/debug/zipball/e9c50482841ef696e8fa1470d950a79c8921f45d", + "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d", "shasum": "" }, "require": { @@ -1365,13 +1365,12 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.8|~3.0", "symfony/http-kernel": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1398,29 +1397,32 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-03-28 21:38:24" + "time": "2017-06-01T21:01:25+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca" + "reference": "4054a102470665451108f9b59305c79176ef98f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/154bb1ef7b0e42ccc792bd53edbce18ed73440ca", - "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4054a102470665451108f9b59305c79176ef98f0", + "reference": "4054a102470665451108f9b59305c79176ef98f0", "shasum": "" }, "require": { "php": ">=5.5.9" }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", "symfony/expression-language": "~2.8|~3.0", "symfony/stopwatch": "~2.8|~3.0" }, @@ -1431,7 +1433,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1458,7 +1460,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-04-04 07:26:27" + "time": "2017-06-04T18:15:29+00:00" }, { "name": "symfony/http-foundation", @@ -1511,20 +1513,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-03-04 12:23:14" + "time": "2017-03-04T12:23:14+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.2.7", + "version": "v3.2.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e" + "reference": "7dacc7b120cdfa5abfcc911b93a3e4ba2ffba0e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8285ab5faf1306b1a5ebcf287fe91c231a6de88e", - "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/7dacc7b120cdfa5abfcc911b93a3e4ba2ffba0e9", + "reference": "7dacc7b120cdfa5abfcc911b93a3e4ba2ffba0e9", "shasum": "" }, "require": { @@ -1593,20 +1595,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-04-05 12:52:03" + "time": "2017-05-29T19:32:04+00:00" }, { "name": "symfony/inflector", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/inflector.git", - "reference": "4ff27abb356742aa2495ad87a79d724c397ee5c4" + "reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/inflector/zipball/4ff27abb356742aa2495ad87a79d724c397ee5c4", - "reference": "4ff27abb356742aa2495ad87a79d724c397ee5c4", + "url": "https://api.github.com/repos/symfony/inflector/zipball/aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb", + "reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb", "shasum": "" }, "require": { @@ -1615,7 +1617,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1650,7 +1652,7 @@ "symfony", "words" ], - "time": "2017-02-20 13:34:33" + "time": "2017-04-12T14:14:56+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -1709,7 +1711,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-php56", @@ -1765,7 +1767,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-php70", @@ -1824,7 +1826,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-util", @@ -1876,20 +1878,20 @@ "polyfill", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/property-access", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "61eaebce4a9fd785f2fb469a661490fcff27b7bf" + "reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/61eaebce4a9fd785f2fb469a661490fcff27b7bf", - "reference": "61eaebce4a9fd785f2fb469a661490fcff27b7bf", + "url": "https://api.github.com/repos/symfony/property-access/zipball/70bbfe28f77070d41957495bc6fed34f139fe6f7", + "reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7", "shasum": "" }, "require": { @@ -1906,7 +1908,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1944,36 +1946,39 @@ "property path", "reflection" ], - "time": "2017-03-21 21:44:32" + "time": "2017-06-02T09:51:43+00:00" }, { "name": "symfony/routing", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee" + "reference": "39804eeafea5cca851946e1eed122eb94459fdb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d6605f9a5767bc5bc4895e1c762ba93964608aee", - "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee", + "url": "https://api.github.com/repos/symfony/routing/zipball/39804eeafea5cca851946e1eed122eb94459fdb4", + "reference": "39804eeafea5cca851946e1eed122eb94459fdb4", "shasum": "" }, "require": { "php": ">=5.5.9" }, "conflict": { - "symfony/config": "<2.8" + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.3" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", "symfony/expression-language": "~2.8|~3.0", "symfony/http-foundation": "~2.8|~3.0", - "symfony/yaml": "~2.8|~3.0" + "symfony/yaml": "~3.3" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -1986,7 +1991,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2019,20 +2024,20 @@ "uri", "url" ], - "time": "2017-03-02 15:58:09" + "time": "2017-06-02T09:51:43+00:00" }, { "name": "symfony/security", - "version": "v3.2.7", + "version": "v3.2.9", "source": { "type": "git", "url": "https://github.com/symfony/security.git", - "reference": "95199ced4d4b79b96dd257350f88d56497bc15f3" + "reference": "1370810e5474b6489590c0eab614fd06a7499f26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security/zipball/95199ced4d4b79b96dd257350f88d56497bc15f3", - "reference": "95199ced4d4b79b96dd257350f88d56497bc15f3", + "url": "https://api.github.com/repos/symfony/security/zipball/1370810e5474b6489590c0eab614fd06a7499f26", + "reference": "1370810e5474b6489590c0eab614fd06a7499f26", "shasum": "" }, "require": { @@ -2097,20 +2102,20 @@ ], "description": "Symfony Security Component", "homepage": "https://symfony.com", - "time": "2017-04-04 15:30:56" + "time": "2017-05-21T07:39:50+00:00" }, { "name": "symfony/yaml", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621" + "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "url": "https://api.github.com/repos/symfony/yaml/zipball/9752a30000a8ca9f4b34b5227d15d0101b96b063", + "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063", "shasum": "" }, "require": { @@ -2125,7 +2130,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2152,7 +2157,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-03-20 09:45:15" + "time": "2017-06-02T22:05:06+00:00" } ], "packages-dev": [ @@ -2208,7 +2213,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "myclabs/deep-copy", @@ -2250,7 +2255,7 @@ "object", "object graph" ], - "time": "2017-04-12 18:52:22" + "time": "2017-04-12T18:52:22+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -2304,7 +2309,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -2349,7 +2354,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2016-09-30T07:12:33+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -2396,7 +2401,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "time": "2016-11-25T06:54:22+00:00" }, { "name": "phpspec/prophecy", @@ -2459,7 +2464,7 @@ "spy", "stub" ], - "time": "2017-03-02 20:05:34" + "time": "2017-03-02T20:05:34+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2522,7 +2527,7 @@ "testing", "xunit" ], - "time": "2017-04-02 07:44:40" + "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2569,7 +2574,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -2610,7 +2615,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -2659,7 +2664,7 @@ "keywords": [ "timer" ], - "time": "2017-02-26 11:10:40" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", @@ -2708,20 +2713,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27 10:12:30" + "time": "2017-02-27T10:12:30+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.19", + "version": "5.7.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1" + "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69c4f49ff376af2692bad9cebd883d17ebaa98a1", - "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cb94a5f8c07a03c8b7527ed7468a2926203f58b", + "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b", "shasum": "" }, "require": { @@ -2739,7 +2744,7 @@ "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "^1.2.4", - "sebastian/diff": "~1.2", + "sebastian/diff": "^1.4.3", "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", "sebastian/global-state": "^1.1", @@ -2790,7 +2795,7 @@ "testing", "xunit" ], - "time": "2017-04-03 02:22:27" + "time": "2017-05-22T07:42:55+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -2849,7 +2854,7 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "time": "2016-12-08T20:27:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2894,7 +2899,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04 06:30:41" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", @@ -2958,27 +2963,27 @@ "compare", "equality" ], - "time": "2017-01-29 09:50:25" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -3010,7 +3015,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", @@ -3060,7 +3065,7 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", @@ -3127,7 +3132,7 @@ "export", "exporter" ], - "time": "2016-11-19 08:54:04" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/finder-facade", @@ -3166,7 +3171,7 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2016-02-17 07:02:23" + "time": "2016-02-17T07:02:23+00:00" }, { "name": "sebastian/global-state", @@ -3217,7 +3222,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -3263,7 +3268,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18 15:18:39" + "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/phpcpd", @@ -3313,7 +3318,7 @@ ], "description": "Copy/Paste Detector (CPD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2017-02-05 07:48:01" + "time": "2017-02-05T07:48:01+00:00" }, { "name": "sebastian/recursion-context", @@ -3366,7 +3371,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19 07:33:16" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -3408,7 +3413,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -3451,20 +3456,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.8.1", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d" + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", - "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", "shasum": "" }, "require": { @@ -3529,20 +3534,20 @@ "phpcs", "standards" ], - "time": "2017-03-01 22:17:45" + "time": "2017-05-22T02:43:20+00:00" }, { "name": "symfony/browser-kit", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8" + "reference": "c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/2fe0caa60c1a1dfeefd0425741182687a9b382b8", - "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1", + "reference": "c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1", "shasum": "" }, "require": { @@ -3559,7 +3564,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3586,20 +3591,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-04-12T14:14:56+00:00" }, { "name": "symfony/console", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c30243cc51f726812be3551316b109a2f5deaf8d" + "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c30243cc51f726812be3551316b109a2f5deaf8d", - "reference": "c30243cc51f726812be3551316b109a2f5deaf8d", + "url": "https://api.github.com/repos/symfony/console/zipball/70d2a29b2911cbdc91a7e268046c395278238b2e", + "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e", "shasum": "" }, "require": { @@ -3607,10 +3612,16 @@ "symfony/debug": "~2.8|~3.0", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, "require-dev": { "psr/log": "~1.0", + "symfony/config": "~3.3", + "symfony/dependency-injection": "~3.3", "symfony/event-dispatcher": "~2.8|~3.0", "symfony/filesystem": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", "symfony/process": "~2.8|~3.0" }, "suggest": { @@ -3622,7 +3633,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3649,20 +3660,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-04-04 14:33:42" + "time": "2017-06-02T19:24:58+00:00" }, { "name": "symfony/css-selector", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c" + "reference": "4d882dced7b995d5274293039370148e291808f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", - "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/4d882dced7b995d5274293039370148e291808f2", + "reference": "4d882dced7b995d5274293039370148e291808f2", "shasum": "" }, "require": { @@ -3671,7 +3682,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3702,20 +3713,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-05-01T15:01:29+00:00" }, { "name": "symfony/dom-crawler", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee" + "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/403944e294cf4ceb3b8447f54cbad88ea7b99cee", - "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", + "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", "shasum": "" }, "require": { @@ -3731,7 +3742,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3758,20 +3769,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-05-25T23:10:31+00:00" }, { "name": "symfony/finder", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a" + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/b20900ce5ea164cd9314af52725b0bb5a758217a", - "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a", + "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", "shasum": "" }, "require": { @@ -3780,7 +3791,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3807,7 +3818,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-03-20 09:32:19" + "time": "2017-06-01T21:01:25+00:00" }, { "name": "theseer/fdomdocument", @@ -3847,7 +3858,7 @@ ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2017-04-21 14:50:31" + "time": "2017-04-21T14:50:31+00:00" }, { "name": "webmozart/assert", @@ -3897,7 +3908,7 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "time": "2016-11-23T20:04:58+00:00" } ], "aliases": [], diff --git a/Hypercube/src/Controller/HypercubeController.php b/Hypercube/src/Controller/HypercubeController.php index 248d7c39..b65974b3 100644 --- a/Hypercube/src/Controller/HypercubeController.php +++ b/Hypercube/src/Controller/HypercubeController.php @@ -65,4 +65,29 @@ public function get(Request $request) return new Response($e->getMessage(), 500); } } + + public function options(Request $request) + { + return << . +@prefix owl: . +@prefix ebucore: . +@prefix fedora: . +@prefix islandora: . +@prefix rdfs: . + +<> a apix:Extension; + rdfs:label "Tesseract OCR Service"; + rdfs:comment "A service that runs OCR on tiffs"; + apix:exposesService islandora:OcrService; + apix:exposesServiceAt "svc:ocr"; + apix:bindsTo <#class> . + +<#class> owl:intersectionOf ( + fedora:Binary + [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff" ] +) . +EOD; + } + } diff --git a/Hypercube/src/app.php b/Hypercube/src/app.php index 9abeee45..4e3118cc 100644 --- a/Hypercube/src/app.php +++ b/Hypercube/src/app.php @@ -24,4 +24,6 @@ return $app['crayfish.apix_middleware']->before($request); }); +$app->options('/', "hypercube.controller:options"); + return $app; From bda6f3cecbc920887622185873a072a666a030dc Mon Sep 17 00:00:00 2001 From: dannylamb Date: Fri, 9 Jun 2017 18:58:19 +0000 Subject: [PATCH 2/7] Returing content-type on OPTIONS request and README update --- Hypercube/README.md | 14 ++++-- Hypercube/composer.lock | 48 +++++++++---------- .../src/Controller/HypercubeController.php | 10 +++- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/Hypercube/README.md b/Hypercube/README.md index c43f009c..e4f7ef6e 100644 --- a/Hypercube/README.md +++ b/Hypercube/README.md @@ -4,7 +4,7 @@ ## Introduction -[Tesseract][9] as a microservice. +[Tesseract][9] as a microservice for use with [Api-X][10]. ## Installation @@ -45,16 +45,21 @@ In order to work on larger images, be sure `post_max_size` is sufficiently large ## Usage -Hypercube only accepts one request, a `GET` containing the path a TIFF in Fedora. +Hypercube is meant for use with Api-X. It accepts only accepts one request, a `GET` with the URI of a Fedora resource in the `ApixLdpResource` header.. For example, suppose if you have a TIFF in Fedora at `http://localhost:8080/fcrepo/rest/foo/bar`. If running the PHP built-in server command described in the Installation section: ``` -$ curl -H "Authorization: Bearer blabhlahblah" "localhost:8888/foo/bar" +$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" "http://localhost:8888" ``` This will return the OCR generated from the TIFF in Fedora. Additional arguments to `tesseract` can be provided using the `X-Islandora-Args` header. For example, to change the page layout: ``` -$ curl -H "Authorization: Bearer blabhlahblah" -H "X-Islandora-Args: -psm 9" "localhost:8888/foo/bar" +$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "X-Islandora-Args: -psm 9" "http://localhost:8888" +``` + +But you're probably going to use Hypercube through Api-X, which exposes it as `svc:ocr`. Assuming your Api-X proxy is on port 8081, you can access the service with +``` +$ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:ocr" ``` ## Maintainers @@ -71,3 +76,4 @@ Current maintainers: [3]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square [4]: https://getcomposer.org/download/ [9]: https://github.com/tesseract-ocr +[10]: https://github.com/fcrepo4-labs/fcrepo-api-x diff --git a/Hypercube/composer.lock b/Hypercube/composer.lock index 82bf1c77..ee006e0d 100644 --- a/Hypercube/composer.lock +++ b/Hypercube/composer.lock @@ -1656,16 +1656,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + "reference": "f29dca382a6485c3cbe6379f0c61230167681937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937", "shasum": "" }, "require": { @@ -1677,7 +1677,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1711,20 +1711,20 @@ "portable", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2017-06-09T14:24:12+00:00" }, { "name": "symfony/polyfill-php56", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c" + "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/1dd42b9b89556f18092f3d1ada22cb05ac85383c", - "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/bc0b7d6cb36b10cfabb170a3e359944a95174929", + "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929", "shasum": "" }, "require": { @@ -1734,7 +1734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1767,20 +1767,20 @@ "portable", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2017-06-09T08:25:21+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2" + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", - "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/032fd647d5c11a9ceab8ee8747e13b5448e93874", + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874", "shasum": "" }, "require": { @@ -1790,7 +1790,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1826,20 +1826,20 @@ "portable", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2017-06-09T14:24:12+00:00" }, { "name": "symfony/polyfill-util", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb" + "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/746bce0fca664ac0a575e465f65c6643faddf7fb", - "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", + "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", "shasum": "" }, "require": { @@ -1848,7 +1848,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1878,7 +1878,7 @@ "polyfill", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2017-06-09T08:25:21+00:00" }, { "name": "symfony/property-access", diff --git a/Hypercube/src/Controller/HypercubeController.php b/Hypercube/src/Controller/HypercubeController.php index b65974b3..77e87a14 100644 --- a/Hypercube/src/Controller/HypercubeController.php +++ b/Hypercube/src/Controller/HypercubeController.php @@ -59,7 +59,7 @@ public function get(Request $request) return new StreamedResponse( $this->cmd->execute($cmd_string, $body), 200, - array('Content-Type' => 'text/plain') + ['Content-Type' => 'text/plain'] ); } catch (\RuntimeException $e) { return new Response($e->getMessage(), 500); @@ -68,7 +68,7 @@ public function get(Request $request) public function options(Request $request) { - return << . @prefix owl: . @prefix ebucore: . @@ -88,6 +88,12 @@ public function options(Request $request) [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff" ] ) . EOD; + + return new Response( + $rdf, + 200, + ['Content-Type' => 'text/turtle'] + ); } } From e1420dd89619990c487f783cd18c750a29bd896d Mon Sep 17 00:00:00 2001 From: dannylamb Date: Mon, 12 Jun 2017 17:36:43 +0000 Subject: [PATCH 3/7] OPTIONS for Houdini --- Houdini/composer.lock | 373 +++++++++--------- Houdini/src/Controller/HoudiniController.php | 26 ++ Houdini/src/app.php | 18 +- Houdini/static/convert.ttl | 18 + Houdini/static/identify.ttl | 18 + .../Houdini/Tests/HoudiniControllerTest.php | 58 +-- .../src/Controller/HypercubeController.php | 29 +- Hypercube/static/hypercube.ttl | 18 + .../Tests/HypercubeControllerTest.php | 19 + 9 files changed, 316 insertions(+), 261 deletions(-) create mode 100644 Houdini/static/convert.ttl create mode 100644 Houdini/static/identify.ttl create mode 100644 Hypercube/static/hypercube.ttl diff --git a/Houdini/composer.lock b/Houdini/composer.lock index 62ddbc2c..a94ff36e 100644 --- a/Houdini/composer.lock +++ b/Houdini/composer.lock @@ -4,7 +4,6 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ba6e4ffeab91aeb82a42212f6e69928b", "content-hash": "4268aef6675912b0aa07f0e0f331185c", "packages": [ { @@ -73,7 +72,7 @@ "docblock", "parser" ], - "time": "2017-02-24 16:22:25" + "time": "2017-02-24T16:22:25+00:00" }, { "name": "doctrine/cache", @@ -143,7 +142,7 @@ "cache", "caching" ], - "time": "2016-10-29 11:16:17" + "time": "2016-10-29T11:16:17+00:00" }, { "name": "doctrine/collections", @@ -210,7 +209,7 @@ "collections", "iterator" ], - "time": "2017-01-03 10:49:41" + "time": "2017-01-03T10:49:41+00:00" }, { "name": "doctrine/common", @@ -283,7 +282,7 @@ "persistence", "spl" ], - "time": "2017-01-13 14:02:13" + "time": "2017-01-13T14:02:13+00:00" }, { "name": "doctrine/dbal", @@ -354,7 +353,7 @@ "persistence", "queryobject" ], - "time": "2017-02-08 12:53:47" + "time": "2017-02-08T12:53:47+00:00" }, { "name": "doctrine/inflector", @@ -421,7 +420,7 @@ "singularize", "string" ], - "time": "2015-11-06 14:35:42" + "time": "2015-11-06T14:35:42+00:00" }, { "name": "doctrine/lexer", @@ -475,7 +474,7 @@ "lexer", "parser" ], - "time": "2014-09-09 13:34:57" + "time": "2014-09-09T13:34:57+00:00" }, { "name": "easyrdf/easyrdf", @@ -537,7 +536,7 @@ "rdfa", "sparql" ], - "time": "2015-02-27 09:45:49" + "time": "2015-02-27T09:45:49+00:00" }, { "name": "guzzlehttp/guzzle", @@ -599,7 +598,7 @@ "rest", "web service" ], - "time": "2017-02-28 22:50:30" + "time": "2017-02-28T22:50:30+00:00" }, { "name": "guzzlehttp/promises", @@ -650,7 +649,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20 10:07:11" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", @@ -715,7 +714,7 @@ "uri", "url" ], - "time": "2017-03-20 17:10:46" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "islandora/chullo", @@ -771,7 +770,7 @@ ], "description": "A PHP client for interacting with a Fedora 4 server.", "homepage": "https://github.com/islandora-claw/chullo", - "time": "2017-04-12 20:14:38" + "time": "2017-04-12T20:14:38+00:00" }, { "name": "islandora/crayfish-commons", @@ -779,12 +778,12 @@ "source": { "type": "git", "url": "https://github.com/Islandora-CLAW/Crayfish-Commons.git", - "reference": "3957f46bb560909caa8d1962b20ab9312fdf22b9" + "reference": "f6532974f83745320906ea9b143ef3b1413795d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Islandora-CLAW/Crayfish-Commons/zipball/3957f46bb560909caa8d1962b20ab9312fdf22b9", - "reference": "3957f46bb560909caa8d1962b20ab9312fdf22b9", + "url": "https://api.github.com/repos/Islandora-CLAW/Crayfish-Commons/zipball/f6532974f83745320906ea9b143ef3b1413795d9", + "reference": "f6532974f83745320906ea9b143ef3b1413795d9", "shasum": "" }, "require": { @@ -828,7 +827,7 @@ } ], "description": "Shared code amongst Islandora Crayfish microservices", - "time": "2017-04-21 21:41:55" + "time": "2017-06-07 01:23:03" }, { "name": "ml/iri", @@ -875,7 +874,7 @@ "uri", "url" ], - "time": "2014-01-21 13:43:39" + "time": "2014-01-21T13:43:39+00:00" }, { "name": "ml/json-ld", @@ -924,7 +923,7 @@ "JSON-LD", "jsonld" ], - "time": "2016-10-10 08:57:56" + "time": "2016-10-10T08:57:56+00:00" }, { "name": "monolog/monolog", @@ -1002,7 +1001,7 @@ "logging", "psr-3" ], - "time": "2017-03-13 07:08:03" + "time": "2017-03-13T07:08:03+00:00" }, { "name": "namshi/jose", @@ -1065,7 +1064,7 @@ "jwt", "token" ], - "time": "2016-12-05 07:27:31" + "time": "2016-12-05T07:27:31+00:00" }, { "name": "paragonie/random_compat", @@ -1113,7 +1112,7 @@ "pseudorandom", "random" ], - "time": "2017-03-13 16:27:32" + "time": "2017-03-13T16:27:32+00:00" }, { "name": "pimple/pimple", @@ -1159,7 +1158,7 @@ "container", "dependency injection" ], - "time": "2015-09-11 15:10:35" + "time": "2015-09-11T15:10:35+00:00" }, { "name": "psr/http-message", @@ -1209,7 +1208,7 @@ "request", "response" ], - "time": "2016-08-06 14:39:51" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -1256,20 +1255,20 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "silex/silex", - "version": "v2.0.4", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "49ca08d853731d1635374e5019c8696cfd53c161" + "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/49ca08d853731d1635374e5019c8696cfd53c161", - "reference": "49ca08d853731d1635374e5019c8696cfd53c161", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/d5a9d9af14a1424ddecc3da481769cf64e7d3b34", + "reference": "d5a9d9af14a1424ddecc3da481769cf64e7d3b34", "shasum": "" }, "require": { @@ -1301,7 +1300,7 @@ "symfony/intl": "~2.8|^3.0", "symfony/monolog-bridge": "~2.8|^3.0", "symfony/options-resolver": "~2.8|^3.0", - "symfony/phpunit-bridge": "~2.8|^3.0", + "symfony/phpunit-bridge": "^3.2", "symfony/process": "~2.8|^3.0", "symfony/security": "~2.8|^3.0", "symfony/serializer": "~2.8|^3.0", @@ -1309,12 +1308,13 @@ "symfony/twig-bridge": "~2.8|^3.0", "symfony/validator": "~2.8|^3.0", "symfony/var-dumper": "~2.8|^3.0", - "twig/twig": "~1.27|~2.0" + "symfony/web-link": "^3.3", + "twig/twig": "~1.28|~2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1341,20 +1341,20 @@ "keywords": [ "microframework" ], - "time": "2016-11-06 18:09:06" + "time": "2017-05-03T15:21:42+00:00" }, { "name": "symfony/debug", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "56f613406446a4a0a031475cfd0a01751de22659" + "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/56f613406446a4a0a031475cfd0a01751de22659", - "reference": "56f613406446a4a0a031475cfd0a01751de22659", + "url": "https://api.github.com/repos/symfony/debug/zipball/e9c50482841ef696e8fa1470d950a79c8921f45d", + "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d", "shasum": "" }, "require": { @@ -1365,13 +1365,12 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.8|~3.0", "symfony/http-kernel": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1398,29 +1397,32 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-03-28 21:38:24" + "time": "2017-06-01T21:01:25+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca" + "reference": "4054a102470665451108f9b59305c79176ef98f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/154bb1ef7b0e42ccc792bd53edbce18ed73440ca", - "reference": "154bb1ef7b0e42ccc792bd53edbce18ed73440ca", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4054a102470665451108f9b59305c79176ef98f0", + "reference": "4054a102470665451108f9b59305c79176ef98f0", "shasum": "" }, "require": { "php": ">=5.5.9" }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", "symfony/expression-language": "~2.8|~3.0", "symfony/stopwatch": "~2.8|~3.0" }, @@ -1431,7 +1433,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1458,7 +1460,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-04-04 07:26:27" + "time": "2017-06-04T18:15:29+00:00" }, { "name": "symfony/http-foundation", @@ -1511,20 +1513,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-03-04 12:23:14" + "time": "2017-03-04T12:23:14+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.2.7", + "version": "v3.2.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e" + "reference": "7dacc7b120cdfa5abfcc911b93a3e4ba2ffba0e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8285ab5faf1306b1a5ebcf287fe91c231a6de88e", - "reference": "8285ab5faf1306b1a5ebcf287fe91c231a6de88e", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/7dacc7b120cdfa5abfcc911b93a3e4ba2ffba0e9", + "reference": "7dacc7b120cdfa5abfcc911b93a3e4ba2ffba0e9", "shasum": "" }, "require": { @@ -1593,20 +1595,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-04-05 12:52:03" + "time": "2017-05-29T19:32:04+00:00" }, { "name": "symfony/inflector", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/inflector.git", - "reference": "4ff27abb356742aa2495ad87a79d724c397ee5c4" + "reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/inflector/zipball/4ff27abb356742aa2495ad87a79d724c397ee5c4", - "reference": "4ff27abb356742aa2495ad87a79d724c397ee5c4", + "url": "https://api.github.com/repos/symfony/inflector/zipball/aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb", + "reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb", "shasum": "" }, "require": { @@ -1615,7 +1617,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1650,20 +1652,20 @@ "symfony", "words" ], - "time": "2017-02-20 13:34:33" + "time": "2017-04-12T14:14:56+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + "reference": "f29dca382a6485c3cbe6379f0c61230167681937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937", "shasum": "" }, "require": { @@ -1675,7 +1677,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1709,20 +1711,20 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-06-09T14:24:12+00:00" }, { "name": "symfony/polyfill-php56", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c" + "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/1dd42b9b89556f18092f3d1ada22cb05ac85383c", - "reference": "1dd42b9b89556f18092f3d1ada22cb05ac85383c", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/bc0b7d6cb36b10cfabb170a3e359944a95174929", + "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929", "shasum": "" }, "require": { @@ -1732,7 +1734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1765,20 +1767,20 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-06-09T08:25:21+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2" + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", - "reference": "13ce343935f0f91ca89605a2f6ca6f5c2f3faac2", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/032fd647d5c11a9ceab8ee8747e13b5448e93874", + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874", "shasum": "" }, "require": { @@ -1788,7 +1790,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1824,20 +1826,20 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-06-09T14:24:12+00:00" }, { "name": "symfony/polyfill-util", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb" + "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/746bce0fca664ac0a575e465f65c6643faddf7fb", - "reference": "746bce0fca664ac0a575e465f65c6643faddf7fb", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", + "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", "shasum": "" }, "require": { @@ -1846,7 +1848,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1876,20 +1878,20 @@ "polyfill", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2017-06-09T08:25:21+00:00" }, { "name": "symfony/property-access", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "61eaebce4a9fd785f2fb469a661490fcff27b7bf" + "reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/61eaebce4a9fd785f2fb469a661490fcff27b7bf", - "reference": "61eaebce4a9fd785f2fb469a661490fcff27b7bf", + "url": "https://api.github.com/repos/symfony/property-access/zipball/70bbfe28f77070d41957495bc6fed34f139fe6f7", + "reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7", "shasum": "" }, "require": { @@ -1906,7 +1908,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1944,36 +1946,39 @@ "property path", "reflection" ], - "time": "2017-03-21 21:44:32" + "time": "2017-06-02T09:51:43+00:00" }, { "name": "symfony/routing", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee" + "reference": "39804eeafea5cca851946e1eed122eb94459fdb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d6605f9a5767bc5bc4895e1c762ba93964608aee", - "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee", + "url": "https://api.github.com/repos/symfony/routing/zipball/39804eeafea5cca851946e1eed122eb94459fdb4", + "reference": "39804eeafea5cca851946e1eed122eb94459fdb4", "shasum": "" }, "require": { "php": ">=5.5.9" }, "conflict": { - "symfony/config": "<2.8" + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.3" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", "symfony/expression-language": "~2.8|~3.0", "symfony/http-foundation": "~2.8|~3.0", - "symfony/yaml": "~2.8|~3.0" + "symfony/yaml": "~3.3" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -1986,7 +1991,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2019,20 +2024,20 @@ "uri", "url" ], - "time": "2017-03-02 15:58:09" + "time": "2017-06-02T09:51:43+00:00" }, { "name": "symfony/security", - "version": "v3.2.7", + "version": "v3.2.9", "source": { "type": "git", "url": "https://github.com/symfony/security.git", - "reference": "95199ced4d4b79b96dd257350f88d56497bc15f3" + "reference": "1370810e5474b6489590c0eab614fd06a7499f26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security/zipball/95199ced4d4b79b96dd257350f88d56497bc15f3", - "reference": "95199ced4d4b79b96dd257350f88d56497bc15f3", + "url": "https://api.github.com/repos/symfony/security/zipball/1370810e5474b6489590c0eab614fd06a7499f26", + "reference": "1370810e5474b6489590c0eab614fd06a7499f26", "shasum": "" }, "require": { @@ -2097,20 +2102,20 @@ ], "description": "Symfony Security Component", "homepage": "https://symfony.com", - "time": "2017-04-04 15:30:56" + "time": "2017-05-21T07:39:50+00:00" }, { "name": "symfony/yaml", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621" + "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "url": "https://api.github.com/repos/symfony/yaml/zipball/9752a30000a8ca9f4b34b5227d15d0101b96b063", + "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063", "shasum": "" }, "require": { @@ -2125,7 +2130,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -2152,7 +2157,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-03-20 09:45:15" + "time": "2017-06-02T22:05:06+00:00" } ], "packages-dev": [ @@ -2208,7 +2213,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "myclabs/deep-copy", @@ -2250,7 +2255,7 @@ "object", "object graph" ], - "time": "2017-04-12 18:52:22" + "time": "2017-04-12T18:52:22+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -2304,7 +2309,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -2349,7 +2354,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2016-09-30T07:12:33+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -2396,7 +2401,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "time": "2016-11-25T06:54:22+00:00" }, { "name": "phpspec/prophecy", @@ -2459,7 +2464,7 @@ "spy", "stub" ], - "time": "2017-03-02 20:05:34" + "time": "2017-03-02T20:05:34+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2522,7 +2527,7 @@ "testing", "xunit" ], - "time": "2017-04-02 07:44:40" + "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2569,7 +2574,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -2610,7 +2615,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -2659,7 +2664,7 @@ "keywords": [ "timer" ], - "time": "2017-02-26 11:10:40" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", @@ -2708,20 +2713,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27 10:12:30" + "time": "2017-02-27T10:12:30+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.19", + "version": "5.7.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1" + "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69c4f49ff376af2692bad9cebd883d17ebaa98a1", - "reference": "69c4f49ff376af2692bad9cebd883d17ebaa98a1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cb94a5f8c07a03c8b7527ed7468a2926203f58b", + "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b", "shasum": "" }, "require": { @@ -2739,7 +2744,7 @@ "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "^1.2.4", - "sebastian/diff": "~1.2", + "sebastian/diff": "^1.4.3", "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", "sebastian/global-state": "^1.1", @@ -2790,7 +2795,7 @@ "testing", "xunit" ], - "time": "2017-04-03 02:22:27" + "time": "2017-05-22T07:42:55+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -2849,7 +2854,7 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "time": "2016-12-08T20:27:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2894,7 +2899,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04 06:30:41" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", @@ -2958,27 +2963,27 @@ "compare", "equality" ], - "time": "2017-01-29 09:50:25" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -3010,7 +3015,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", @@ -3060,7 +3065,7 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", @@ -3127,7 +3132,7 @@ "export", "exporter" ], - "time": "2016-11-19 08:54:04" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/finder-facade", @@ -3166,7 +3171,7 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2016-02-17 07:02:23" + "time": "2016-02-17T07:02:23+00:00" }, { "name": "sebastian/global-state", @@ -3217,7 +3222,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -3263,7 +3268,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18 15:18:39" + "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/phpcpd", @@ -3313,7 +3318,7 @@ ], "description": "Copy/Paste Detector (CPD) for PHP code.", "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2017-02-05 07:48:01" + "time": "2017-02-05T07:48:01+00:00" }, { "name": "sebastian/recursion-context", @@ -3366,7 +3371,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19 07:33:16" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -3408,7 +3413,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -3451,20 +3456,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.8.1", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d" + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", - "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", "shasum": "" }, "require": { @@ -3529,20 +3534,20 @@ "phpcs", "standards" ], - "time": "2017-03-01 22:17:45" + "time": "2017-05-22T02:43:20+00:00" }, { "name": "symfony/browser-kit", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8" + "reference": "c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/2fe0caa60c1a1dfeefd0425741182687a9b382b8", - "reference": "2fe0caa60c1a1dfeefd0425741182687a9b382b8", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1", + "reference": "c2c8ceb1aa9dab9eae54e9150e6a588ce3e53be1", "shasum": "" }, "require": { @@ -3559,7 +3564,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3586,20 +3591,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-04-12T14:14:56+00:00" }, { "name": "symfony/console", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c30243cc51f726812be3551316b109a2f5deaf8d" + "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c30243cc51f726812be3551316b109a2f5deaf8d", - "reference": "c30243cc51f726812be3551316b109a2f5deaf8d", + "url": "https://api.github.com/repos/symfony/console/zipball/70d2a29b2911cbdc91a7e268046c395278238b2e", + "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e", "shasum": "" }, "require": { @@ -3607,10 +3612,16 @@ "symfony/debug": "~2.8|~3.0", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, "require-dev": { "psr/log": "~1.0", + "symfony/config": "~3.3", + "symfony/dependency-injection": "~3.3", "symfony/event-dispatcher": "~2.8|~3.0", "symfony/filesystem": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", "symfony/process": "~2.8|~3.0" }, "suggest": { @@ -3622,7 +3633,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3649,20 +3660,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-04-04 14:33:42" + "time": "2017-06-02T19:24:58+00:00" }, { "name": "symfony/css-selector", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c" + "reference": "4d882dced7b995d5274293039370148e291808f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", - "reference": "a48f13dc83c168f1253a5d2a5a4fb46c36244c4c", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/4d882dced7b995d5274293039370148e291808f2", + "reference": "4d882dced7b995d5274293039370148e291808f2", "shasum": "" }, "require": { @@ -3671,7 +3682,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3702,20 +3713,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-05-01T15:01:29+00:00" }, { "name": "symfony/dom-crawler", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee" + "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/403944e294cf4ceb3b8447f54cbad88ea7b99cee", - "reference": "403944e294cf4ceb3b8447f54cbad88ea7b99cee", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", + "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", "shasum": "" }, "require": { @@ -3731,7 +3742,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3758,20 +3769,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-02-21 09:12:04" + "time": "2017-05-25T23:10:31+00:00" }, { "name": "symfony/finder", - "version": "v3.2.7", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a" + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/b20900ce5ea164cd9314af52725b0bb5a758217a", - "reference": "b20900ce5ea164cd9314af52725b0bb5a758217a", + "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", "shasum": "" }, "require": { @@ -3780,7 +3791,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3807,7 +3818,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-03-20 09:32:19" + "time": "2017-06-01T21:01:25+00:00" }, { "name": "theseer/fdomdocument", @@ -3847,7 +3858,7 @@ ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2017-04-21 14:50:31" + "time": "2017-04-21T14:50:31+00:00" }, { "name": "webmozart/assert", @@ -3897,7 +3908,7 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "time": "2016-11-23T20:04:58+00:00" } ], "aliases": [], diff --git a/Houdini/src/Controller/HoudiniController.php b/Houdini/src/Controller/HoudiniController.php index 76a93ea8..a28bbc5c 100644 --- a/Houdini/src/Controller/HoudiniController.php +++ b/Houdini/src/Controller/HoudiniController.php @@ -6,6 +6,8 @@ use Islandora\Crayfish\Commons\CmdExecuteService; use Islandora\Crayfish\Commons\ApixFedoraResourceRetriever; use Psr\Http\Message\ResponseInterface; +use Silex\Application; +use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\StreamedResponse; @@ -64,6 +66,18 @@ public function __construct( $this->log = $log; } + /** + * @return \Symfony\Component\HttpFoundation\Response + */ + public function convertOptions() + { + return new BinaryFileResponse( + __DIR__ . "/../../static/convert.ttl", + 200, + ['Content-Type' => 'text/turtle'] + ); + } + /** * @param \Symfony\Component\HttpFoundation\Request $request * @return \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\StreamedResponse @@ -116,6 +130,18 @@ public function convert(Request $request) } } + /** + * @return \Symfony\Component\HttpFoundation\Response + */ + public function identifyOptions() + { + return new BinaryFileResponse( + __DIR__ . "/../../static/identify.ttl", + 200, + ['Content-Type' => 'text/turtle'] + ); + } + /** * @param \Symfony\Component\HttpFoundation\Request $request * @return \Symfony\Component\HttpFoundation\Response|\Symfony\Component\HttpFoundation\StreamedResponse diff --git a/Houdini/src/app.php b/Houdini/src/app.php index 947ccaec..dd9244a3 100644 --- a/Houdini/src/app.php +++ b/Houdini/src/app.php @@ -23,12 +23,16 @@ ); }; -$app->before(function (Request $request, Application $app) { - return $app['crayfish.apix_middleware']->before($request); -}); - -$app->get('/convert', "houdini.controller:convert"); - -$app->get('/identify', "houdini.controller:identify"); +$app->options('/convert', "houdini.controller:convertOptions"); +$app->get('/convert', "houdini.controller:convert") + ->before(function (Request $request, Application $app) { + return $app['crayfish.apix_middleware']->before($request); + }); + +$app->options('/identify', "houdini.controller:identifyOptions"); +$app->get('/identify', "houdini.controller:identify") + ->before(function (Request $request, Application $app) { + return $app['crayfish.apix_middleware']->before($request); + }); return $app; diff --git a/Houdini/static/convert.ttl b/Houdini/static/convert.ttl new file mode 100644 index 00000000..952d4c2b --- /dev/null +++ b/Houdini/static/convert.ttl @@ -0,0 +1,18 @@ +@prefix apix: . +@prefix owl: . +@prefix ebucore: . +@prefix fedora: . +@prefix islandora: . +@prefix rdfs: . + +<> a apix:Extension; + rdfs:label "Image Conversion Service"; + rdfs:comment "imagemagick's convert as a microservice"; + apix:exposesService islandora:ConvertService; + apix:exposesServiceAt "svc:convert"; + apix:bindsTo <#class> . + +<#class> owl:intersectionOf ( + fedora:Binary + [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff", "image/jp2", "image/jpeg", "image/png", "image/gif", "image/bmp" ] +) . diff --git a/Houdini/static/identify.ttl b/Houdini/static/identify.ttl new file mode 100644 index 00000000..e1278794 --- /dev/null +++ b/Houdini/static/identify.ttl @@ -0,0 +1,18 @@ +@prefix apix: . +@prefix owl: . +@prefix ebucore: . +@prefix fedora: . +@prefix islandora: . +@prefix rdfs: . + +<> a apix:Extension; + rdfs:label "Image Identification Service"; + rdfs:comment "imagemagick's identify as a microservice"; + apix:exposesService islandora:IdentifyService; + apix:exposesServiceAt "svc:identify"; + apix:bindsTo <#class> . + +<#class> owl:intersectionOf ( + fedora:Binary + [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff", "image/jp2", "image/jpeg", "image/png", "image/gif", "image/bmp" ] +) . diff --git a/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php b/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php index 09bec098..f7a7e5e4 100644 --- a/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php +++ b/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php @@ -13,70 +13,32 @@ class HoudiniControllerTest extends \PHPUnit_Framework_TestCase { -/* - public function testReturnsFedoraError() + public function testOptions() { - // Mock a CmdExecuteService to create a controller. - $prophecy = $this->prophesize(CmdExecuteService::class); - $mock_service = $prophecy->reveal(); - - // Mock a Fedora response. - $prophecy = $this->prophesize(ResponseInterface::class); - $prophecy->getBody()->willReturn(); - $prophecy->getHeaders()->willReturn(); - $prophecy->getStatusCode()->willReturn(401); - $prophecy->getReasonPhrase()->willReturn("Unauthorized"); - $mock_fedora_response = $prophecy->reveal(); - - $prophecy = $this->prophesize(ApixFedoraResourceRetriever::class); - $prophecy->getFedoraResource(Argument::any())->willReturn($mock_fedora_response); - $mock_apix_retriever = $prophecy->reveal(); - + $mock_service = $this->prophesize(CmdExecuteService::class)->reveal(); $controller = new HoudiniController( $mock_service, - $mock_apix_retriever, [], '', 'convert', $this->prophesize(Logger::class)->reveal() ); - // Create a Request. - $request = Request::create( - "/", - "GET" - ); - $request->headers->set('Authorization', 'some_token'); - $request->headers->set('Apix-Ldp-Resource', 'http://localhost:8080/fcrepo/rest/foo'); - - // Test convert - $response = $controller->convert($request); - - print_r($response->getContent()); - + $response = $controller->identifyOptions(); + $this->assertTrue($response->getStatusCode() == 200, 'Identify OPTIONS should return 200'); $this->assertTrue( - $response->getStatusCode() == 401, - "Response code must be Fedora response code" - ); - $this->assertTrue( - $response->getContent() == "Unauthorized", - "Response must return Fedora's reason phrase" + $response->headers->get('Content-Type') == 'text/turtle', + 'Identify OPTIONS should return turtle' ); - // Test identify - $response = $controller->identify($request); - - $this->assertTrue( - $response->getStatusCode() == 401, - "Response code must be Fedora response code" - ); + $response = $controller->convertOptions(); + $this->assertTrue($response->getStatusCode() == 200, 'Convert OPTIONS should return 200'); $this->assertTrue( - $response->getContent() == "Unauthorized", - "Response must return Fedora's reason phrase" + $response->headers->get('Content-Type') == 'text/turtle', + 'Convert OPTIONS should return turtle' ); } -*/ public function testErrorReturns500() { // Mock a CmdExecuteService to create a controller. diff --git a/Hypercube/src/Controller/HypercubeController.php b/Hypercube/src/Controller/HypercubeController.php index 77e87a14..ac5bf165 100644 --- a/Hypercube/src/Controller/HypercubeController.php +++ b/Hypercube/src/Controller/HypercubeController.php @@ -5,6 +5,7 @@ use GuzzleHttp\Psr7\StreamWrapper; use Islandora\Crayfish\Commons\CmdExecuteService; use Psr\Http\Message\ResponseInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\StreamedResponse; @@ -66,34 +67,12 @@ public function get(Request $request) } } - public function options(Request $request) + public function options() { - $rdf = << . -@prefix owl: . -@prefix ebucore: . -@prefix fedora: . -@prefix islandora: . -@prefix rdfs: . - -<> a apix:Extension; - rdfs:label "Tesseract OCR Service"; - rdfs:comment "A service that runs OCR on tiffs"; - apix:exposesService islandora:OcrService; - apix:exposesServiceAt "svc:ocr"; - apix:bindsTo <#class> . - -<#class> owl:intersectionOf ( - fedora:Binary - [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff" ] -) . -EOD; - - return new Response( - $rdf, + return new BinaryFileResponse( + __DIR__ . "/../../static/hypercube.ttl", 200, ['Content-Type' => 'text/turtle'] ); } - } diff --git a/Hypercube/static/hypercube.ttl b/Hypercube/static/hypercube.ttl new file mode 100644 index 00000000..cca017e8 --- /dev/null +++ b/Hypercube/static/hypercube.ttl @@ -0,0 +1,18 @@ +@prefix apix: . +@prefix owl: . +@prefix ebucore: . +@prefix fedora: . +@prefix islandora: . +@prefix rdfs: . + +<> a apix:Extension; + rdfs:label "Tesseract OCR Service"; + rdfs:comment "A service that runs OCR on tiffs"; + apix:exposesService islandora:OcrService; + apix:exposesServiceAt "svc:ocr"; + apix:bindsTo <#class> . + +<#class> owl:intersectionOf ( + fedora:Binary + [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff" ] +) . diff --git a/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php b/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php index 91a4260d..dbed7d4b 100644 --- a/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php +++ b/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php @@ -14,6 +14,25 @@ */ class HypercubeControllerTest extends \PHPUnit_Framework_TestCase { + /** + * + */ + public function testOptions() + { + $mock_service = $this->prophesize(CmdExecuteService::class)->reveal(); + $controller = new HypercubeController( + $mock_service, + '' + ); + + $response = $controller->options(); + $this->assertTrue($response->getStatusCode() == 200, 'Identify OPTIONS should return 200'); + $this->assertTrue( + $response->headers->get('Content-Type') == 'text/turtle', + 'Identify OPTIONS should return turtle' + ); + } + /** * @covers ::get */ From 983e18c0e93f130723f5bbaee3c912bfa7a52d5a Mon Sep 17 00:00:00 2001 From: dannylamb Date: Mon, 12 Jun 2017 18:10:30 +0000 Subject: [PATCH 4/7] Better testing annotations, README update. --- Houdini/README.md | 9 +++++---- Houdini/src/Controller/HoudiniController.php | 5 ++--- .../Houdini/Tests/HoudiniControllerTest.php | 16 ++++++++++++++++ .../Hypercube/Tests/HypercubeControllerTest.php | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Houdini/README.md b/Houdini/README.md index b7b84404..fab41c21 100644 --- a/Houdini/README.md +++ b/Houdini/README.md @@ -30,7 +30,8 @@ Houdini sets up two endpoints: - /identify/ - /convert/ -Houdini only accepts `GET` requests containing the path an image in Fedora at both of these endpoints. +Houdini is meant for use wtih Api-X, and accepts `GET` and `OPTIONS` requests to those endpoints. The `OPTIONS` requests are for use with the Api-X service loading mechanism, and return RDF describing the +service for Api-X. The `GET` requests are used to execute the services, and must contain the uri to an image in Fedora in the `ApixLdpResource` header. ### Identify @@ -38,7 +39,7 @@ This runs the imagemagick identify command on the specified resource and returns For example, suppose if you have a TIFF in Fedora at `http://localhost:8080/fcrepo/rest/foo/bar`. If running the PHP built-in server command described in the Installation section: ``` -$ curl -H "Authorization: Bearer blabhlahblah" "localhost:8888/identify/foo/bar" +$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" "localhost:8888/identify" ``` ### Convert @@ -47,14 +48,14 @@ This runs the imagemagick convert command on the specified resource. The output For example, suppose if you have an image in Fedora at `http://localhost:8080/fcrepo/rest/foo/bar`. If running the PHP built-in server command described in the Installation section: ``` -$ curl -H "Authorization: Bearer blabhlahblah" -H "Accept: image/png" "localhost:8888/convert/foo/bar" +$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "Accept: image/png" "localhost:8888/convert/foo/bar" ``` This will return the TIFF converted into a PNG file. Additional arguments can be specified using the X-Islandora-Args header. For example to resize to 10% the size use: ``` -$ curl -H "Authorization: Bearer blabhlahblah" -H "X-Islandora-Args: -resize 10%" "localhost:8888/convert/foo/bar" +$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "X-Islandora-Args: -resize 10%" "localhost:8888/convert/foo/bar" ``` ## Maintainers diff --git a/Houdini/src/Controller/HoudiniController.php b/Houdini/src/Controller/HoudiniController.php index a28bbc5c..e044739a 100644 --- a/Houdini/src/Controller/HoudiniController.php +++ b/Houdini/src/Controller/HoudiniController.php @@ -6,7 +6,6 @@ use Islandora\Crayfish\Commons\CmdExecuteService; use Islandora\Crayfish\Commons\ApixFedoraResourceRetriever; use Psr\Http\Message\ResponseInterface; -use Silex\Application; use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -67,7 +66,7 @@ public function __construct( } /** - * @return \Symfony\Component\HttpFoundation\Response + * @return \Symfony\Component\HttpFoundation\BinaryFileResponse */ public function convertOptions() { @@ -131,7 +130,7 @@ public function convert(Request $request) } /** - * @return \Symfony\Component\HttpFoundation\Response + * @return \Symfony\Component\HttpFoundation\BinaryFileResponse */ public function identifyOptions() { diff --git a/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php b/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php index f7a7e5e4..94f8c842 100644 --- a/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php +++ b/Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php @@ -11,8 +11,16 @@ use Symfony\Component\HttpFoundation\Request; use Monolog\Logger; +/** + * @coversDefaultClass \Islandora\Crayfish\Houdini\Controller\HoudiniController + */ class HoudiniControllerTest extends \PHPUnit_Framework_TestCase { + + /** + * @covers ::identifyOptions + * @covers ::convertOptions + */ public function testOptions() { $mock_service = $this->prophesize(CmdExecuteService::class)->reveal(); @@ -39,6 +47,10 @@ public function testOptions() ); } + /** + * @covers ::identify + * @covers ::convert + */ public function testErrorReturns500() { // Mock a CmdExecuteService to create a controller. @@ -85,6 +97,10 @@ public function testErrorReturns500() $this->assertTrue($response->getContent() == "ERROR", "Response must return exception's message"); } + /** + * @covers ::identify + * @covers ::convert + */ public function testSuccessReturns200() { // Mock a stream body for a Fedora response. diff --git a/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php b/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php index dbed7d4b..82810ff3 100644 --- a/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php +++ b/Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php @@ -15,7 +15,7 @@ class HypercubeControllerTest extends \PHPUnit_Framework_TestCase { /** - * + * @covers ::options */ public function testOptions() { From ed8902e000b87cd76126ba8bed333f220fda7f7e Mon Sep 17 00:00:00 2001 From: dannylamb Date: Mon, 12 Jun 2017 18:13:34 +0000 Subject: [PATCH 5/7] MOAR README --- Houdini/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Houdini/README.md b/Houdini/README.md index fab41c21..de956667 100644 --- a/Houdini/README.md +++ b/Houdini/README.md @@ -42,6 +42,11 @@ For example, suppose if you have a TIFF in Fedora at `http://localhost:8080/fcre $ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" "localhost:8888/identify" ``` +But you're probably going to use Houdini through Api-X, which exposes this service as `svc:indentify`. Assuming your Api-X proxy is on port 8081, you can access the service with +``` +$ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:identify" +``` + ### Convert This runs the imagemagick convert command on the specified resource. The output format is decided by the Accept header sent along with the request. A default output format can also be selected in the configuration. @@ -58,6 +63,11 @@ Additional arguments can be specified using the X-Islandora-Args header. For exa $ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "X-Islandora-Args: -resize 10%" "localhost:8888/convert/foo/bar" ``` +But you're probably going to use Houdini through Api-X, which exposes this service as `svc:convert`. Assuming your Api-X proxy is on port 8081, you can access the service with +``` +$ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:convert" +``` + ## Maintainers Current maintainers: From 9b6173960920f233edab328a998f357ba0001c87 Mon Sep 17 00:00:00 2001 From: dannylamb Date: Mon, 12 Jun 2017 18:56:15 +0000 Subject: [PATCH 6/7] README typos --- Houdini/README.md | 8 ++++---- Hypercube/README.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Houdini/README.md b/Houdini/README.md index de956667..ef7d762d 100644 --- a/Houdini/README.md +++ b/Houdini/README.md @@ -30,8 +30,8 @@ Houdini sets up two endpoints: - /identify/ - /convert/ -Houdini is meant for use wtih Api-X, and accepts `GET` and `OPTIONS` requests to those endpoints. The `OPTIONS` requests are for use with the Api-X service loading mechanism, and return RDF describing the -service for Api-X. The `GET` requests are used to execute the services, and must contain the uri to an image in Fedora in the `ApixLdpResource` header. +Houdini is meant for use with API-X, and accepts `GET` and `OPTIONS` requests to those endpoints. The `OPTIONS` requests are for use with the API-X service loading mechanism, and return RDF describing the +service for API-X. The `GET` requests are used to execute the services, and must contain the URI to an image in Fedora in the `ApixLdpResource` header. ### Identify @@ -42,7 +42,7 @@ For example, suppose if you have a TIFF in Fedora at `http://localhost:8080/fcre $ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" "localhost:8888/identify" ``` -But you're probably going to use Houdini through Api-X, which exposes this service as `svc:indentify`. Assuming your Api-X proxy is on port 8081, you can access the service with +But you're probably going to use Houdini through API-X, which exposes this service as `svc:identify`. Assuming your API-X proxy is on port 8081, you can access the service with ``` $ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:identify" ``` @@ -63,7 +63,7 @@ Additional arguments can be specified using the X-Islandora-Args header. For exa $ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "X-Islandora-Args: -resize 10%" "localhost:8888/convert/foo/bar" ``` -But you're probably going to use Houdini through Api-X, which exposes this service as `svc:convert`. Assuming your Api-X proxy is on port 8081, you can access the service with +But you're probably going to use Houdini through API-X, which exposes this service as `svc:convert`. Assuming your API-X proxy is on port 8081, you can access the service with ``` $ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:convert" ``` diff --git a/Hypercube/README.md b/Hypercube/README.md index e4f7ef6e..381f2313 100644 --- a/Hypercube/README.md +++ b/Hypercube/README.md @@ -4,7 +4,7 @@ ## Introduction -[Tesseract][9] as a microservice for use with [Api-X][10]. +[Tesseract][9] as a microservice for use with [API-X][10]. ## Installation @@ -45,7 +45,7 @@ In order to work on larger images, be sure `post_max_size` is sufficiently large ## Usage -Hypercube is meant for use with Api-X. It accepts only accepts one request, a `GET` with the URI of a Fedora resource in the `ApixLdpResource` header.. +Hypercube is meant for use with API-X. It accepts only accepts one request, a `GET` with the URI of a Fedora resource in the `ApixLdpResource` header.. For example, suppose if you have a TIFF in Fedora at `http://localhost:8080/fcrepo/rest/foo/bar`. If running the PHP built-in server command described in the Installation section: ``` @@ -57,7 +57,7 @@ This will return the OCR generated from the TIFF in Fedora. Additional argument $ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "X-Islandora-Args: -psm 9" "http://localhost:8888" ``` -But you're probably going to use Hypercube through Api-X, which exposes it as `svc:ocr`. Assuming your Api-X proxy is on port 8081, you can access the service with +But you're probably going to use Hypercube through API-X, which exposes it as `svc:ocr`. Assuming your API-X proxy is on port 8081, you can access the service with ``` $ curl -H "Authorization: Bearer blabhlahblah" "http://localhost:8081/services/foo/bar/svc:ocr" ``` From 5e307c74473b22f483f0bdcad8d0a7dce189617c Mon Sep 17 00:00:00 2001 From: Daniel Lamb Date: Wed, 28 Jun 2017 13:20:29 -0300 Subject: [PATCH 7/7] Basing services for binaries off of ldp:NonRDFSource instead of fedora:Binary --- Houdini/static/convert.ttl | 4 ++-- Houdini/static/identify.ttl | 4 ++-- Hypercube/static/hypercube.ttl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Houdini/static/convert.ttl b/Houdini/static/convert.ttl index 952d4c2b..ce529e64 100644 --- a/Houdini/static/convert.ttl +++ b/Houdini/static/convert.ttl @@ -1,7 +1,7 @@ @prefix apix: . @prefix owl: . @prefix ebucore: . -@prefix fedora: . +@prefix ldp: . @prefix islandora: . @prefix rdfs: . @@ -13,6 +13,6 @@ apix:bindsTo <#class> . <#class> owl:intersectionOf ( - fedora:Binary + ldp:NonRDFSource [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff", "image/jp2", "image/jpeg", "image/png", "image/gif", "image/bmp" ] ) . diff --git a/Houdini/static/identify.ttl b/Houdini/static/identify.ttl index e1278794..5e934547 100644 --- a/Houdini/static/identify.ttl +++ b/Houdini/static/identify.ttl @@ -1,7 +1,7 @@ @prefix apix: . @prefix owl: . @prefix ebucore: . -@prefix fedora: . +@prefix ldp: . @prefix islandora: . @prefix rdfs: . @@ -13,6 +13,6 @@ apix:bindsTo <#class> . <#class> owl:intersectionOf ( - fedora:Binary + ldp:NonRDFSource [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff", "image/jp2", "image/jpeg", "image/png", "image/gif", "image/bmp" ] ) . diff --git a/Hypercube/static/hypercube.ttl b/Hypercube/static/hypercube.ttl index cca017e8..eada0563 100644 --- a/Hypercube/static/hypercube.ttl +++ b/Hypercube/static/hypercube.ttl @@ -1,7 +1,7 @@ @prefix apix: . @prefix owl: . @prefix ebucore: . -@prefix fedora: . +@prefix ldp: . @prefix islandora: . @prefix rdfs: . @@ -13,6 +13,6 @@ apix:bindsTo <#class> . <#class> owl:intersectionOf ( - fedora:Binary + ldp:NonRDFSource [ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff" ] ) .