{"action":"created","comment":{"url":"https://api.github.com/repos/slamdata/quasar/pulls/comments/42014943","id":42014943,"diff_hunk":"@@ -126,17 +128,19 @@ package object api {\n     def unapply(p: HPath): Option[Path] = AsPath.unapply(p).map(_.asDir)\n   }\n \n-  def staticFileService(basePath: String) = HttpService {\n-    case GET -> AsPath(path) =>\n-      // NB: http4s/http4s#265 should give us a simple way to handle this stuff.\n-      val filePath = basePath + path.toString\n-      StaticFile.fromString(filePath).fold(\n-        StaticFile.fromString(filePath + \"/index.html\").fold(\n-          NotFound(\"Couldn’t find page \" + path.toString))(\n-          Task.now))(\n-        resp => path.file.flatMap(f => fileMediaType(f.value)).fold(\n-          Task.now(resp))(\n-          mt => Task.delay(resp.withContentType(Some(`Content-Type`(mt))))))\n+  object staticFileService {\n+    import FileService.Config\n+\n+    def pathCollector(file: File, config: Config, req: Request): Task[Option[Response]] = Task.now {","path":"web/src/main/scala/quasar/api/package.scala","position":33,"original_position":33,"commit_id":"b31566daf059079f8a6dd456cfaff3bc707367f6","original_commit_id":"b31566daf059079f8a6dd456cfaff3bc707367f6","user":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"body":"Yeah, I missed this, but we should almost never use `Task.now`, regardless of whether we think it might be pure. The exception is primitive values … often `()`.","created_at":"2015-10-14T16:12:34Z","updated_at":"2015-10-14T16:12:34Z","html_url":"https://github.com/slamdata/quasar/pull/958#discussion_r42014943","pull_request_url":"https://api.github.com/repos/slamdata/quasar/pulls/958","_links":{"self":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/comments/42014943"},"html":{"href":"https://github.com/slamdata/quasar/pull/958#discussion_r42014943"},"pull_request":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/958"}}},"pull_request":{"url":"https://api.github.com/repos/slamdata/quasar/pulls/958","id":47608401,"html_url":"https://github.com/slamdata/quasar/pull/958","diff_url":"https://github.com/slamdata/quasar/pull/958.diff","patch_url":"https://github.com/slamdata/quasar/pull/958.patch","issue_url":"https://api.github.com/repos/slamdata/quasar/issues/958","number":958,"state":"open","locked":false,"title":"SD-884: utilize http4s FileService","user":{"login":"drostron","id":318090,"avatar_url":"https://avatars.githubusercontent.com/u/318090?v=3","gravatar_id":"","url":"https://api.github.com/users/drostron","html_url":"https://github.com/drostron","followers_url":"https://api.github.com/users/drostron/followers","following_url":"https://api.github.com/users/drostron/following{/other_user}","gists_url":"https://api.github.com/users/drostron/gists{/gist_id}","starred_url":"https://api.github.com/users/drostron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drostron/subscriptions","organizations_url":"https://api.github.com/users/drostron/orgs","repos_url":"https://api.github.com/users/drostron/repos","events_url":"https://api.github.com/users/drostron/events{/privacy}","received_events_url":"https://api.github.com/users/drostron/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-14T01:19:29Z","updated_at":"2015-10-14T16:12:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51f587c92ec6a9aed4177d38e2791a1781d224a1","assignee":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/slamdata/quasar/pulls/958/commits","review_comments_url":"https://api.github.com/repos/slamdata/quasar/pulls/958/comments","review_comment_url":"https://api.github.com/repos/slamdata/quasar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slamdata/quasar/issues/958/comments","statuses_url":"https://api.github.com/repos/slamdata/quasar/statuses/b31566daf059079f8a6dd456cfaff3bc707367f6","head":{"label":"drostron:wip/SD-884-http4s-static-file","ref":"wip/SD-884-http4s-static-file","sha":"b31566daf059079f8a6dd456cfaff3bc707367f6","user":{"login":"drostron","id":318090,"avatar_url":"https://avatars.githubusercontent.com/u/318090?v=3","gravatar_id":"","url":"https://api.github.com/users/drostron","html_url":"https://github.com/drostron","followers_url":"https://api.github.com/users/drostron/followers","following_url":"https://api.github.com/users/drostron/following{/other_user}","gists_url":"https://api.github.com/users/drostron/gists{/gist_id}","starred_url":"https://api.github.com/users/drostron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drostron/subscriptions","organizations_url":"https://api.github.com/users/drostron/orgs","repos_url":"https://api.github.com/users/drostron/repos","events_url":"https://api.github.com/users/drostron/events{/privacy}","received_events_url":"https://api.github.com/users/drostron/received_events","type":"User","site_admin":false},"repo":{"id":42130881,"name":"quasar","full_name":"drostron/quasar","owner":{"login":"drostron","id":318090,"avatar_url":"https://avatars.githubusercontent.com/u/318090?v=3","gravatar_id":"","url":"https://api.github.com/users/drostron","html_url":"https://github.com/drostron","followers_url":"https://api.github.com/users/drostron/followers","following_url":"https://api.github.com/users/drostron/following{/other_user}","gists_url":"https://api.github.com/users/drostron/gists{/gist_id}","starred_url":"https://api.github.com/users/drostron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drostron/subscriptions","organizations_url":"https://api.github.com/users/drostron/orgs","repos_url":"https://api.github.com/users/drostron/repos","events_url":"https://api.github.com/users/drostron/events{/privacy}","received_events_url":"https://api.github.com/users/drostron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drostron/quasar","description":"A NoSQL analytics engine that embraces post-relational analytics and pushes computation to the data.","fork":true,"url":"https://api.github.com/repos/drostron/quasar","forks_url":"https://api.github.com/repos/drostron/quasar/forks","keys_url":"https://api.github.com/repos/drostron/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drostron/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drostron/quasar/teams","hooks_url":"https://api.github.com/repos/drostron/quasar/hooks","issue_events_url":"https://api.github.com/repos/drostron/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/drostron/quasar/events","assignees_url":"https://api.github.com/repos/drostron/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/drostron/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/drostron/quasar/tags","blobs_url":"https://api.github.com/repos/drostron/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drostron/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drostron/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/drostron/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drostron/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/drostron/quasar/languages","stargazers_url":"https://api.github.com/repos/drostron/quasar/stargazers","contributors_url":"https://api.github.com/repos/drostron/quasar/contributors","subscribers_url":"https://api.github.com/repos/drostron/quasar/subscribers","subscription_url":"https://api.github.com/repos/drostron/quasar/subscription","commits_url":"https://api.github.com/repos/drostron/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/drostron/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/drostron/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/drostron/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/drostron/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/drostron/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drostron/quasar/merges","archive_url":"https://api.github.com/repos/drostron/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drostron/quasar/downloads","issues_url":"https://api.github.com/repos/drostron/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/drostron/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/drostron/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/drostron/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drostron/quasar/labels{/name}","releases_url":"https://api.github.com/repos/drostron/quasar/releases{/id}","created_at":"2015-09-08T18:22:25Z","updated_at":"2015-10-02T00:47:25Z","pushed_at":"2015-10-14T00:40:48Z","git_url":"git://github.com/drostron/quasar.git","ssh_url":"git@github.com:drostron/quasar.git","clone_url":"https://github.com/drostron/quasar.git","svn_url":"https://github.com/drostron/quasar","homepage":"","size":7067,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"slamdata:master","ref":"master","sha":"e677f159c8c9a2089e8cb65bddf77c5bf5339336","user":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"repo":{"id":16515058,"name":"quasar","full_name":"slamdata/quasar","owner":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slamdata/quasar","description":"A NoSQL analytics engine that embraces post-relational analytics and pushes computation to the data.","fork":false,"url":"https://api.github.com/repos/slamdata/quasar","forks_url":"https://api.github.com/repos/slamdata/quasar/forks","keys_url":"https://api.github.com/repos/slamdata/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slamdata/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slamdata/quasar/teams","hooks_url":"https://api.github.com/repos/slamdata/quasar/hooks","issue_events_url":"https://api.github.com/repos/slamdata/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/slamdata/quasar/events","assignees_url":"https://api.github.com/repos/slamdata/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/slamdata/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/slamdata/quasar/tags","blobs_url":"https://api.github.com/repos/slamdata/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slamdata/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slamdata/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/slamdata/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slamdata/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/slamdata/quasar/languages","stargazers_url":"https://api.github.com/repos/slamdata/quasar/stargazers","contributors_url":"https://api.github.com/repos/slamdata/quasar/contributors","subscribers_url":"https://api.github.com/repos/slamdata/quasar/subscribers","subscription_url":"https://api.github.com/repos/slamdata/quasar/subscription","commits_url":"https://api.github.com/repos/slamdata/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/slamdata/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/slamdata/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/slamdata/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/slamdata/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/slamdata/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slamdata/quasar/merges","archive_url":"https://api.github.com/repos/slamdata/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slamdata/quasar/downloads","issues_url":"https://api.github.com/repos/slamdata/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/slamdata/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/slamdata/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/slamdata/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slamdata/quasar/labels{/name}","releases_url":"https://api.github.com/repos/slamdata/quasar/releases{/id}","created_at":"2014-02-04T15:01:27Z","updated_at":"2015-10-05T21:58:41Z","pushed_at":"2015-10-14T15:54:16Z","git_url":"git://github.com/slamdata/quasar.git","ssh_url":"git@github.com:slamdata/quasar.git","clone_url":"https://github.com/slamdata/quasar.git","svn_url":"https://github.com/slamdata/quasar","homepage":"","size":11224,"stargazers_count":154,"watchers_count":154,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":161,"forks":36,"open_issues":161,"watchers":154,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/958"},"html":{"href":"https://github.com/slamdata/quasar/pull/958"},"issue":{"href":"https://api.github.com/repos/slamdata/quasar/issues/958"},"comments":{"href":"https://api.github.com/repos/slamdata/quasar/issues/958/comments"},"review_comments":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/958/comments"},"review_comment":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/958/commits"},"statuses":{"href":"https://api.github.com/repos/slamdata/quasar/statuses/b31566daf059079f8a6dd456cfaff3bc707367f6"}}}}