{"action":"created","issue":{"url":"https://api.github.com/repos/finagle/finch/issues/147","labels_url":"https://api.github.com/repos/finagle/finch/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/finagle/finch/issues/147/comments","events_url":"https://api.github.com/repos/finagle/finch/issues/147/events","html_url":"https://github.com/finagle/finch/pull/147","id":55377819,"number":147,"title":"Intoroduce io.finch.route package","user":{"login":"vkostyukov","id":1098539,"avatar_url":"https://avatars.githubusercontent.com/u/1098539?v=3","gravatar_id":"","url":"https://api.github.com/users/vkostyukov","html_url":"https://github.com/vkostyukov","followers_url":"https://api.github.com/users/vkostyukov/followers","following_url":"https://api.github.com/users/vkostyukov/following{/other_user}","gists_url":"https://api.github.com/users/vkostyukov/gists{/gist_id}","starred_url":"https://api.github.com/users/vkostyukov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkostyukov/subscriptions","organizations_url":"https://api.github.com/users/vkostyukov/orgs","repos_url":"https://api.github.com/users/vkostyukov/repos","events_url":"https://api.github.com/users/vkostyukov/events{/privacy}","received_events_url":"https://api.github.com/users/vkostyukov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":38,"created_at":"2015-01-24T17:12:23Z","updated_at":"2015-01-27T01:42:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/finagle/finch/pulls/147","html_url":"https://github.com/finagle/finch/pull/147","diff_url":"https://github.com/finagle/finch/pull/147.diff","patch_url":"https://github.com/finagle/finch/pull/147.patch"},"body":"This is an initial implementation of route combinators as discussed in #146. There is no DSL layer yet - just raw classes. So, for now we have to explicitly create new instances like `StringMatcher` and `StringExtractor`. The next step would be to write a bunch of implicit conversion in order to enable full-featured DSL.\r\n\r\nBut now I wanted to collect a feedback and ask for an advice. I don't really think we need both `RouteMatcher` and `RouteExtractor`. My primary goal now is to replace them both with just `Router`. I would love to hear your advices @pasviegas, @benjumanji, @rodrigopr and @rpless on how can we achieve it.\r\n\r\nThe main problem here is that there are routers that don't extract anything but match something: `Get`, `StringMatcher`. So, the problem is in `RouteExtractor.flatMap` method. Let's say we have just `Router` and define `Get` as `Router[Unit]`. And when we flatMap it to `Router[Int]` we will get `Router[Unit / Int]`, which is wrong.\r\n\r\nAnyway. The main idea i was trying to show is that router is just a function `Route => A`. And if `A` is `Service[Req, Rep]` we can call such router an `Endpoint`, since it takes a route and returns a service. This is exactly what endpoint is."},"comment":{"url":"https://api.github.com/repos/finagle/finch/issues/comments/71575628","html_url":"https://github.com/finagle/finch/pull/147#issuecomment-71575628","issue_url":"https://api.github.com/repos/finagle/finch/issues/147","id":71575628,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T01:42:44Z","updated_at":"2015-01-27T01:42:44Z","body":"\n[![Coverage Status](https://coveralls.io/builds/1810492/badge)](https://coveralls.io/builds/1810492)\n\nCoverage increased (+0.43%) to 92.59% when pulling **2b8727e65734b1d8e4a38131d17a34c2b8a9cdb7 on route-combinators** into **52e5ec6673d155a91961f24ac2b331b7c51fd510 on master**.\n"}}