{"action":"created","comment":{"url":"https://api.github.com/repos/Cognifide/knotx/pulls/comments/77722131","id":77722131,"diff_hunk":"@@ -0,0 +1,87 @@\n+\n+/*\n+ * Knot.x - Reactive microservice assembler\n+ *\n+ * Copyright (C) 2016 Cognifide Limited\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except\n+ * in compliance with the License. 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 distributed under the License\n+ * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n+ * or implied. See the License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+package com.cognifide.knotx.engine.placeholders;\n+\n+import java.util.Arrays;\n+import java.util.Collection;\n+\n+import org.apache.commons.lang3.StringUtils;\n+import org.junit.Assert;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.junit.runners.Parameterized;\n+\n+import com.cognifide.knotx.api.UriInfo;\n+\n+@RunWith(Parameterized.class)\n+public class UriInfoHelperTest {\n+\n+    @Parameterized.Parameters(name = \"{index}: {0}\")\n+    public static Collection<Object[]> data() {\n+        return Arrays.asList(new Object[][] {{\"/a/b\", \"/a/b\", null, null, null},\n+                {\"/a/b.html\", \"/a/b\", null, \"html\", null},\n+                {\"/a/b.s1.html\", \"/a/b\", \"s1\", \"html\", null},\n+                {\"/a/b.s1.s2.html\", \"/a/b\", \"s1.s2\", \"html\", null},\n+                {\"/a/b.s1.html/c/d\", \"/a/b\", \"s1\", \"html\", \"/c/d\"},\n+                {\"/a/b.s1.s2.html/c/d\", \"/a/b\", \"s1.s2\", \"html\", \"/c/d\"},\n+                {\"/a/b.html/c/d.s.txt\", \"/a/b\", null, \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b.s1.html/c/d.s.txt\", \"/a/b\", \"s1\", \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b.s1.s2.html/c/d.s.txt\", \"/a/b\", \"s1.s2\", \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b?q=v\", \"/a/b\", null, null, null},\n+                {\"/a/b.html?q=v\", \"/a/b\", null, \"html\", null},\n+                {\"/a/b.s1.html?q=v\", \"/a/b\", \"s1\", \"html\", null},\n+                {\"/a/b.s1.s2.html?q=v\", \"/a/b\", \"s1.s2\", \"html\", null},\n+                {\"/a/b.s1.html/c/d?q=v\", \"/a/b\", \"s1\", \"html\", \"/c/d\"},\n+                {\"/a/b.s1.s2.html/c/d?q=v\", \"/a/b\", \"s1.s2\", \"html\", \"/c/d\"},\n+                {\"/a/b.html/c/d.s.txt?q=v\", \"/a/b\", null, \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b.s1.html/c/d.s.txt?q=v\", \"/a/b\", \"s1\", \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b.s1.s2.html/c/d.s.txt?q=v\", \"/a/b\", \"s1.s2\", \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b#f\", \"/a/b\", null, null, null}, {\"/a/b.html#f\", \"/a/b\", null, \"html\", null},\n+                {\"/a/b.s1.html#f\", \"/a/b\", \"s1\", \"html\", null},\n+                {\"/a/b.s1.s2.html#f\", \"/a/b\", \"s1.s2\", \"html\", null},\n+                {\"/a/b.s1.html/c/d#f\", \"/a/b\", \"s1\", \"html\", \"/c/d\"},\n+                {\"/a/b.s1.s2.html/c/d#f\", \"/a/b\", \"s1.s2\", \"html\", \"/c/d\"},\n+                {\"/a/b.html/c/d.s.txt#f\", \"/a/b\", null, \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b.s1.html/c/d.s.txt#f\", \"/a/b\", \"s1\", \"html\", \"/c/d.s.txt\"},\n+                {\"/a/b.s1.s2.html/c/d.s.txt#f\", \"/a/b\", \"s1.s2\", \"html\", \"/c/d.s.txt\"}});\n+    }\n+\n+    @Parameterized.Parameter\n+    public String uri;\n+\n+    @Parameterized.Parameter(value = 1)\n+    public String path;\n+\n+    @Parameterized.Parameter(value = 2)\n+    public String selectorString;\n+\n+    @Parameterized.Parameter(value = 3)\n+    public String extension;\n+\n+    @Parameterized.Parameter(value = 4)\n+    public String suffix;\n+\n+    @Test\n+    public void test() {","path":"knotx-core/knotx-template-engine/src/test/java/com/cognifide/knotx/engine/placeholders/UriInfoHelperTest.java","position":79,"original_position":79,"commit_id":"f3616a2c63d5f754aaba73b1dbcae73186087a39","original_commit_id":"f3616a2c63d5f754aaba73b1dbcae73186087a39","user":{"login":"Skejven","id":19705838,"avatar_url":"https://avatars.githubusercontent.com/u/19705838?v=3","gravatar_id":"","url":"https://api.github.com/users/Skejven","html_url":"https://github.com/Skejven","followers_url":"https://api.github.com/users/Skejven/followers","following_url":"https://api.github.com/users/Skejven/following{/other_user}","gists_url":"https://api.github.com/users/Skejven/gists{/gist_id}","starred_url":"https://api.github.com/users/Skejven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skejven/subscriptions","organizations_url":"https://api.github.com/users/Skejven/orgs","repos_url":"https://api.github.com/users/Skejven/repos","events_url":"https://api.github.com/users/Skejven/events{/privacy}","received_events_url":"https://api.github.com/users/Skejven/received_events","type":"User","site_admin":false},"body":"Please check out (test naming conventions)[https://github.com/Cognifide/knotx/blob/master/CONTRIBUTING.md#tests-naming-convention] in contributing guidelines.","created_at":"2016-09-06T21:29:02Z","updated_at":"2016-09-06T21:29:02Z","html_url":"https://github.com/Cognifide/knotx/pull/68#discussion_r77722131","pull_request_url":"https://api.github.com/repos/Cognifide/knotx/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/Cognifide/knotx/pulls/comments/77722131"},"html":{"href":"https://github.com/Cognifide/knotx/pull/68#discussion_r77722131"},"pull_request":{"href":"https://api.github.com/repos/Cognifide/knotx/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/Cognifide/knotx/pulls/68","id":84040660,"html_url":"https://github.com/Cognifide/knotx/pull/68","diff_url":"https://github.com/Cognifide/knotx/pull/68.diff","patch_url":"https://github.com/Cognifide/knotx/pull/68.patch","issue_url":"https://api.github.com/repos/Cognifide/knotx/issues/68","number":68,"state":"open","locked":false,"title":"feature/8-placeholder-in-service-url","user":{"login":"ub1k24","id":6535441,"avatar_url":"https://avatars.githubusercontent.com/u/6535441?v=3","gravatar_id":"","url":"https://api.github.com/users/ub1k24","html_url":"https://github.com/ub1k24","followers_url":"https://api.github.com/users/ub1k24/followers","following_url":"https://api.github.com/users/ub1k24/following{/other_user}","gists_url":"https://api.github.com/users/ub1k24/gists{/gist_id}","starred_url":"https://api.github.com/users/ub1k24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ub1k24/subscriptions","organizations_url":"https://api.github.com/users/ub1k24/orgs","repos_url":"https://api.github.com/users/ub1k24/repos","events_url":"https://api.github.com/users/ub1k24/events{/privacy}","received_events_url":"https://api.github.com/users/ub1k24/received_events","type":"User","site_admin":false},"body":"Placeholders in service URLs\r\nDocumentation pending to after code-review\r\nParts of the code are used from original feature implementation by @dprzybyl, which became deprecate after major infrastructural changes\r\n\r\n---\r\n\r\nI hereby agree to the terms of the Knot.x Contributor License Agreement.\r\n","created_at":"2016-09-05T21:36:06Z","updated_at":"2016-09-06T21:29:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"349f5c7687b17ba0c8236384adcde255d8dcdfab","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cognifide/knotx/pulls/68/commits","review_comments_url":"https://api.github.com/repos/Cognifide/knotx/pulls/68/comments","review_comment_url":"https://api.github.com/repos/Cognifide/knotx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cognifide/knotx/issues/68/comments","statuses_url":"https://api.github.com/repos/Cognifide/knotx/statuses/f3616a2c63d5f754aaba73b1dbcae73186087a39","head":{"label":"ub1k24:feature/8-placeholders-in-service-url-for-dynamic-parameters","ref":"feature/8-placeholders-in-service-url-for-dynamic-parameters","sha":"f3616a2c63d5f754aaba73b1dbcae73186087a39","user":{"login":"ub1k24","id":6535441,"avatar_url":"https://avatars.githubusercontent.com/u/6535441?v=3","gravatar_id":"","url":"https://api.github.com/users/ub1k24","html_url":"https://github.com/ub1k24","followers_url":"https://api.github.com/users/ub1k24/followers","following_url":"https://api.github.com/users/ub1k24/following{/other_user}","gists_url":"https://api.github.com/users/ub1k24/gists{/gist_id}","starred_url":"https://api.github.com/users/ub1k24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ub1k24/subscriptions","organizations_url":"https://api.github.com/users/ub1k24/orgs","repos_url":"https://api.github.com/users/ub1k24/repos","events_url":"https://api.github.com/users/ub1k24/events{/privacy}","received_events_url":"https://api.github.com/users/ub1k24/received_events","type":"User","site_admin":false},"repo":{"id":66945428,"name":"knotx","full_name":"ub1k24/knotx","owner":{"login":"ub1k24","id":6535441,"avatar_url":"https://avatars.githubusercontent.com/u/6535441?v=3","gravatar_id":"","url":"https://api.github.com/users/ub1k24","html_url":"https://github.com/ub1k24","followers_url":"https://api.github.com/users/ub1k24/followers","following_url":"https://api.github.com/users/ub1k24/following{/other_user}","gists_url":"https://api.github.com/users/ub1k24/gists{/gist_id}","starred_url":"https://api.github.com/users/ub1k24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ub1k24/subscriptions","organizations_url":"https://api.github.com/users/ub1k24/orgs","repos_url":"https://api.github.com/users/ub1k24/repos","events_url":"https://api.github.com/users/ub1k24/events{/privacy}","received_events_url":"https://api.github.com/users/ub1k24/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ub1k24/knotx","description":"Knot.x is a light-weight and high-performance reactive microservice assembler","fork":true,"url":"https://api.github.com/repos/ub1k24/knotx","forks_url":"https://api.github.com/repos/ub1k24/knotx/forks","keys_url":"https://api.github.com/repos/ub1k24/knotx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ub1k24/knotx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ub1k24/knotx/teams","hooks_url":"https://api.github.com/repos/ub1k24/knotx/hooks","issue_events_url":"https://api.github.com/repos/ub1k24/knotx/issues/events{/number}","events_url":"https://api.github.com/repos/ub1k24/knotx/events","assignees_url":"https://api.github.com/repos/ub1k24/knotx/assignees{/user}","branches_url":"https://api.github.com/repos/ub1k24/knotx/branches{/branch}","tags_url":"https://api.github.com/repos/ub1k24/knotx/tags","blobs_url":"https://api.github.com/repos/ub1k24/knotx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ub1k24/knotx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ub1k24/knotx/git/refs{/sha}","trees_url":"https://api.github.com/repos/ub1k24/knotx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ub1k24/knotx/statuses/{sha}","languages_url":"https://api.github.com/repos/ub1k24/knotx/languages","stargazers_url":"https://api.github.com/repos/ub1k24/knotx/stargazers","contributors_url":"https://api.github.com/repos/ub1k24/knotx/contributors","subscribers_url":"https://api.github.com/repos/ub1k24/knotx/subscribers","subscription_url":"https://api.github.com/repos/ub1k24/knotx/subscription","commits_url":"https://api.github.com/repos/ub1k24/knotx/commits{/sha}","git_commits_url":"https://api.github.com/repos/ub1k24/knotx/git/commits{/sha}","comments_url":"https://api.github.com/repos/ub1k24/knotx/comments{/number}","issue_comment_url":"https://api.github.com/repos/ub1k24/knotx/issues/comments{/number}","contents_url":"https://api.github.com/repos/ub1k24/knotx/contents/{+path}","compare_url":"https://api.github.com/repos/ub1k24/knotx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ub1k24/knotx/merges","archive_url":"https://api.github.com/repos/ub1k24/knotx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ub1k24/knotx/downloads","issues_url":"https://api.github.com/repos/ub1k24/knotx/issues{/number}","pulls_url":"https://api.github.com/repos/ub1k24/knotx/pulls{/number}","milestones_url":"https://api.github.com/repos/ub1k24/knotx/milestones{/number}","notifications_url":"https://api.github.com/repos/ub1k24/knotx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ub1k24/knotx/labels{/name}","releases_url":"https://api.github.com/repos/ub1k24/knotx/releases{/id}","deployments_url":"https://api.github.com/repos/ub1k24/knotx/deployments","created_at":"2016-08-30T13:57:24Z","updated_at":"2016-08-30T13:57:25Z","pushed_at":"2016-09-06T09:10:46Z","git_url":"git://github.com/ub1k24/knotx.git","ssh_url":"git@github.com:ub1k24/knotx.git","clone_url":"https://github.com/ub1k24/knotx.git","svn_url":"https://github.com/ub1k24/knotx","homepage":"","size":1163,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Cognifide:master","ref":"master","sha":"cdcb70454790f93a29c0b7414a837162f07090e6","user":{"login":"Cognifide","id":932257,"avatar_url":"https://avatars.githubusercontent.com/u/932257?v=3","gravatar_id":"","url":"https://api.github.com/users/Cognifide","html_url":"https://github.com/Cognifide","followers_url":"https://api.github.com/users/Cognifide/followers","following_url":"https://api.github.com/users/Cognifide/following{/other_user}","gists_url":"https://api.github.com/users/Cognifide/gists{/gist_id}","starred_url":"https://api.github.com/users/Cognifide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cognifide/subscriptions","organizations_url":"https://api.github.com/users/Cognifide/orgs","repos_url":"https://api.github.com/users/Cognifide/repos","events_url":"https://api.github.com/users/Cognifide/events{/privacy}","received_events_url":"https://api.github.com/users/Cognifide/received_events","type":"Organization","site_admin":false},"repo":{"id":60755660,"name":"knotx","full_name":"Cognifide/knotx","owner":{"login":"Cognifide","id":932257,"avatar_url":"https://avatars.githubusercontent.com/u/932257?v=3","gravatar_id":"","url":"https://api.github.com/users/Cognifide","html_url":"https://github.com/Cognifide","followers_url":"https://api.github.com/users/Cognifide/followers","following_url":"https://api.github.com/users/Cognifide/following{/other_user}","gists_url":"https://api.github.com/users/Cognifide/gists{/gist_id}","starred_url":"https://api.github.com/users/Cognifide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cognifide/subscriptions","organizations_url":"https://api.github.com/users/Cognifide/orgs","repos_url":"https://api.github.com/users/Cognifide/repos","events_url":"https://api.github.com/users/Cognifide/events{/privacy}","received_events_url":"https://api.github.com/users/Cognifide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cognifide/knotx","description":"Knot.x is a light-weight and high-performance reactive microservice assembler","fork":false,"url":"https://api.github.com/repos/Cognifide/knotx","forks_url":"https://api.github.com/repos/Cognifide/knotx/forks","keys_url":"https://api.github.com/repos/Cognifide/knotx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cognifide/knotx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cognifide/knotx/teams","hooks_url":"https://api.github.com/repos/Cognifide/knotx/hooks","issue_events_url":"https://api.github.com/repos/Cognifide/knotx/issues/events{/number}","events_url":"https://api.github.com/repos/Cognifide/knotx/events","assignees_url":"https://api.github.com/repos/Cognifide/knotx/assignees{/user}","branches_url":"https://api.github.com/repos/Cognifide/knotx/branches{/branch}","tags_url":"https://api.github.com/repos/Cognifide/knotx/tags","blobs_url":"https://api.github.com/repos/Cognifide/knotx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cognifide/knotx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cognifide/knotx/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cognifide/knotx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cognifide/knotx/statuses/{sha}","languages_url":"https://api.github.com/repos/Cognifide/knotx/languages","stargazers_url":"https://api.github.com/repos/Cognifide/knotx/stargazers","contributors_url":"https://api.github.com/repos/Cognifide/knotx/contributors","subscribers_url":"https://api.github.com/repos/Cognifide/knotx/subscribers","subscription_url":"https://api.github.com/repos/Cognifide/knotx/subscription","commits_url":"https://api.github.com/repos/Cognifide/knotx/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cognifide/knotx/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cognifide/knotx/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cognifide/knotx/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cognifide/knotx/contents/{+path}","compare_url":"https://api.github.com/repos/Cognifide/knotx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cognifide/knotx/merges","archive_url":"https://api.github.com/repos/Cognifide/knotx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cognifide/knotx/downloads","issues_url":"https://api.github.com/repos/Cognifide/knotx/issues{/number}","pulls_url":"https://api.github.com/repos/Cognifide/knotx/pulls{/number}","milestones_url":"https://api.github.com/repos/Cognifide/knotx/milestones{/number}","notifications_url":"https://api.github.com/repos/Cognifide/knotx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cognifide/knotx/labels{/name}","releases_url":"https://api.github.com/repos/Cognifide/knotx/releases{/id}","deployments_url":"https://api.github.com/repos/Cognifide/knotx/deployments","created_at":"2016-06-09T07:00:31Z","updated_at":"2016-09-06T10:21:43Z","pushed_at":"2016-09-06T14:07:39Z","git_url":"git://github.com/Cognifide/knotx.git","ssh_url":"git@github.com:Cognifide/knotx.git","clone_url":"https://github.com/Cognifide/knotx.git","svn_url":"https://github.com/Cognifide/knotx","homepage":"","size":2712,"stargazers_count":19,"watchers_count":19,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":19,"forks":5,"open_issues":19,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cognifide/knotx/pulls/68"},"html":{"href":"https://github.com/Cognifide/knotx/pull/68"},"issue":{"href":"https://api.github.com/repos/Cognifide/knotx/issues/68"},"comments":{"href":"https://api.github.com/repos/Cognifide/knotx/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/Cognifide/knotx/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/Cognifide/knotx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cognifide/knotx/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/Cognifide/knotx/statuses/f3616a2c63d5f754aaba73b1dbcae73186087a39"}}}}
{"actor":{"display_login":"Skejven"}}