{"action":"created","comment":{"url":"https://api.github.com/repos/Treode/store/pulls/comments/27291201","id":27291201,"diff_hunk":"@@ -633,4 +633,178 @@ class ResourceSpec extends FreeSpec {\n             .body (equalTo (\"The slice must be between 0 (inclusive) and the number of slices (exclusive).\"))\n           .when\n             .get (\"/table/table1\")\n-        }}}}}\n+        }}}}\n+\n+  \"When post request contains batch-writes\" - {\n+\n+    def addData (table: String, store: SchematicStubStore, key: String, value: String): TxClock =\n+      update (store, TxClock.MinValue, key, value, table)\n+\n+    def updateData (table: String, store: SchematicStubStore, key: String, value: String): TxClock =\n+      update (store, TxClock.now, key, value, table)\n+\n+    \"and gives proper uris\" - {\n+\n+      val body = \"{\\\"v\\\":\\\"ant\\\"}\"\n+      val body2 = \"{\\\"v\\\":\\\"ant2\\\"}\"\n+      val body3 = \"{\\\"v\\\":\\\"ant3\\\"}\"\n+      val body4 = \"{\\\"v\\\":\\\"ant4\\\"}\"\n+      val key = \"\\\"abc\\\"\"\n+      val key2 = \"\\\"abc2\\\"\"\n+      val key3 = \"\\\"abc3\\\"\"\n+      val key4 = \"\\\"abc4\\\"\"\n+\n+      \"POST /batch-write [{\\\"op\\\":\\\"CREATE\\\",\\\"table\\\":\\\"table1\\\",\\\"key\\\":\\\"abc\\\",\\\"obj\\\":{\\\"v\\\":\\\"ant\\\"}}] should yield Ok\" in {\n+        served { case (port, store) =>\n+          val rsp = given\n+            .port (port)\n+            .contentType (\"application/json\")\n+            .body (\"[{\\\"op\\\":\\\"CREATE\\\",\\\"table\\\":\\\"table1\\\",\\\"key\\\":\\\"abc\\\",\\\"obj\\\":{\\\"v\\\":\\\"ant\\\"}}]\")","path":"server/test/com/treode/server/ResourceSpec.scala","position":60,"original_position":60,"commit_id":"31bb356c4a4195ee77785aa59b089c15d81f1919","original_commit_id":"31bb356c4a4195ee77785aa59b089c15d81f1919","user":{"login":"Topher-the-Geek","id":588423,"avatar_url":"https://avatars.githubusercontent.com/u/588423?v=3","gravatar_id":"","url":"https://api.github.com/users/Topher-the-Geek","html_url":"https://github.com/Topher-the-Geek","followers_url":"https://api.github.com/users/Topher-the-Geek/followers","following_url":"https://api.github.com/users/Topher-the-Geek/following{/other_user}","gists_url":"https://api.github.com/users/Topher-the-Geek/gists{/gist_id}","starred_url":"https://api.github.com/users/Topher-the-Geek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Topher-the-Geek/subscriptions","organizations_url":"https://api.github.com/users/Topher-the-Geek/orgs","repos_url":"https://api.github.com/users/Topher-the-Geek/repos","events_url":"https://api.github.com/users/Topher-the-Geek/events{/privacy}","received_events_url":"https://api.github.com/users/Topher-the-Geek/received_events","type":"User","site_admin":false},"body":"You can save yourself from \\ woes by using tripple quotes. `\"a \\\"string\\\" in quotes\"` becomes `\"\"\"a \"string\" in quotes\"\"\"`","created_at":"2015-03-27T12:33:09Z","updated_at":"2015-03-27T12:33:09Z","html_url":"https://github.com/Treode/store/pull/138#discussion_r27291201","pull_request_url":"https://api.github.com/repos/Treode/store/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/Treode/store/pulls/comments/27291201"},"html":{"href":"https://github.com/Treode/store/pull/138#discussion_r27291201"},"pull_request":{"href":"https://api.github.com/repos/Treode/store/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/Treode/store/pulls/138","id":32044817,"html_url":"https://github.com/Treode/store/pull/138","diff_url":"https://github.com/Treode/store/pull/138.diff","patch_url":"https://github.com/Treode/store/pull/138.patch","issue_url":"https://api.github.com/repos/Treode/store/issues/138","number":138,"state":"open","locked":false,"title":"batch-write with tests","user":{"login":"krishkoushik","id":4528114,"avatar_url":"https://avatars.githubusercontent.com/u/4528114?v=3","gravatar_id":"","url":"https://api.github.com/users/krishkoushik","html_url":"https://github.com/krishkoushik","followers_url":"https://api.github.com/users/krishkoushik/followers","following_url":"https://api.github.com/users/krishkoushik/following{/other_user}","gists_url":"https://api.github.com/users/krishkoushik/gists{/gist_id}","starred_url":"https://api.github.com/users/krishkoushik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishkoushik/subscriptions","organizations_url":"https://api.github.com/users/krishkoushik/orgs","repos_url":"https://api.github.com/users/krishkoushik/repos","events_url":"https://api.github.com/users/krishkoushik/events{/privacy}","received_events_url":"https://api.github.com/users/krishkoushik/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-26T18:08:50Z","updated_at":"2015-03-27T12:33:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6de259dc778c0462307162ebd2b0c2185608d914","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Treode/store/pulls/138/commits","review_comments_url":"https://api.github.com/repos/Treode/store/pulls/138/comments","review_comment_url":"https://api.github.com/repos/Treode/store/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Treode/store/issues/138/comments","statuses_url":"https://api.github.com/repos/Treode/store/statuses/31bb356c4a4195ee77785aa59b089c15d81f1919","head":{"label":"krishkoushik:batch-write","ref":"batch-write","sha":"31bb356c4a4195ee77785aa59b089c15d81f1919","user":{"login":"krishkoushik","id":4528114,"avatar_url":"https://avatars.githubusercontent.com/u/4528114?v=3","gravatar_id":"","url":"https://api.github.com/users/krishkoushik","html_url":"https://github.com/krishkoushik","followers_url":"https://api.github.com/users/krishkoushik/followers","following_url":"https://api.github.com/users/krishkoushik/following{/other_user}","gists_url":"https://api.github.com/users/krishkoushik/gists{/gist_id}","starred_url":"https://api.github.com/users/krishkoushik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishkoushik/subscriptions","organizations_url":"https://api.github.com/users/krishkoushik/orgs","repos_url":"https://api.github.com/users/krishkoushik/repos","events_url":"https://api.github.com/users/krishkoushik/events{/privacy}","received_events_url":"https://api.github.com/users/krishkoushik/received_events","type":"User","site_admin":false},"repo":{"id":29188939,"name":"store","full_name":"krishkoushik/store","owner":{"login":"krishkoushik","id":4528114,"avatar_url":"https://avatars.githubusercontent.com/u/4528114?v=3","gravatar_id":"","url":"https://api.github.com/users/krishkoushik","html_url":"https://github.com/krishkoushik","followers_url":"https://api.github.com/users/krishkoushik/followers","following_url":"https://api.github.com/users/krishkoushik/following{/other_user}","gists_url":"https://api.github.com/users/krishkoushik/gists{/gist_id}","starred_url":"https://api.github.com/users/krishkoushik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishkoushik/subscriptions","organizations_url":"https://api.github.com/users/krishkoushik/orgs","repos_url":"https://api.github.com/users/krishkoushik/repos","events_url":"https://api.github.com/users/krishkoushik/events{/privacy}","received_events_url":"https://api.github.com/users/krishkoushik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krishkoushik/store","description":"The DB that's replicated, sharded and transactional.","fork":true,"url":"https://api.github.com/repos/krishkoushik/store","forks_url":"https://api.github.com/repos/krishkoushik/store/forks","keys_url":"https://api.github.com/repos/krishkoushik/store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krishkoushik/store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krishkoushik/store/teams","hooks_url":"https://api.github.com/repos/krishkoushik/store/hooks","issue_events_url":"https://api.github.com/repos/krishkoushik/store/issues/events{/number}","events_url":"https://api.github.com/repos/krishkoushik/store/events","assignees_url":"https://api.github.com/repos/krishkoushik/store/assignees{/user}","branches_url":"https://api.github.com/repos/krishkoushik/store/branches{/branch}","tags_url":"https://api.github.com/repos/krishkoushik/store/tags","blobs_url":"https://api.github.com/repos/krishkoushik/store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krishkoushik/store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krishkoushik/store/git/refs{/sha}","trees_url":"https://api.github.com/repos/krishkoushik/store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krishkoushik/store/statuses/{sha}","languages_url":"https://api.github.com/repos/krishkoushik/store/languages","stargazers_url":"https://api.github.com/repos/krishkoushik/store/stargazers","contributors_url":"https://api.github.com/repos/krishkoushik/store/contributors","subscribers_url":"https://api.github.com/repos/krishkoushik/store/subscribers","subscription_url":"https://api.github.com/repos/krishkoushik/store/subscription","commits_url":"https://api.github.com/repos/krishkoushik/store/commits{/sha}","git_commits_url":"https://api.github.com/repos/krishkoushik/store/git/commits{/sha}","comments_url":"https://api.github.com/repos/krishkoushik/store/comments{/number}","issue_comment_url":"https://api.github.com/repos/krishkoushik/store/issues/comments{/number}","contents_url":"https://api.github.com/repos/krishkoushik/store/contents/{+path}","compare_url":"https://api.github.com/repos/krishkoushik/store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krishkoushik/store/merges","archive_url":"https://api.github.com/repos/krishkoushik/store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krishkoushik/store/downloads","issues_url":"https://api.github.com/repos/krishkoushik/store/issues{/number}","pulls_url":"https://api.github.com/repos/krishkoushik/store/pulls{/number}","milestones_url":"https://api.github.com/repos/krishkoushik/store/milestones{/number}","notifications_url":"https://api.github.com/repos/krishkoushik/store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krishkoushik/store/labels{/name}","releases_url":"https://api.github.com/repos/krishkoushik/store/releases{/id}","created_at":"2015-01-13T12:30:29Z","updated_at":"2015-03-12T19:26:21Z","pushed_at":"2015-03-26T17:59:40Z","git_url":"git://github.com/krishkoushik/store.git","ssh_url":"git@github.com:krishkoushik/store.git","clone_url":"https://github.com/krishkoushik/store.git","svn_url":"https://github.com/krishkoushik/store","homepage":"http://treode.github.io","size":3517,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Treode:master","ref":"master","sha":"2bac7f05c3f0592c6f7027450f39731d3bd99cd1","user":{"login":"Treode","id":2206833,"avatar_url":"https://avatars.githubusercontent.com/u/2206833?v=3","gravatar_id":"","url":"https://api.github.com/users/Treode","html_url":"https://github.com/Treode","followers_url":"https://api.github.com/users/Treode/followers","following_url":"https://api.github.com/users/Treode/following{/other_user}","gists_url":"https://api.github.com/users/Treode/gists{/gist_id}","starred_url":"https://api.github.com/users/Treode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treode/subscriptions","organizations_url":"https://api.github.com/users/Treode/orgs","repos_url":"https://api.github.com/users/Treode/repos","events_url":"https://api.github.com/users/Treode/events{/privacy}","received_events_url":"https://api.github.com/users/Treode/received_events","type":"Organization","site_admin":false},"repo":{"id":13677899,"name":"store","full_name":"Treode/store","owner":{"login":"Treode","id":2206833,"avatar_url":"https://avatars.githubusercontent.com/u/2206833?v=3","gravatar_id":"","url":"https://api.github.com/users/Treode","html_url":"https://github.com/Treode","followers_url":"https://api.github.com/users/Treode/followers","following_url":"https://api.github.com/users/Treode/following{/other_user}","gists_url":"https://api.github.com/users/Treode/gists{/gist_id}","starred_url":"https://api.github.com/users/Treode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Treode/subscriptions","organizations_url":"https://api.github.com/users/Treode/orgs","repos_url":"https://api.github.com/users/Treode/repos","events_url":"https://api.github.com/users/Treode/events{/privacy}","received_events_url":"https://api.github.com/users/Treode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Treode/store","description":"The DB that's replicated, sharded and transactional.","fork":false,"url":"https://api.github.com/repos/Treode/store","forks_url":"https://api.github.com/repos/Treode/store/forks","keys_url":"https://api.github.com/repos/Treode/store/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Treode/store/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Treode/store/teams","hooks_url":"https://api.github.com/repos/Treode/store/hooks","issue_events_url":"https://api.github.com/repos/Treode/store/issues/events{/number}","events_url":"https://api.github.com/repos/Treode/store/events","assignees_url":"https://api.github.com/repos/Treode/store/assignees{/user}","branches_url":"https://api.github.com/repos/Treode/store/branches{/branch}","tags_url":"https://api.github.com/repos/Treode/store/tags","blobs_url":"https://api.github.com/repos/Treode/store/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Treode/store/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Treode/store/git/refs{/sha}","trees_url":"https://api.github.com/repos/Treode/store/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Treode/store/statuses/{sha}","languages_url":"https://api.github.com/repos/Treode/store/languages","stargazers_url":"https://api.github.com/repos/Treode/store/stargazers","contributors_url":"https://api.github.com/repos/Treode/store/contributors","subscribers_url":"https://api.github.com/repos/Treode/store/subscribers","subscription_url":"https://api.github.com/repos/Treode/store/subscription","commits_url":"https://api.github.com/repos/Treode/store/commits{/sha}","git_commits_url":"https://api.github.com/repos/Treode/store/git/commits{/sha}","comments_url":"https://api.github.com/repos/Treode/store/comments{/number}","issue_comment_url":"https://api.github.com/repos/Treode/store/issues/comments{/number}","contents_url":"https://api.github.com/repos/Treode/store/contents/{+path}","compare_url":"https://api.github.com/repos/Treode/store/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Treode/store/merges","archive_url":"https://api.github.com/repos/Treode/store/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Treode/store/downloads","issues_url":"https://api.github.com/repos/Treode/store/issues{/number}","pulls_url":"https://api.github.com/repos/Treode/store/pulls{/number}","milestones_url":"https://api.github.com/repos/Treode/store/milestones{/number}","notifications_url":"https://api.github.com/repos/Treode/store/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Treode/store/labels{/name}","releases_url":"https://api.github.com/repos/Treode/store/releases{/id}","created_at":"2013-10-18T12:50:58Z","updated_at":"2015-03-26T16:57:54Z","pushed_at":"2015-03-27T04:45:48Z","git_url":"git://github.com/Treode/store.git","ssh_url":"git@github.com:Treode/store.git","clone_url":"https://github.com/Treode/store.git","svn_url":"https://github.com/Treode/store","homepage":"http://treode.github.io","size":8405,"stargazers_count":131,"watchers_count":131,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":2,"forks":16,"open_issues":2,"watchers":131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Treode/store/pulls/138"},"html":{"href":"https://github.com/Treode/store/pull/138"},"issue":{"href":"https://api.github.com/repos/Treode/store/issues/138"},"comments":{"href":"https://api.github.com/repos/Treode/store/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/Treode/store/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/Treode/store/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Treode/store/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/Treode/store/statuses/31bb356c4a4195ee77785aa59b089c15d81f1919"}}}}