{"action":"created","issue":{"url":"https://api.github.com/repos/Islandora-CLAW/Crayfish/issues/4","repository_url":"https://api.github.com/repos/Islandora-CLAW/Crayfish","labels_url":"https://api.github.com/repos/Islandora-CLAW/Crayfish/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Islandora-CLAW/Crayfish/issues/4/comments","events_url":"https://api.github.com/repos/Islandora-CLAW/Crayfish/issues/4/events","html_url":"https://github.com/Islandora-CLAW/Crayfish/pull/4","id":155790899,"number":4,"title":"Add IUuidCache functions for transactions","user":{"login":"whikloj","id":2857697,"avatar_url":"https://avatars.githubusercontent.com/u/2857697?v=3","gravatar_id":"","url":"https://api.github.com/users/whikloj","html_url":"https://github.com/whikloj","followers_url":"https://api.github.com/users/whikloj/followers","following_url":"https://api.github.com/users/whikloj/following{/other_user}","gists_url":"https://api.github.com/users/whikloj/gists{/gist_id}","starred_url":"https://api.github.com/users/whikloj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whikloj/subscriptions","organizations_url":"https://api.github.com/users/whikloj/orgs","repos_url":"https://api.github.com/users/whikloj/repos","events_url":"https://api.github.com/users/whikloj/events{/privacy}","received_events_url":"https://api.github.com/users/whikloj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ruebot","id":218561,"avatar_url":"https://avatars.githubusercontent.com/u/218561?v=3","gravatar_id":"","url":"https://api.github.com/users/ruebot","html_url":"https://github.com/ruebot","followers_url":"https://api.github.com/users/ruebot/followers","following_url":"https://api.github.com/users/ruebot/following{/other_user}","gists_url":"https://api.github.com/users/ruebot/gists{/gist_id}","starred_url":"https://api.github.com/users/ruebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruebot/subscriptions","organizations_url":"https://api.github.com/users/ruebot/orgs","repos_url":"https://api.github.com/users/ruebot/repos","events_url":"https://api.github.com/users/ruebot/events{/privacy}","received_events_url":"https://api.github.com/users/ruebot/received_events","type":"User","site_admin":false},"milestone":null,"comments":20,"created_at":"2016-05-19T17:23:21Z","updated_at":"2016-06-03T13:19:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Islandora-CLAW/Crayfish/pulls/4","html_url":"https://github.com/Islandora-CLAW/Crayfish/pull/4","diff_url":"https://github.com/Islandora-CLAW/Crayfish/pull/4.diff","patch_url":"https://github.com/Islandora-CLAW/Crayfish/pull/4.patch"},"body":"Addresses https://github.com/Islandora-CLAW/CLAW/issues/185\r\nDepends on https://github.com/Islandora-CLAW/chullo/pull/41\r\n\r\nThis PR adds the ability to interact with objects inside a transaction. \r\n\r\nCLAW uses a UUID -> Fedora Path mapping which is stored in the triplestore, \r\nthis is generated by fcrepo-camel-toolbox using events coming out of Fedora.\r\n\r\nInside a transaction nothing is permanent until you commit the transaction, therefore no events are generated in the interim so the UUID is not stored in the triplestore.\r\n\r\nSo we store the temporary path and the UUID in a simple key cache with the transaction ID.\r\n\r\n## Pre-Testing\r\n\r\n1. You'll need to install Redis (http://redis.io/) on your machine\r\n * apt-get install redis\r\n\r\n2. You'll need phpredis (https://github.com/phpredis/phpredis), instructions are on the README.\r\n```\r\ngit clone https://github.com/phpredis/phpredis\r\ncd phpredis\r\nsudo phpize\r\nsudo ./configure\r\nsudo make && make install\r\n```\r\n3. Add phpredis to PHP\r\n 1. Create a file called **redis.ini** inside `/etc/php5/mods-available` or execute..\r\n\r\n        `sudo sh -c \"echo 'extension=redis.so' > /etc/php5/mods-available/redis.ini\"`\r\n 2. Link this new ini file in to your CLI and Apache PHP inis\r\n\r\n       `sudo ln -s /etc/php5/mods-available/redis.ini /etc/php5/apache2/conf.d/`\r\n       `sudo ln -s /etc/php5/mods-available/redis.ini /etc/php5/cli/conf.d/`\r\n\r\n 3. Restart apache to load new extension, if you run a `php -i` you should see it in the Extensions.\r\n\r\n4. Ready to test\r\n\r\n## Testing\r\n\r\nUsing a turtle file like this\r\n```\r\n@prefix pcdm: <http://pcdm.org/models#> .\r\n@prefix dcterms: <http://purl.org/dc/elements/1.1/> .\r\n@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo/v1.2/> .\r\n@prefix xs: <http://www.w3.org/2001/XMLSchema> .\r\n\r\n<> a pcdm:Object ;\r\n  dcterms:title \"Another PCDM Object\" ;\r\n  nfo:uuid \"3a28cd77-60ab-498b-aeb4-8292adc2180b\"^^xs:string .\r\n```\r\n\r\n### Before this PR.\r\n1. Create a resource in Fedora using the /islandora/resource route using the turtle file.\r\n2. Verify you can GET it using the UUID (ie. 3a28cd77-60ab-498b-aeb4-8292adc2180b).\r\n3. Delete it using UUID.\r\n4. Create a transaction.\r\n5. Create a resource in Fedora using the /islandora/resource route using the turtle file inside the transaction.\r\n6. Verify you **CAN'T** GET it using the UUID (ie. 3a28cd77-60ab-498b-aeb4-8292adc2180b).\r\n\r\n### After this PR\r\n1. Create a resource in Fedora using the /islandora/resource route using the turtle file.\r\n2. Verify you can GET it using the UUID (ie. 3a28cd77-60ab-498b-aeb4-8292adc2180b).\r\n3. Delete it using UUID.\r\n4. Create a transaction.\r\n5. Create a resource in Fedora using the /islandora/resource route using the turtle file inside the transaction.\r\n6. Verify you **CAN** GET it using the UUID (ie. 3a28cd77-60ab-498b-aeb4-8292adc2180b).\r\n7. Verify you can DELETE the resource using the UUID."},"comment":{"url":"https://api.github.com/repos/Islandora-CLAW/Crayfish/issues/comments/223576418","html_url":"https://github.com/Islandora-CLAW/Crayfish/pull/4#issuecomment-223576418","issue_url":"https://api.github.com/repos/Islandora-CLAW/Crayfish/issues/4","id":223576418,"user":{"login":"whikloj","id":2857697,"avatar_url":"https://avatars.githubusercontent.com/u/2857697?v=3","gravatar_id":"","url":"https://api.github.com/users/whikloj","html_url":"https://github.com/whikloj","followers_url":"https://api.github.com/users/whikloj/followers","following_url":"https://api.github.com/users/whikloj/following{/other_user}","gists_url":"https://api.github.com/users/whikloj/gists{/gist_id}","starred_url":"https://api.github.com/users/whikloj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whikloj/subscriptions","organizations_url":"https://api.github.com/users/whikloj/orgs","repos_url":"https://api.github.com/users/whikloj/repos","events_url":"https://api.github.com/users/whikloj/events{/privacy}","received_events_url":"https://api.github.com/users/whikloj/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T13:19:27Z","updated_at":"2016-06-03T13:19:27Z","body":"Yeah this is due to an initial failure installing the transforms into Fedora, seems that if it fails once it is dead for all time. I'll have to look into making that more stable."}}
{"actor":{"display_login":"whikloj"}}