     $.post('/logout', () =>
        window.location = "/")
 
+  unsupportedRoute: (cx) =>
+    throw("Unsupported route: " + cx.params.splat)
+
   projects_with_status: (filter) => @komp =>
     p for p in @projects() when p.status() == filter
 

    @get('/gh/:username/:project', (cx) -> VM.loadProject cx, cx.params.username, cx.params.project)
    @get('/logout', (cx) -> VM.logout(cx))
    @get('/admin(.*)', (cx) -> VM.loadAdminPage(cx, cx.params.splat))
  ).run stripTrailingSlash(window.location.pathname)



VM = new CircleViewModel()
stripTrailingSlash = (str) =>
  str.replace(/(.+)\/$/, "$1")

$(document).ready () ->
  Sammy('#app', () ->
