{"action":"created","comment":{"url":"https://api.github.com/repos/nuxeo/nuxeo/pulls/comments/166674719","pull_request_review_id":94776207,"id":166674719,"diff_hunk":"@@ -0,0 +1,82 @@\n+/*\n+ * (C) Copyright 2018 Nuxeo (http://nuxeo.com/) and others.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ * Contributors:\n+ *     Ricardo Dias\n+ */\n+\n+package org.nuxeo.ecm.platform.convert.tests;\n+\n+import org.junit.Test;\n+import org.nuxeo.ecm.core.api.Blob;\n+import org.nuxeo.ecm.core.api.blobholder.BlobHolder;\n+\n+import java.io.IOException;\n+import java.io.Serializable;\n+import java.util.Collections;\n+import java.util.List;\n+import java.util.Map;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertNotNull;\n+import static org.junit.Assert.assertTrue;\n+\n+public class TestZip2HtmlConverter extends BaseConverterTest {\n+\n+    @Test\n+    public void testZipConverter() throws Exception {\n+        testConvertToMimeType(\"application/zip\");\n+        testConvertToMimeType(\"application/x-zip-compressed\");\n+    }\n+\n+    public void testConvertToMimeType(String mimeType) throws IOException {\n+        String converterName = cs.getConverterName(mimeType, \"text/html\");\n+        assertEquals(\"zip2html\", converterName);\n+\n+        checkConverterAvailability(converterName);\n+\n+        BlobHolder htmlBH = getBlobFromPath(\"test-docs/hello.zip\");\n+        htmlBH.getBlob().setMimeType(mimeType);\n+        Map<String, Serializable> parameters = Collections.emptyMap();\n+\n+        BlobHolder result = cs.convert(converterName, htmlBH, parameters);\n+        assertNotNull(result);\n+\n+        List<Blob> blobs = result.getBlobs();\n+        assertNotNull(blobs);\n+        assertEquals(3, blobs.size());\n+\n+        String content = blobs.get(0).getString();\n+        System.out.println(\"The blob content\");\n+        System.out.println(content);","path":"nuxeo-services/nuxeo-platform-convert/src/test/java/org/nuxeo/ecm/platform/convert/tests/TestZip2HtmlConverter.java","position":null,"original_position":63,"commit_id":"c6be5074eabde8f027da96ac37abb708b74756ce","original_commit_id":"fd284339956fe6805ed16d14bca463ffb58c8cc8","user":{"login":"richardsd","id":738700,"avatar_url":"https://avatars0.githubusercontent.com/u/738700?v=4","gravatar_id":"","url":"https://api.github.com/users/richardsd","html_url":"https://github.com/richardsd","followers_url":"https://api.github.com/users/richardsd/followers","following_url":"https://api.github.com/users/richardsd/following{/other_user}","gists_url":"https://api.github.com/users/richardsd/gists{/gist_id}","starred_url":"https://api.github.com/users/richardsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardsd/subscriptions","organizations_url":"https://api.github.com/users/richardsd/orgs","repos_url":"https://api.github.com/users/richardsd/repos","events_url":"https://api.github.com/users/richardsd/events{/privacy}","received_events_url":"https://api.github.com/users/richardsd/received_events","type":"User","site_admin":false},"body":"Florent I was just testing something before notifying, forgot the print there. I will update the PR once the T&P is finished 👍 ","created_at":"2018-02-07T16:31:39Z","updated_at":"2018-02-07T16:31:39Z","html_url":"https://github.com/nuxeo/nuxeo/pull/1690#discussion_r166674719","pull_request_url":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nuxeo/nuxeo/pulls/comments/166674719"},"html":{"href":"https://github.com/nuxeo/nuxeo/pull/1690#discussion_r166674719"},"pull_request":{"href":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690"}},"in_reply_to_id":166628761},"pull_request":{"url":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690","id":167487977,"html_url":"https://github.com/nuxeo/nuxeo/pull/1690","diff_url":"https://github.com/nuxeo/nuxeo/pull/1690.diff","patch_url":"https://github.com/nuxeo/nuxeo/pull/1690.patch","issue_url":"https://api.github.com/repos/nuxeo/nuxeo/issues/1690","number":1690,"state":"open","locked":false,"title":"NXP-24309: change supported zip mime types in zip to html converter.","user":{"login":"richardsd","id":738700,"avatar_url":"https://avatars0.githubusercontent.com/u/738700?v=4","gravatar_id":"","url":"https://api.github.com/users/richardsd","html_url":"https://github.com/richardsd","followers_url":"https://api.github.com/users/richardsd/followers","following_url":"https://api.github.com/users/richardsd/following{/other_user}","gists_url":"https://api.github.com/users/richardsd/gists{/gist_id}","starred_url":"https://api.github.com/users/richardsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardsd/subscriptions","organizations_url":"https://api.github.com/users/richardsd/orgs","repos_url":"https://api.github.com/users/richardsd/repos","events_url":"https://api.github.com/users/richardsd/events{/privacy}","received_events_url":"https://api.github.com/users/richardsd/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-06T18:03:24Z","updated_at":"2018-02-07T16:31:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"240ade684eeff186aa297d3024669a24e68c2a8a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690/commits","review_comments_url":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690/comments","review_comment_url":"https://api.github.com/repos/nuxeo/nuxeo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nuxeo/nuxeo/issues/1690/comments","statuses_url":"https://api.github.com/repos/nuxeo/nuxeo/statuses/c6be5074eabde8f027da96ac37abb708b74756ce","head":{"label":"nuxeo:fix-NXP-24309-supported-zip-mimetypes","ref":"fix-NXP-24309-supported-zip-mimetypes","sha":"c6be5074eabde8f027da96ac37abb708b74756ce","user":{"login":"nuxeo","id":460607,"avatar_url":"https://avatars1.githubusercontent.com/u/460607?v=4","gravatar_id":"","url":"https://api.github.com/users/nuxeo","html_url":"https://github.com/nuxeo","followers_url":"https://api.github.com/users/nuxeo/followers","following_url":"https://api.github.com/users/nuxeo/following{/other_user}","gists_url":"https://api.github.com/users/nuxeo/gists{/gist_id}","starred_url":"https://api.github.com/users/nuxeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuxeo/subscriptions","organizations_url":"https://api.github.com/users/nuxeo/orgs","repos_url":"https://api.github.com/users/nuxeo/repos","events_url":"https://api.github.com/users/nuxeo/events{/privacy}","received_events_url":"https://api.github.com/users/nuxeo/received_events","type":"Organization","site_admin":false},"repo":{"id":2988101,"name":"nuxeo","full_name":"nuxeo/nuxeo","owner":{"login":"nuxeo","id":460607,"avatar_url":"https://avatars1.githubusercontent.com/u/460607?v=4","gravatar_id":"","url":"https://api.github.com/users/nuxeo","html_url":"https://github.com/nuxeo","followers_url":"https://api.github.com/users/nuxeo/followers","following_url":"https://api.github.com/users/nuxeo/following{/other_user}","gists_url":"https://api.github.com/users/nuxeo/gists{/gist_id}","starred_url":"https://api.github.com/users/nuxeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuxeo/subscriptions","organizations_url":"https://api.github.com/users/nuxeo/orgs","repos_url":"https://api.github.com/users/nuxeo/repos","events_url":"https://api.github.com/users/nuxeo/events{/privacy}","received_events_url":"https://api.github.com/users/nuxeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nuxeo/nuxeo","description":"Content management platform to build modern business applications","fork":false,"url":"https://api.github.com/repos/nuxeo/nuxeo","forks_url":"https://api.github.com/repos/nuxeo/nuxeo/forks","keys_url":"https://api.github.com/repos/nuxeo/nuxeo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nuxeo/nuxeo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nuxeo/nuxeo/teams","hooks_url":"https://api.github.com/repos/nuxeo/nuxeo/hooks","issue_events_url":"https://api.github.com/repos/nuxeo/nuxeo/issues/events{/number}","events_url":"https://api.github.com/repos/nuxeo/nuxeo/events","assignees_url":"https://api.github.com/repos/nuxeo/nuxeo/assignees{/user}","branches_url":"https://api.github.com/repos/nuxeo/nuxeo/branches{/branch}","tags_url":"https://api.github.com/repos/nuxeo/nuxeo/tags","blobs_url":"https://api.github.com/repos/nuxeo/nuxeo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nuxeo/nuxeo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nuxeo/nuxeo/git/refs{/sha}","trees_url":"https://api.github.com/repos/nuxeo/nuxeo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nuxeo/nuxeo/statuses/{sha}","languages_url":"https://api.github.com/repos/nuxeo/nuxeo/languages","stargazers_url":"https://api.github.com/repos/nuxeo/nuxeo/stargazers","contributors_url":"https://api.github.com/repos/nuxeo/nuxeo/contributors","subscribers_url":"https://api.github.com/repos/nuxeo/nuxeo/subscribers","subscription_url":"https://api.github.com/repos/nuxeo/nuxeo/subscription","commits_url":"https://api.github.com/repos/nuxeo/nuxeo/commits{/sha}","git_commits_url":"https://api.github.com/repos/nuxeo/nuxeo/git/commits{/sha}","comments_url":"https://api.github.com/repos/nuxeo/nuxeo/comments{/number}","issue_comment_url":"https://api.github.com/repos/nuxeo/nuxeo/issues/comments{/number}","contents_url":"https://api.github.com/repos/nuxeo/nuxeo/contents/{+path}","compare_url":"https://api.github.com/repos/nuxeo/nuxeo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nuxeo/nuxeo/merges","archive_url":"https://api.github.com/repos/nuxeo/nuxeo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nuxeo/nuxeo/downloads","issues_url":"https://api.github.com/repos/nuxeo/nuxeo/issues{/number}","pulls_url":"https://api.github.com/repos/nuxeo/nuxeo/pulls{/number}","milestones_url":"https://api.github.com/repos/nuxeo/nuxeo/milestones{/number}","notifications_url":"https://api.github.com/repos/nuxeo/nuxeo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nuxeo/nuxeo/labels{/name}","releases_url":"https://api.github.com/repos/nuxeo/nuxeo/releases{/id}","deployments_url":"https://api.github.com/repos/nuxeo/nuxeo/deployments","created_at":"2011-12-15T14:35:41Z","updated_at":"2018-02-07T00:24:19Z","pushed_at":"2018-02-07T15:53:48Z","git_url":"git://github.com/nuxeo/nuxeo.git","ssh_url":"git@github.com:nuxeo/nuxeo.git","clone_url":"https://github.com/nuxeo/nuxeo.git","svn_url":"https://github.com/nuxeo/nuxeo","homepage":"http://www.nuxeo.com","size":222326,"stargazers_count":189,"watchers_count":189,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":138,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":138,"open_issues":7,"watchers":189,"default_branch":"master"}},"base":{"label":"nuxeo:master","ref":"master","sha":"815c33aff8f71887c8b367b5d4f5ab152a9eb70a","user":{"login":"nuxeo","id":460607,"avatar_url":"https://avatars1.githubusercontent.com/u/460607?v=4","gravatar_id":"","url":"https://api.github.com/users/nuxeo","html_url":"https://github.com/nuxeo","followers_url":"https://api.github.com/users/nuxeo/followers","following_url":"https://api.github.com/users/nuxeo/following{/other_user}","gists_url":"https://api.github.com/users/nuxeo/gists{/gist_id}","starred_url":"https://api.github.com/users/nuxeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuxeo/subscriptions","organizations_url":"https://api.github.com/users/nuxeo/orgs","repos_url":"https://api.github.com/users/nuxeo/repos","events_url":"https://api.github.com/users/nuxeo/events{/privacy}","received_events_url":"https://api.github.com/users/nuxeo/received_events","type":"Organization","site_admin":false},"repo":{"id":2988101,"name":"nuxeo","full_name":"nuxeo/nuxeo","owner":{"login":"nuxeo","id":460607,"avatar_url":"https://avatars1.githubusercontent.com/u/460607?v=4","gravatar_id":"","url":"https://api.github.com/users/nuxeo","html_url":"https://github.com/nuxeo","followers_url":"https://api.github.com/users/nuxeo/followers","following_url":"https://api.github.com/users/nuxeo/following{/other_user}","gists_url":"https://api.github.com/users/nuxeo/gists{/gist_id}","starred_url":"https://api.github.com/users/nuxeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuxeo/subscriptions","organizations_url":"https://api.github.com/users/nuxeo/orgs","repos_url":"https://api.github.com/users/nuxeo/repos","events_url":"https://api.github.com/users/nuxeo/events{/privacy}","received_events_url":"https://api.github.com/users/nuxeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nuxeo/nuxeo","description":"Content management platform to build modern business applications","fork":false,"url":"https://api.github.com/repos/nuxeo/nuxeo","forks_url":"https://api.github.com/repos/nuxeo/nuxeo/forks","keys_url":"https://api.github.com/repos/nuxeo/nuxeo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nuxeo/nuxeo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nuxeo/nuxeo/teams","hooks_url":"https://api.github.com/repos/nuxeo/nuxeo/hooks","issue_events_url":"https://api.github.com/repos/nuxeo/nuxeo/issues/events{/number}","events_url":"https://api.github.com/repos/nuxeo/nuxeo/events","assignees_url":"https://api.github.com/repos/nuxeo/nuxeo/assignees{/user}","branches_url":"https://api.github.com/repos/nuxeo/nuxeo/branches{/branch}","tags_url":"https://api.github.com/repos/nuxeo/nuxeo/tags","blobs_url":"https://api.github.com/repos/nuxeo/nuxeo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nuxeo/nuxeo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nuxeo/nuxeo/git/refs{/sha}","trees_url":"https://api.github.com/repos/nuxeo/nuxeo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nuxeo/nuxeo/statuses/{sha}","languages_url":"https://api.github.com/repos/nuxeo/nuxeo/languages","stargazers_url":"https://api.github.com/repos/nuxeo/nuxeo/stargazers","contributors_url":"https://api.github.com/repos/nuxeo/nuxeo/contributors","subscribers_url":"https://api.github.com/repos/nuxeo/nuxeo/subscribers","subscription_url":"https://api.github.com/repos/nuxeo/nuxeo/subscription","commits_url":"https://api.github.com/repos/nuxeo/nuxeo/commits{/sha}","git_commits_url":"https://api.github.com/repos/nuxeo/nuxeo/git/commits{/sha}","comments_url":"https://api.github.com/repos/nuxeo/nuxeo/comments{/number}","issue_comment_url":"https://api.github.com/repos/nuxeo/nuxeo/issues/comments{/number}","contents_url":"https://api.github.com/repos/nuxeo/nuxeo/contents/{+path}","compare_url":"https://api.github.com/repos/nuxeo/nuxeo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nuxeo/nuxeo/merges","archive_url":"https://api.github.com/repos/nuxeo/nuxeo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nuxeo/nuxeo/downloads","issues_url":"https://api.github.com/repos/nuxeo/nuxeo/issues{/number}","pulls_url":"https://api.github.com/repos/nuxeo/nuxeo/pulls{/number}","milestones_url":"https://api.github.com/repos/nuxeo/nuxeo/milestones{/number}","notifications_url":"https://api.github.com/repos/nuxeo/nuxeo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nuxeo/nuxeo/labels{/name}","releases_url":"https://api.github.com/repos/nuxeo/nuxeo/releases{/id}","deployments_url":"https://api.github.com/repos/nuxeo/nuxeo/deployments","created_at":"2011-12-15T14:35:41Z","updated_at":"2018-02-07T00:24:19Z","pushed_at":"2018-02-07T15:53:48Z","git_url":"git://github.com/nuxeo/nuxeo.git","ssh_url":"git@github.com:nuxeo/nuxeo.git","clone_url":"https://github.com/nuxeo/nuxeo.git","svn_url":"https://github.com/nuxeo/nuxeo","homepage":"http://www.nuxeo.com","size":222326,"stargazers_count":189,"watchers_count":189,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":138,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":138,"open_issues":7,"watchers":189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690"},"html":{"href":"https://github.com/nuxeo/nuxeo/pull/1690"},"issue":{"href":"https://api.github.com/repos/nuxeo/nuxeo/issues/1690"},"comments":{"href":"https://api.github.com/repos/nuxeo/nuxeo/issues/1690/comments"},"review_comments":{"href":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690/comments"},"review_comment":{"href":"https://api.github.com/repos/nuxeo/nuxeo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nuxeo/nuxeo/pulls/1690/commits"},"statuses":{"href":"https://api.github.com/repos/nuxeo/nuxeo/statuses/c6be5074eabde8f027da96ac37abb708b74756ce"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"richardsd"}}