<commit_before>var _ = require('lodash');
var fs = require('fs');
var path = require('path');
var checkEnv = require('check-env');
var ConfigurationError = require('./errors').ConfigurationError;

checkEnv(['SERVER_CONFIG_FILE', 'HOOK_TOKEN']);

config = {
  HOOK_TOKEN: process.env.HOOK_TOKEN,
  SLACK_URL: process.env.SLACK_URL,
  SLACK_CHANNEL: process.env.SLACK_CHANNEL,
  PASSPORT_STRATEGY: process.env.PASSPORT_STRATEGY,
  PASSPORT_STRATEGY_OPTIONS: process.env.PASSPORT_STRATEGY_OPTIONS || {},
  REDIS: process.env.REDIS,
  REDIS_HOST: process.env.REDIS_HOST || '127.0.0.1',
  REDIS_PORT: process.env.REDIS_PORT || 6379,
  REDIS_DB: process.env.REDIS_DB || 1,
  PATH_TO_PRIVATE_KEY: process.env.PATH_TO_PRIVATE_KEY || path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE, '.ssh/id_rsa'),
  SSH_PASSWORD: <PASSWORD>.SSH_PASSWORD
};

if (process.env.DEFAULT_TASKS) {
  config.DEFAULT_TASKS = JSON.parse(process.env.DEFAULT_TASKS);
} else {
  config.DEFAULT_TASKS = {
    deploy: ['make production'],
    restart: ['make restart'],
    start: ['make start'],
    stop: ['make stop']
  };
}

function loadProjectConfigurations() {
  var configFilePath = path.resolve(process.env.SERVER_CONFIG_FILE);
  if (!fs.existsSync(configFilePath)) {
    throw new ConfigurationError('Can\'t find a file at the given SERVER_CONFIG_FILE-path');
  }
  projects = require(configFilePath);
  for (var project in projects) {
    if (projects[project].hasOwnProperty('tasks')) {
      _.merge(projects[project].tasks, config.DEFAULT_TASKS);
    } else {
      projects[project].tasks = config.DEFAULT_TASKS;<commit_msg>Remove unused ssh password from config<commit_after>var _ = require('lodash');
var fs = require('fs');
var path = require('path');
var checkEnv = require('check-env');
var ConfigurationError = require('./errors').ConfigurationError;

checkEnv(['SERVER_CONFIG_FILE', 'HOOK_TOKEN']);

config = {
  HOOK_TOKEN: process.env.HOOK_TOKEN,
  SLACK_URL: process.env.SLACK_URL,
  SLACK_CHANNEL: process.env.SLACK_CHANNEL,
  PASSPORT_STRATEGY: process.env.PASSPORT_STRATEGY,
  PASSPORT_STRATEGY_OPTIONS: process.env.PASSPORT_STRATEGY_OPTIONS || {},
  REDIS: process.env.REDIS,
  REDIS_HOST: process.env.REDIS_HOST || '127.0.0.1',
  REDIS_PORT: process.env.REDIS_PORT || 6379,
  REDIS_DB: process.env.REDIS_DB || 1,
  PATH_TO_PRIVATE_KEY: process.env.PATH_TO_PRIVATE_KEY || path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE, '.ssh/id_rsa'),
};

if (process.env.DEFAULT_TASKS) {
  config.DEFAULT_TASKS = JSON.parse(process.env.DEFAULT_TASKS);
} else {
  config.DEFAULT_TASKS = {
    deploy: ['make production'],
    restart: ['make restart'],
    start: ['make start'],
    stop: ['make stop']
  };
}

function loadProjectConfigurations() {
  var configFilePath = path.resolve(process.env.SERVER_CONFIG_FILE);
  if (!fs.existsSync(configFilePath)) {
    throw new ConfigurationError('Can\'t find a file at the given SERVER_CONFIG_FILE-path');
  }
  projects = require(configFilePath);
  for (var project in projects) {
    if (projects[project].hasOwnProperty('tasks')) {
      _.merge(projects[project].tasks, config.DEFAULT_TASKS);
    } else {
      projects[project].tasks = config.DEFAULT_TASKS;
{'fraction_non_alphanumeric': 0.14298921417565486, 'fraction_numerical': 0.006779661016949152, 'mean_word_length': 5.067289719626168, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6365346', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1129, 'n_words': 192}