{"action":"created","comment":{"url":"https://api.github.com/repos/devlucky/Kakapo/pulls/comments/80510555","id":80510555,"diff_hunk":"@@ -213,6 +213,70 @@ class RouterTests: QuickSpec {\n                 expect(usersCommentsResponseURL?.absoluteString).toEventually(equal(\"http://www.test.com/users/1/comments/2?page=2&author=hector\"))\n             }\n             \n+            it(\"should call handlers with same registered url but different http methods\") {\n+                var calledPost = false\n+                var calledPut = false\n+                var calledDel = false\n+                \n+                router.post(\"/users/:user_id\") { (request) -> Serializable? in\n+                    calledPost = true\n+                    return nil\n+                }\n+                \n+                router.put(\"/users/:user_id\") { (request) -> Serializable? in\n+                    calledPut = true\n+                    return nil\n+                }\n+                \n+                router.del(\"/users/:user_id\") { (request) -> Serializable? in\n+                    calledDel = true\n+                    return nil\n+                }\n+                \n+                var request = NSMutableURLRequest(URL: NSURL(string: \"http://www.test.com/users/1\")!)\n+                request.HTTPMethod = \"POST\"\n+                NSURLSession.sharedSession().dataTaskWithRequest(request) { (_, _, _) in }.resume()\n+                \n+                expect(calledPost).toEventually(beTrue())\n+                \n+                request = NSMutableURLRequest(URL: NSURL(string: \"http://www.test.com/users/1\")!)\n+                request.HTTPMethod = \"PUT\"\n+                NSURLSession.sharedSession().dataTaskWithRequest(request) { (_, _, _) in }.resume()\n+                \n+                expect(calledPut).toEventually(beTrue())\n+                \n+                request = NSMutableURLRequest(URL: NSURL(string: \"http://www.test.com/users/1\")!)\n+                request.HTTPMethod = \"DELETE\"\n+                NSURLSession.sharedSession().dataTaskWithRequest(request) { (_, _, _) in }.resume()\n+                \n+                expect(calledDel).toEventually(beTrue())\n+            }\n+            \n+            it(\"should properly replace handlers with same registered url and http methods\") {","path":"Tests/RouterTests.swift","position":43,"original_position":43,"commit_id":"2e2f25614e7d8506aa534fff2504af81c1618d9a","original_commit_id":"b558a6811d86a28e240eed4e7eee054668bc1bf1","user":{"login":"MP0w","id":1812932,"avatar_url":"https://avatars.githubusercontent.com/u/1812932?v=3","gravatar_id":"","url":"https://api.github.com/users/MP0w","html_url":"https://github.com/MP0w","followers_url":"https://api.github.com/users/MP0w/followers","following_url":"https://api.github.com/users/MP0w/following{/other_user}","gists_url":"https://api.github.com/users/MP0w/gists{/gist_id}","starred_url":"https://api.github.com/users/MP0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MP0w/subscriptions","organizations_url":"https://api.github.com/users/MP0w/orgs","repos_url":"https://api.github.com/users/MP0w/repos","events_url":"https://api.github.com/users/MP0w/events{/privacy}","received_events_url":"https://api.github.com/users/MP0w/received_events","type":"User","site_admin":false},"body":"properly can actually be avoided, no?","created_at":"2016-09-26T16:05:01Z","updated_at":"2016-09-26T16:09:17Z","html_url":"https://github.com/devlucky/Kakapo/pull/127#discussion_r80510555","pull_request_url":"https://api.github.com/repos/devlucky/Kakapo/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/devlucky/Kakapo/pulls/comments/80510555"},"html":{"href":"https://github.com/devlucky/Kakapo/pull/127#discussion_r80510555"},"pull_request":{"href":"https://api.github.com/repos/devlucky/Kakapo/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/devlucky/Kakapo/pulls/127","id":86770198,"html_url":"https://github.com/devlucky/Kakapo/pull/127","diff_url":"https://github.com/devlucky/Kakapo/pull/127.diff","patch_url":"https://github.com/devlucky/Kakapo/pull/127.patch","issue_url":"https://api.github.com/repos/devlucky/Kakapo/issues/127","number":127,"state":"open","locked":false,"title":"Fix Router to handle same url with different HTTP methods","user":{"login":"joanromano","id":1227808,"avatar_url":"https://avatars.githubusercontent.com/u/1227808?v=3","gravatar_id":"","url":"https://api.github.com/users/joanromano","html_url":"https://github.com/joanromano","followers_url":"https://api.github.com/users/joanromano/followers","following_url":"https://api.github.com/users/joanromano/following{/other_user}","gists_url":"https://api.github.com/users/joanromano/gists{/gist_id}","starred_url":"https://api.github.com/users/joanromano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joanromano/subscriptions","organizations_url":"https://api.github.com/users/joanromano/orgs","repos_url":"https://api.github.com/users/joanromano/repos","events_url":"https://api.github.com/users/joanromano/events{/privacy}","received_events_url":"https://api.github.com/users/joanromano/received_events","type":"User","site_admin":false},"body":"Might be also of interest for @leviathan ","created_at":"2016-09-26T15:58:11Z","updated_at":"2016-09-26T16:09:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bef6bd4d330294ec625ffbd0dac1cfdde97d8b3b","assignee":{"login":"MP0w","id":1812932,"avatar_url":"https://avatars.githubusercontent.com/u/1812932?v=3","gravatar_id":"","url":"https://api.github.com/users/MP0w","html_url":"https://github.com/MP0w","followers_url":"https://api.github.com/users/MP0w/followers","following_url":"https://api.github.com/users/MP0w/following{/other_user}","gists_url":"https://api.github.com/users/MP0w/gists{/gist_id}","starred_url":"https://api.github.com/users/MP0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MP0w/subscriptions","organizations_url":"https://api.github.com/users/MP0w/orgs","repos_url":"https://api.github.com/users/MP0w/repos","events_url":"https://api.github.com/users/MP0w/events{/privacy}","received_events_url":"https://api.github.com/users/MP0w/received_events","type":"User","site_admin":false},"assignees":[{"login":"MP0w","id":1812932,"avatar_url":"https://avatars.githubusercontent.com/u/1812932?v=3","gravatar_id":"","url":"https://api.github.com/users/MP0w","html_url":"https://github.com/MP0w","followers_url":"https://api.github.com/users/MP0w/followers","following_url":"https://api.github.com/users/MP0w/following{/other_user}","gists_url":"https://api.github.com/users/MP0w/gists{/gist_id}","starred_url":"https://api.github.com/users/MP0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MP0w/subscriptions","organizations_url":"https://api.github.com/users/MP0w/orgs","repos_url":"https://api.github.com/users/MP0w/repos","events_url":"https://api.github.com/users/MP0w/events{/privacy}","received_events_url":"https://api.github.com/users/MP0w/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/devlucky/Kakapo/pulls/127/commits","review_comments_url":"https://api.github.com/repos/devlucky/Kakapo/pulls/127/comments","review_comment_url":"https://api.github.com/repos/devlucky/Kakapo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/devlucky/Kakapo/issues/127/comments","statuses_url":"https://api.github.com/repos/devlucky/Kakapo/statuses/2e2f25614e7d8506aa534fff2504af81c1618d9a","head":{"label":"devlucky:fix/RouterHandlerSameUrlDifferentMethod","ref":"fix/RouterHandlerSameUrlDifferentMethod","sha":"2e2f25614e7d8506aa534fff2504af81c1618d9a","user":{"login":"devlucky","id":18127620,"avatar_url":"https://avatars.githubusercontent.com/u/18127620?v=3","gravatar_id":"","url":"https://api.github.com/users/devlucky","html_url":"https://github.com/devlucky","followers_url":"https://api.github.com/users/devlucky/followers","following_url":"https://api.github.com/users/devlucky/following{/other_user}","gists_url":"https://api.github.com/users/devlucky/gists{/gist_id}","starred_url":"https://api.github.com/users/devlucky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devlucky/subscriptions","organizations_url":"https://api.github.com/users/devlucky/orgs","repos_url":"https://api.github.com/users/devlucky/repos","events_url":"https://api.github.com/users/devlucky/events{/privacy}","received_events_url":"https://api.github.com/users/devlucky/received_events","type":"Organization","site_admin":false},"repo":{"id":54993813,"name":"Kakapo","full_name":"devlucky/Kakapo","owner":{"login":"devlucky","id":18127620,"avatar_url":"https://avatars.githubusercontent.com/u/18127620?v=3","gravatar_id":"","url":"https://api.github.com/users/devlucky","html_url":"https://github.com/devlucky","followers_url":"https://api.github.com/users/devlucky/followers","following_url":"https://api.github.com/users/devlucky/following{/other_user}","gists_url":"https://api.github.com/users/devlucky/gists{/gist_id}","starred_url":"https://api.github.com/users/devlucky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devlucky/subscriptions","organizations_url":"https://api.github.com/users/devlucky/orgs","repos_url":"https://api.github.com/users/devlucky/repos","events_url":"https://api.github.com/users/devlucky/events{/privacy}","received_events_url":"https://api.github.com/users/devlucky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/devlucky/Kakapo","description":"🐤Dynamically Mock server behaviors and responses in Swift","fork":false,"url":"https://api.github.com/repos/devlucky/Kakapo","forks_url":"https://api.github.com/repos/devlucky/Kakapo/forks","keys_url":"https://api.github.com/repos/devlucky/Kakapo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devlucky/Kakapo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devlucky/Kakapo/teams","hooks_url":"https://api.github.com/repos/devlucky/Kakapo/hooks","issue_events_url":"https://api.github.com/repos/devlucky/Kakapo/issues/events{/number}","events_url":"https://api.github.com/repos/devlucky/Kakapo/events","assignees_url":"https://api.github.com/repos/devlucky/Kakapo/assignees{/user}","branches_url":"https://api.github.com/repos/devlucky/Kakapo/branches{/branch}","tags_url":"https://api.github.com/repos/devlucky/Kakapo/tags","blobs_url":"https://api.github.com/repos/devlucky/Kakapo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devlucky/Kakapo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devlucky/Kakapo/git/refs{/sha}","trees_url":"https://api.github.com/repos/devlucky/Kakapo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devlucky/Kakapo/statuses/{sha}","languages_url":"https://api.github.com/repos/devlucky/Kakapo/languages","stargazers_url":"https://api.github.com/repos/devlucky/Kakapo/stargazers","contributors_url":"https://api.github.com/repos/devlucky/Kakapo/contributors","subscribers_url":"https://api.github.com/repos/devlucky/Kakapo/subscribers","subscription_url":"https://api.github.com/repos/devlucky/Kakapo/subscription","commits_url":"https://api.github.com/repos/devlucky/Kakapo/commits{/sha}","git_commits_url":"https://api.github.com/repos/devlucky/Kakapo/git/commits{/sha}","comments_url":"https://api.github.com/repos/devlucky/Kakapo/comments{/number}","issue_comment_url":"https://api.github.com/repos/devlucky/Kakapo/issues/comments{/number}","contents_url":"https://api.github.com/repos/devlucky/Kakapo/contents/{+path}","compare_url":"https://api.github.com/repos/devlucky/Kakapo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devlucky/Kakapo/merges","archive_url":"https://api.github.com/repos/devlucky/Kakapo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devlucky/Kakapo/downloads","issues_url":"https://api.github.com/repos/devlucky/Kakapo/issues{/number}","pulls_url":"https://api.github.com/repos/devlucky/Kakapo/pulls{/number}","milestones_url":"https://api.github.com/repos/devlucky/Kakapo/milestones{/number}","notifications_url":"https://api.github.com/repos/devlucky/Kakapo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devlucky/Kakapo/labels{/name}","releases_url":"https://api.github.com/repos/devlucky/Kakapo/releases{/id}","deployments_url":"https://api.github.com/repos/devlucky/Kakapo/deployments","created_at":"2016-03-29T16:57:21Z","updated_at":"2016-09-26T12:43:35Z","pushed_at":"2016-09-26T16:04:31Z","git_url":"git://github.com/devlucky/Kakapo.git","ssh_url":"git@github.com:devlucky/Kakapo.git","clone_url":"https://github.com/devlucky/Kakapo.git","svn_url":"https://github.com/devlucky/Kakapo","homepage":"devlucky.github.io/kakapo-swift","size":2131,"stargazers_count":607,"watchers_count":607,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":19,"forks":21,"open_issues":19,"watchers":607,"default_branch":"master"}},"base":{"label":"devlucky:master","ref":"master","sha":"7450b8f343dbf5bd97523c52e03509d8ced580b3","user":{"login":"devlucky","id":18127620,"avatar_url":"https://avatars.githubusercontent.com/u/18127620?v=3","gravatar_id":"","url":"https://api.github.com/users/devlucky","html_url":"https://github.com/devlucky","followers_url":"https://api.github.com/users/devlucky/followers","following_url":"https://api.github.com/users/devlucky/following{/other_user}","gists_url":"https://api.github.com/users/devlucky/gists{/gist_id}","starred_url":"https://api.github.com/users/devlucky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devlucky/subscriptions","organizations_url":"https://api.github.com/users/devlucky/orgs","repos_url":"https://api.github.com/users/devlucky/repos","events_url":"https://api.github.com/users/devlucky/events{/privacy}","received_events_url":"https://api.github.com/users/devlucky/received_events","type":"Organization","site_admin":false},"repo":{"id":54993813,"name":"Kakapo","full_name":"devlucky/Kakapo","owner":{"login":"devlucky","id":18127620,"avatar_url":"https://avatars.githubusercontent.com/u/18127620?v=3","gravatar_id":"","url":"https://api.github.com/users/devlucky","html_url":"https://github.com/devlucky","followers_url":"https://api.github.com/users/devlucky/followers","following_url":"https://api.github.com/users/devlucky/following{/other_user}","gists_url":"https://api.github.com/users/devlucky/gists{/gist_id}","starred_url":"https://api.github.com/users/devlucky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devlucky/subscriptions","organizations_url":"https://api.github.com/users/devlucky/orgs","repos_url":"https://api.github.com/users/devlucky/repos","events_url":"https://api.github.com/users/devlucky/events{/privacy}","received_events_url":"https://api.github.com/users/devlucky/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/devlucky/Kakapo","description":"🐤Dynamically Mock server behaviors and responses in Swift","fork":false,"url":"https://api.github.com/repos/devlucky/Kakapo","forks_url":"https://api.github.com/repos/devlucky/Kakapo/forks","keys_url":"https://api.github.com/repos/devlucky/Kakapo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devlucky/Kakapo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devlucky/Kakapo/teams","hooks_url":"https://api.github.com/repos/devlucky/Kakapo/hooks","issue_events_url":"https://api.github.com/repos/devlucky/Kakapo/issues/events{/number}","events_url":"https://api.github.com/repos/devlucky/Kakapo/events","assignees_url":"https://api.github.com/repos/devlucky/Kakapo/assignees{/user}","branches_url":"https://api.github.com/repos/devlucky/Kakapo/branches{/branch}","tags_url":"https://api.github.com/repos/devlucky/Kakapo/tags","blobs_url":"https://api.github.com/repos/devlucky/Kakapo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devlucky/Kakapo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devlucky/Kakapo/git/refs{/sha}","trees_url":"https://api.github.com/repos/devlucky/Kakapo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devlucky/Kakapo/statuses/{sha}","languages_url":"https://api.github.com/repos/devlucky/Kakapo/languages","stargazers_url":"https://api.github.com/repos/devlucky/Kakapo/stargazers","contributors_url":"https://api.github.com/repos/devlucky/Kakapo/contributors","subscribers_url":"https://api.github.com/repos/devlucky/Kakapo/subscribers","subscription_url":"https://api.github.com/repos/devlucky/Kakapo/subscription","commits_url":"https://api.github.com/repos/devlucky/Kakapo/commits{/sha}","git_commits_url":"https://api.github.com/repos/devlucky/Kakapo/git/commits{/sha}","comments_url":"https://api.github.com/repos/devlucky/Kakapo/comments{/number}","issue_comment_url":"https://api.github.com/repos/devlucky/Kakapo/issues/comments{/number}","contents_url":"https://api.github.com/repos/devlucky/Kakapo/contents/{+path}","compare_url":"https://api.github.com/repos/devlucky/Kakapo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devlucky/Kakapo/merges","archive_url":"https://api.github.com/repos/devlucky/Kakapo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devlucky/Kakapo/downloads","issues_url":"https://api.github.com/repos/devlucky/Kakapo/issues{/number}","pulls_url":"https://api.github.com/repos/devlucky/Kakapo/pulls{/number}","milestones_url":"https://api.github.com/repos/devlucky/Kakapo/milestones{/number}","notifications_url":"https://api.github.com/repos/devlucky/Kakapo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devlucky/Kakapo/labels{/name}","releases_url":"https://api.github.com/repos/devlucky/Kakapo/releases{/id}","deployments_url":"https://api.github.com/repos/devlucky/Kakapo/deployments","created_at":"2016-03-29T16:57:21Z","updated_at":"2016-09-26T12:43:35Z","pushed_at":"2016-09-26T16:04:31Z","git_url":"git://github.com/devlucky/Kakapo.git","ssh_url":"git@github.com:devlucky/Kakapo.git","clone_url":"https://github.com/devlucky/Kakapo.git","svn_url":"https://github.com/devlucky/Kakapo","homepage":"devlucky.github.io/kakapo-swift","size":2131,"stargazers_count":607,"watchers_count":607,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":19,"forks":21,"open_issues":19,"watchers":607,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/devlucky/Kakapo/pulls/127"},"html":{"href":"https://github.com/devlucky/Kakapo/pull/127"},"issue":{"href":"https://api.github.com/repos/devlucky/Kakapo/issues/127"},"comments":{"href":"https://api.github.com/repos/devlucky/Kakapo/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/devlucky/Kakapo/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/devlucky/Kakapo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/devlucky/Kakapo/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/devlucky/Kakapo/statuses/2e2f25614e7d8506aa534fff2504af81c1618d9a"}}}}
{"actor":{"display_login":"MP0w"}}