Skip to content

Commit

Permalink
Added Google to auth generator
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Apr 5, 2014
1 parent 063beb5 commit 2ed4a32
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gen/jakelib/auth.jake
Expand Up @@ -138,6 +138,8 @@ namespace('auth', function () {
}

// Add new routes to router
// FIXME: This should be done programmatically
// with some sort of enum/loop
if (routerPath) {
// CoffeeScript routes
if (routerPath.match('.coffee')) {
Expand All @@ -150,6 +152,8 @@ namespace('auth', function () {
"router.get('/auth/facebook/callback').to 'Auth.facebookCallback'\n" +
"router.get('/auth/yammer').to 'Auth.yammer'\n" +
"router.get('/auth/yammer/callback').to 'Auth.yammerCallback'\n" +
"router.get('/auth/google').to 'Auth.google'\n" +
"router.get('/auth/google/callback').to 'Auth.googleCallback'\n" +
"router.resource 'users'";
} else {
newRoute = "router.get('/login').to('Main.login');\n" +
Expand All @@ -161,6 +165,8 @@ namespace('auth', function () {
"router.get('/auth/facebook/callback').to('Auth.facebookCallback');\n" +
"router.get('/auth/yammer').to('Auth.yammer');\n" +
"router.get('/auth/yammer/callback').to('Auth.yammerCallback');\n" +
"router.get('/auth/google').to('Auth.google');\n" +
"router.get('/auth/google/callback').to('Auth.googleCallback');\n" +
"router.resource('users');";
}

Expand Down

0 comments on commit 2ed4a32

Please sign in to comment.