Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Merge branch 'pr/24' into 0.3.0
Browse files Browse the repository at this point in the history
Conflicts:
	config/env/all.js
	config/express.js
	package.json
  • Loading branch information
amoshaviv committed Apr 23, 2014
2 parents f132e10 + ff4ae8b commit c7a14f8
Show file tree
Hide file tree
Showing 19 changed files with 68 additions and 60 deletions.
9 changes: 5 additions & 4 deletions config/env/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js',
keywords: 'mongodb, express, angularjs, node.js, mongoose, passport'
},
root: rootPath,
port: process.env.PORT || 3000,
templateEngine: 'swig',
sessionSecret: 'MEAN',
Expand All @@ -20,13 +19,15 @@ module.exports = {
'public/lib/bootstrap/dist/css/bootstrap-theme.css',
'public/modules/**/css/*.css'
],
js: [
lib: [
'public/lib/angular/angular.js',
'public/lib/angular-resource/angular-resource.js',
'public/lib/angular-animate/angular-animate.js',
'public/lib/angular-ui-router/release/angular-ui-router.js',
'public/lib/angular-ui-utils/ui-utils.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js'
],
js: [
'public/config.js',
'public/application.js',
'public/modules/*/*.js',
Expand All @@ -37,4 +38,4 @@ module.exports = {
'public/modules/*/tests/*.js'
]
}
};
};
26 changes: 13 additions & 13 deletions config/env/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ module.exports = {
title: 'MEAN.JS - Development Environment'
},
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackPath: '/auth/facebook/callback'
},
twitter: {
clientID: 'CONSUMER_KEY',
clientSecret: 'CONSUMER_SECRET',
callbackURL: 'http://localhost:3000/auth/twitter/callback'
clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
callbackPath: '/auth/twitter/callback'
},
google: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/google/callback'
clientID: process.env.GOOGLE_ID || 'APP_ID',
clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET',
callbackPath: '/auth/google/callback'
},
linkedin: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
clientID: process.env.LINKEDIN_ID || 'APP_ID',
clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET',
callbackPath: '/auth/linkedin/callback'
}
};
};
26 changes: 13 additions & 13 deletions config/env/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ module.exports = {
js: 'public/dist/application.min.js'
},
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackPath: '/auth/facebook/callback'
},
twitter: {
clientID: 'CONSUMER_KEY',
clientSecret: 'CONSUMER_SECRET',
callbackURL: 'http://localhost:3000/auth/twitter/callback'
clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
callbackPath: '/auth/twitter/callback'
},
google: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/google/callback'
clientID: process.env.GOOGLE_ID || 'APP_ID',
clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET',
callbackPath: '/auth/google/callback'
},
linkedin: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
clientID: process.env.LINKEDIN_ID || 'APP_ID',
clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET',
callbackPath: '/auth/linkedin/callback'
}
};
};
26 changes: 13 additions & 13 deletions config/env/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ module.exports = {
title: 'MEAN.JS - Test Environment'
},
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackPath: '/auth/facebook/callback'
},
twitter: {
clientID: 'CONSUMER_KEY',
clientSecret: 'CONSUMER_SECRET',
callbackURL: 'http://localhost:3000/auth/twitter/callback'
clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
callbackPath: '/auth/twitter/callback'
},
google: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/google/callback'
clientID: process.env.GOOGLE_ID || 'APP_ID',
clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET',
callbackPath: '/auth/google/callback'
},
linkedin: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
clientID: process.env.LINKEDIN_ID || 'APP_ID',
clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET',
callbackPath: '/auth/linkedin/callback'
}
};
};
2 changes: 1 addition & 1 deletion config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ module.exports = function(db) {
});

return app;
};
};
5 changes: 3 additions & 2 deletions config/strategies/facebook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

