Skip to content

Commit

Permalink
merging
Browse files Browse the repository at this point in the history
  • Loading branch information
liorkesos committed May 3, 2015
2 parents c60ccc1 + ebe5305 commit 614163e
Show file tree
Hide file tree
Showing 68 changed files with 11,864 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"maxlen" : false, // {int} Max number of characters per line

// Relaxing
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"asi" : true, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"boss" : false, // true: Tolerate assignments where comparisons would be expected
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
"eqnull" : false, // true: Tolerate use of `== null`
Expand Down
10 changes: 5 additions & 5 deletions config/env/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@ module.exports = {
facebook: {
clientID: 'DEFAULT_APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
callbackURL: 'http://localhost:3000/api/auth/facebook/callback'
},
twitter: {
clientID: 'DEFAULT_CONSUMER_KEY',
clientSecret: 'CONSUMER_SECRET',
callbackURL: 'http://localhost:3000/auth/twitter/callback'
callbackURL: 'http://localhost:3000/api/auth/twitter/callback'
},
github: {
clientID: 'DEFAULT_APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/github/callback'
callbackURL: 'http://localhost:3000/api/auth/github/callback'
},
google: {
clientID: 'DEFAULT_APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/google/callback'
callbackURL: 'http://localhost:3000/api/auth/google/callback'
},
linkedin: {
clientID: 'DEFAULT_API_KEY',
clientSecret: 'SECRET_KEY',
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
callbackURL: 'http://localhost:3000/api/auth/linkedin/callback'
},
emailFrom: 'SENDER EMAIL ADDRESS', // sender address like ABC <[email protected]>
mailer: {
Expand Down
10 changes: 5 additions & 5 deletions config/env/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ module.exports = {
facebook: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
callbackURL: 'http://localhost:3000/api/auth/facebook/callback'
},
twitter: {
clientID: 'CONSUMER_KEY',
clientSecret: 'CONSUMER_SECRET',
callbackURL: 'http://localhost:3000/auth/twitter/callback'
callbackURL: 'http://localhost:3000/api/auth/twitter/callback'
},
github: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/github/callback'
callbackURL: 'http://localhost:3000/api/auth/github/callback'
},
google: {
clientID: 'APP_ID',
clientSecret: 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/google/callback'
callbackURL: 'http://localhost:3000/api/auth/google/callback'
},
linkedin: {
clientID: 'API_KEY',
clientSecret: 'SECRET_KEY',
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
callbackURL: 'http://localhost:3000/api/auth/linkedin/callback'
},
emailFrom: 'SENDER EMAIL ADDRESS', // sender address like ABC <[email protected]>
mailer: {
Expand Down
10 changes: 10 additions & 0 deletions config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ var mean = require('meanio'),
express = require('express'),
helpers = require('view-helpers'),
flash = require('connect-flash'),
modRewrite = require('connect-modrewrite'),
seo = require('mean-seo'),
config = mean.loadConfig();

module.exports = function(app, db) {
Expand Down Expand Up @@ -49,4 +51,12 @@ module.exports = function(app, db) {

// Connect flash for flash messages
app.use(flash());

app.use(modRewrite([

'!^/api/.*|\\_getModules|\\.html|\\.js|\\.css|\\.swf|\\.jp(e?)g|\\.png|\\.gif|\\.svg|\\.eot|\\.ttf|\\.woff|\\.pdf$ / [L]'

]));

app.use(seo());
};
2 changes: 1 addition & 1 deletion gulp/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var gulp = require('gulp'),
gutil = require('gulp-util'),
plugins = gulpLoadPlugins(),
paths = {
js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**', 'packages/**/*.js', '!packages/**/node_modules/**', '!packages/contrib/**/*.js', '!packages/contrib/**/node_modules/**'],
js: ['*.js', 'test/**/*.js', '!test/coverage/**', '!bower_components/**', 'packages/**/*.js','!packages/swagger/public/assets/**', '!packages/**/node_modules/**', '!packages/contrib/**/*.js', '!packages/contrib/**/node_modules/**'],
html: ['packages/**/public/**/views/**', 'packages/**/server/views/**'],
css: ['!bower_components/**', 'packages/**/public/**/css/*.css', '!packages/contrib/**/public/**/css/*.css'],
less: ['**/public/**/css/*.less'],
Expand Down
6 changes: 6 additions & 0 deletions mean.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
<<<<<<< HEAD
"dependencies": {
"mean-admin": "latest"
}
}
=======
"dependencies": {},
"anonymizedData": true
}
>>>>>>> 0.5
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": false,
"author": "Linnovate <[email protected]>",
"contributors": "https://github.com/linnovate/mean/graphs/contributors",
"mean": "0.5",
"mean": "0.5.0",
"repository": {
"type": "git",
"url": "https://github.com/linnovate/mean.git"
Expand Down Expand Up @@ -51,6 +51,8 @@
"view-helpers": "0.1.5"
},
"devDependencies": {
"connect-modrewrite": "^0.7.9",
"require-dir":"latest",
"expect.js": "0.3.1",
"karma": "0.12.28",
"karma-chrome-launcher": "0.1.7",
Expand All @@ -64,6 +66,7 @@
"karma-phantomjs-launcher": "0.1.4",
"karma-requirejs": "0.2.2",
"karma-script-launcher": "0.1.0",
"mean-seo": "0.0.8",
"mocha": "2.1.0",
"requirejs": "2.1.15",
"supertest": "0.11.0",
Expand Down
114 changes: 114 additions & 0 deletions package.json.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"name": "mean",
"description": "MEAN.io: A fullstack JavaScript framework powered by MongoDB, ExpressJS, AngularJS, NodeJS.",
"version": "0.4.3",
"private": false,
"author": "Linnovate <[email protected]>",
"contributors": "https://github.com/linnovate/mean/graphs/contributors",
"mean": "0.4.3",
"repository": {
"type": "git",
"url": "https://github.com/linnovate/mean.git"
},
"engines": {
"node": "0.10.x",
"npm": "1.3.x"
},
"scripts": {
"start": "node server",
"mocha": "node node_modules/.bin/mocha packages/**/server/tests/**/*.js -R spec -r tools/test/mocha-req.js",
"karma": "node node_modules/karma/bin/karma start karma.conf.js",
"test": "npm run mocha && NODE_ENV=test npm run start & sleep 20 && npm run karma",
"postinstall": "node node_modules/meanio/node_modules/mean-cli/bin/mean-postinstall"
},
"dependencies": {
"assetmanager": "1.1.2",
"async": "0.9.0",
"body-parser": "1.10.0",
"compression": "1.2.1",
"connect-flash": "0.1.1",
"consolidate": "0.10.0",
"cookie-parser": "1.3.3",
"errorhandler": "1.3.0",
"express": "4.11.1",
"forever": "0.11.1",
"gridfs-stream": "0.5.3",
"lodash": "2.4.1",
"meanio": "linnovate/meanio",
"mongoose": "3.8.24",
"morgan": "1.5.0",
"ms": "0.6.2",
"nodemailer": "1.2.2",
"passport-facebook": "1.0.3",
"passport-github": "0.1.5",
"passport-google-oauth": "0.1.5",
"passport-linkedin": "0.1.3",
"passport-local": "1.0.0",
"passport-twitter": "1.0.2",
"serve-favicon": "2.2.0",
"swig": "1.4.2",
"view-helpers": "0.1.5"
},
"devDependencies": {
<<<<<<< HEAD
"connect-modrewrite": "^0.7.9",
"del": "^0.1.3",
"expect.js": "0.3.1",
"grunt-karma": "0.8.3",
"grunt-mocha-test": "0.10.2",
"gulp": "^3.8.8",
"gulp-concat": "^2.4.1",
"gulp-csslint": "^0.1.5",
"gulp-cssmin": "^0.1.6",
"gulp-jshint": "^1.8.5",
"gulp-less": "^1.3.6",
"gulp-livereload": "^2.1.1",
"gulp-load-plugins": "^0.7.0",
"gulp-mocha": "^1.1.0",
"gulp-nodemon": "^1.0.4",
"gulp-rimraf": "^0.1.1",
"gulp-uglify": "^1.0.1",
"gulp-util": "^3.0.1",
"jshint-stylish": "^1.0.0",
=======
"require-dir":"latest",
"expect.js": "0.3.1",
>>>>>>> 95c88d0b42f4b4d6e029c9cda6e18025c7d39eb8
"karma": "0.12.28",
"karma-chrome-launcher": "0.1.7",
"karma-coffee-preprocessor": "0.2.1",
"karma-coverage": "0.2.7",
"karma-firefox-launcher": "0.1.3",
"karma-html2js-preprocessor": "0.1.0",
"karma-jasmine": "0.2.3",
"karma-ng-html2js-preprocessor": "0.1.2",
"karma-ng-scenario": "0.1.0",
"karma-phantomjs-launcher": "0.1.4",
"karma-requirejs": "0.2.2",
"karma-script-launcher": "0.1.0",
"mean-seo": "0.0.8",
"mocha": "2.1.0",
"requirejs": "2.1.15",
"supertest": "0.11.0",
<<<<<<< HEAD
=======
"del": "^0.1.3",
"gulp": "^3.8.8",
"gulp-concat": "^2.4.1",
"gulp-csslint": "^0.1.5",
"gulp-cssmin": "^0.1.6",
"gulp-jshint": "^1.8.5",
"gulp-less": "^1.3.6",
"gulp-livereload": "^2.1.1",
"gulp-load-plugins": "^0.7.0",
"gulp-mocha": "^1.1.0",
"gulp-nodemon": "^1.0.4",
"gulp-uglify": "^1.0.1",
"gulp-load-plugins": "^0.7.0",
"gulp-util": "^3.0.1",
"jshint-stylish": "^1.0.0",
"require-dir":"latest",
>>>>>>> 95c88d0b42f4b4d6e029c9cda6e18025c7d39eb8
"through": "^2.3.6"
}
}
5 changes: 4 additions & 1 deletion packages/articles/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var Articles = new Module('articles');
* All MEAN packages require registration
* Dependency injection is used to define required modules
*/
Articles.register(function(app, auth, database) {
Articles.register(function(app, auth, database, swagger) {

//We enable routing. By default the Package Object is passed to the routes
Articles.routes(app, auth, database);
Expand Down Expand Up @@ -50,5 +50,8 @@ Articles.register(function(app, auth, database) {
*/
Articles.aggregateAsset('css', 'articles.css');

// Only use swagger.add if /docs and the corresponding files exists
swagger.add(__dirname);

return Articles;
});
45 changes: 45 additions & 0 deletions packages/articles/docs/models.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
exports.models = {

User: {
id: 'User',
required: ['name', 'email', 'username'],
properties: {
name: {
type: 'string',
description: 'Name of the user'
},
email: {
type: 'string',
description: 'Email used for authentication and notifications'
},
phone: {
type: 'string',
description: 'Phone number of the user'
}

}
},
Article: {
id: 'Article',
required: ['content'],
properties: {
id: {
type: 'string',
description: 'Unique identifier for the Article'
},
title: {
type: 'string',
description: 'Title of the article'
},
content: {
type: 'string',
description: 'content of the article'
},
user: {
type: 'User',
description: 'User that created the article'
}

}
}
};
45 changes: 45 additions & 0 deletions packages/articles/docs/services.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
'use strict';

exports.load = function(swagger, parms) {

var searchParms = parms.searchableOptions;

var list = {
'spec': {
description: 'Article operations',
path: '/articles',
method: 'GET',
summary: 'Get all Articles',
notes: '',
type: 'Article',
nickname: 'getArticles',
produces: ['application/json'],
params: searchParms
}
};

var create = {
'spec': {
description: 'Device operations',
path: '/articles',
method: 'POST',
summary: 'Create article',
notes: '',
type: 'Article',
nickname: 'createArticle',
produces: ['application/json'],
parameters: [{
name: 'body',
description: 'Article to create. User will be inferred by the authenticated user.',
required: true,
type: 'Article',
paramType: 'body',
allowMultiple: false
}]
}
};

swagger.addGet(list)
.addPost(create);

};
2 changes: 1 addition & 1 deletion packages/articles/public/services/articles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//Articles service used for articles REST endpoint
angular.module('mean.articles').factory('Articles', ['$resource',
function($resource) {
return $resource('/api/articles/:articleId', {
return $resource('api/articles/:articleId', {
articleId: '@_id'
}, {
update: {
Expand Down
Loading

0 comments on commit 614163e

Please sign in to comment.