<commit_before>/**
 * Populate DB with sample data on server start
 * to disable, edit config/environment/index.js, and set `seedDB: false`
 */

'use strict';

var spawn = require("child_process").spawn;

var Thing = require('../api/thing/thing.model');
var User = require('../api/user/user.model');
var Project = require('../api/project/project.model');
var Commit = require('../api/commit/commit.model');
var ClassYear = require('../api/classyear/classyear.model')

Thing.find({}).remove(function() {
  Thing.create({
    name : 'Feed',
    info : 'View the feed from all project blogs posts and commits',
    link : '/Feed',
  }, {
    name : 'Projects',
    info : 'Look at current and past Projects',
    link : '/Projects' 
  }, {
    name : 'Developers',
    info : 'View current and past RCOS developers',
    link : '/Developers'
  },  {
    name : 'Modular Structure',
    info : 'Best practice client and server structures allow for more code reusability and maximum scalability'
  },  {
    name : 'Optimized Build',
    info : 'Build process packs up your templates as a single JavaScript payload, minifies your scripts/css/images, and rewrites asset names for caching.'
  },{
    name : 'Deployment Ready',
    info : 'Easily deploy your app to Heroku or Openshift with the heroku and openshift subgenerators'
  });
});

User.find({}).remove(function() {
  User.create({
    provider: 'local',
    name: 'Test User',
    email: '<EMAIL>',
    password: '<PASSWORD>'
  }, {
    provider: 'local',
    role: 'admin',
    name: 'Admin',
    email: '<EMAIL>',
    password: '<PASSWORD>'
  },
  {
    provider: 'local',
    role: 'admin',
    name: 'Aaron',
    email: '<EMAIL>',
    password: '<PASSWORD>',
    github:{
      login: 'agundy'
    }

  },
  {
    provider: 'local',
    role: 'admin',
    name: 'Seve',
    email: '<EMAIL>',
    password: '<PASSWORD>',
    github:{
      login: 'seveibar'
    }
  },
   function() {
      console.log('finished populating users');
    }
  );
});

Project.find({}).remove(function(){
  Project.create({
    name: 'Observatory',
    description: 'Open source project tracking.',
    repositoryUrl: 'https://github.com/rcos/Observatory3',
    repositoryType: 'github',
    githubUsername: 'RCOS',
    githubProjectName: 'Observatory3',<commit_msg>added mentor to seed<commit_after>/**
 * Populate DB with sample data on server start
 * to disable, edit config/environment/index.js, and set `seedDB: false`
 */

'use strict';

var spawn = require("child_process").spawn;

var Thing = require('../api/thing/thing.model');
var User = require('../api/user/user.model');
var Project = require('../api/project/project.model');
var Commit = require('../api/commit/commit.model');
var ClassYear = require('../api/classyear/classyear.model')

Thing.find({}).remove(function() {
  Thing.create({
    name : 'Feed',
    info : 'View the feed from all project blogs posts and commits',
    link : '/Feed',
  }, {
    name : 'Projects',
    info : 'Look at current and past Projects',
    link : '/Projects' 
  }, {
    name : 'Developers',
    info : 'View current and past RCOS developers',
    link : '/Developers'
  },  {
    name : 'Modular Structure',
    info : 'Best practice client and server structures allow for more code reusability and maximum scalability'
  },  {
    name : 'Optimized Build',
    info : 'Build process packs up your templates as a single JavaScript payload, minifies your scripts/css/images, and rewrites asset names for caching.'
  },{
    name : 'Deployment Ready',
    info : 'Easily deploy your app to Heroku or Openshift with the heroku and openshift subgenerators'
  });
});

User.find({}).remove(function() {
  User.create({
    provider: 'local',
    name: 'Test User',
    email: '<EMAIL>',
    password: '<PASSWORD>'
  }, {
    provider: 'local',
    role: 'admin',
    name: 'Admin',
    email: '<EMAIL>',
    password: '<PASSWORD>'
  },
  {
    provider: 'local',
    role: 'admin',
    name: 'Aaron',
    email: '<EMAIL>',
    password: '<PASSWORD>',
    github:{
      login: 'agundy'
    }

  },
  {
    provider: 'local',
    role: 'admin',
    name: 'Seve',
    email: '<EMAIL>',
    password: '<PASSWORD>',
    github:{
      login: 'seveibar'
    }
  },
  {
    provider: 'local',
    role: 'mentor',
    name: 'Mentor',
    email: '<EMAIL>',
    password: '<PASSWORD>',
    github: {
      login: 'mentorguy'
    }
  },
   function() {
      console.log('finished populating users');
    }
  );
});

Project.find({}).remove(function(){
  Project.create({
    name: 'Observatory',
    description: 'Open source project tracking.',
    repositoryUrl: 'https://github.com/rcos/Observatory3',
    repositoryType: 'github',
    githubUsername: 'RCOS',
    githubProjectName: 'Observatory3',
{'fraction_non_alphanumeric': 0.16129707112970712, 'fraction_numerical': 0.0008368200836820083, 'mean_word_length': 3.075873827791986, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5964585', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1500, 'n_words': 423}