var passport = require('passport'),
url = require('url'),
FacebookStrategy = require('passport-facebook').Strategy,
config = require('../config'),
users = require('../../app/controllers/users.server.controller');
Expand All @@ -10,7 +11,7 @@ module.exports = function() {
passport.use(new FacebookStrategy({
clientID: config.facebook.clientID,
clientSecret: config.facebook.clientSecret,
callbackURL: config.facebook.callbackURL,
callbackURL: config.facebook.callbackPath,
passReqToCallback: true
},
function(req, accessToken, refreshToken, profile, done) {
Expand All @@ -35,4 +36,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};
5 changes: 3 additions & 2 deletions config/strategies/google.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

var passport = require('passport'),
url = require('url'),
GoogleStrategy = require('passport-google-oauth').OAuth2Strategy,
config = require('../config'),
users = require('../../app/controllers/users.server.controller');
Expand All @@ -10,7 +11,7 @@ module.exports = function() {
passport.use(new GoogleStrategy({
clientID: config.google.clientID,
clientSecret: config.google.clientSecret,
callbackURL: config.google.callbackURL,
callbackURL: config.google.callbackPath,
passReqToCallback: true
},
function(req, accessToken, refreshToken, profile, done) {
Expand All @@ -35,4 +36,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};
5 changes: 3 additions & 2 deletions config/strategies/linkedin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

var passport = require('passport'),
url = require('url'),
LinkedInStrategy = require('passport-linkedin').Strategy,
config = require('../config'),
users = require('../../app/controllers/users.server.controller');
Expand All @@ -10,7 +11,7 @@ module.exports = function() {
passport.use(new LinkedInStrategy({
consumerKey: config.linkedin.clientID,
consumerSecret: config.linkedin.clientSecret,
callbackURL: config.linkedin.callbackURL,
callbackURL: config.linkedin.callbackPath,
passReqToCallback: true,
profileFields: ['id', 'first-name', 'last-name', 'email-address']
},
Expand All @@ -36,4 +37,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};
5 changes: 3 additions & 2 deletions config/strategies/twitter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

var passport = require('passport'),
url = require('url'),
TwitterStrategy = require('passport-twitter').Strategy,
config = require('../config'),
users = require('../../app/controllers/users.server.controller');
Expand All @@ -10,7 +11,7 @@ module.exports = function() {
passport.use(new TwitterStrategy({
consumerKey: config.twitter.clientID,
consumerSecret: config.twitter.clientSecret,
callbackURL: config.twitter.callbackURL,
callbackURL: config.twitter.callbackPath,
passReqToCallback: true
},
function(req, token, tokenSecret, profile, done) {
Expand All @@ -32,4 +33,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};
3 changes: 3 additions & 0 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ module.exports = function(grunt) {
//Build task(s).
grunt.registerTask('build', ['jshint', 'csslint', 'uglify', 'cssmin']);

//Build task(s).
grunt.registerTask('heroku-deploy', ['jshint', 'csslint', 'uglify', 'cssmin']);

//Test task.
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
};
10 changes: 5 additions & 5 deletions public/modules/articles/config/articles.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ angular.module('articles').config(['$stateProvider',
$stateProvider.
state('listArticles', {
url: '/articles',
templateUrl: 'modules/articles/views/list.articles.client.view.html'
templateUrl: 'modules/articles/views/list-articles.client.view.html'
}).
state('createArticle', {
url: '/articles/create',
templateUrl: 'modules/articles/views/create.article.client.view.html'
}).
templateUrl: 'modules/articles/views/create-article.client.view.html'
}).§
state('viewArticle', {
url: '/articles/:articleId',
templateUrl: 'modules/articles/views/view.article.client.view.html'
templateUrl: 'modules/articles/views/view-article.client.view.html'
}).
state('editArticle', {
url: '/articles/:articleId/edit',
templateUrl: 'modules/articles/views/edit.article.client.view.html'
templateUrl: 'modules/articles/views/edit-article.client.view.html'
});
}
]);
6 changes: 3 additions & 3 deletions public/modules/users/config/users.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ angular.module('users').config(['$stateProvider',
$stateProvider.
state('profile', {
url: '/settings/profile',
templateUrl: 'modules/users/views/settings/profile.client.view.html'
templateUrl: 'modules/users/views/settings/edit-profile.client.view.html'
}).
state('password', {
url: '/settings/password',
templateUrl: 'modules/users/views/settings/password.client.view.html'
templateUrl: 'modules/users/views/settings/change-password.client.view.html'
}).
state('accounts', {
url: '/settings/accounts',
templateUrl: 'modules/users/views/settings/accounts.client.view.html'
templateUrl: 'modules/users/views/settings/social-accounts.client.view.html'
}).
state('signup', {
url: '/signup',
Expand Down

0 comments on commit c7a14f8

Please sign in to comment.