<commit_before>import stubTransport from 'nodemailer-stub-transport';
import { test as postgresConfig } from '../../knexfile';


// Clustering for monitor-dogstats @todo replace in ansible-deploy
process.env.MONITOR_PREFIX = 'tests';

export function getConfig() {
  const config = {
    port:     31337,
    database: 3,

    secret:                    'secret',
    origin:                    'http://localhost:3333',
    appRoot:                   '.',
    acceptHashedPasswordsOnly: false,

    // disableRealtime: true,
    onboardingUsername: 'welcome',
    recaptcha:          { enabled: false },

    frontendPreferencesLimit: 65536,

    dynamicRiverOfNews: true,
  };

  config.host = `http://localhost:${config.port}`;

  config.application = {
    USERNAME_STOP_LIST: [
      '404', 'about', 'account', 'anonymous', 'attachments', 'dev', 'files', 'filter',
      'friends', 'groups', 'help', 'home', 'iphone', 'list', 'logout', 'profilepics',
      'public', 'requests', 'search', 'settings', 'share', 'signin', 'signup', 'summary'
    ],
    EXTRA_STOP_LIST: [
      'thatcreepyguy', 'nicegirlnextdoor', 'perfectstranger'
    ]
  };

  config.media = {
    url:     `${config.host}/`, // must have trailing slash
    storage: {
      type:    'fs',
      rootDir: '/tmp/pepyatka-media/' // must have trailing slash
    }
  };
  config.attachments = {
    url:           config.media.url,
    storage:       config.media.storage,
    path:          'attachments/', // must have trailing slash
    fileSizeLimit: 10 * 1000 * 1000,
    maxCount:      20,
    imageSizes:    {
      t: {
        path:   'attachments/thumbnails/', // must have trailing slash
        bounds: { width: 525, height: 175 }
      },
      t2: {
        path:   'attachments/thumbnails2/', // must have trailing slash
        bounds: { width: 1050, height: 350 }
      },
      anotherTestSize: {
        path:   'attachments/anotherTestSize/', // must have trailing slash
        bounds: { width: 1600, height: 1200 }
      }
    }
  };
  config.profilePictures = {
    url:     config.media.url,
    storage: config.media.storage,
    path:    'profilepics/' // must have trailing slash
  };

  config.mailer = {
    transport:                stubTransport,
    fromName:                 'Pepyatka',
    fromEmail:                '<EMAIL>',
    resetPasswordMailSubject: 'Pepyatka password reset',
    host:                     config.origin,
    options:                  {},
    adminRecipient:           { email: '<EMAIL>', screenName: 'Pepyatka admin' },
  };

  config.redis = {
    host:    'localhost',
    port:    6379,
    options: {}
  };<commit_msg>Add defaultProfilePictureMediumUrl to the test environment<commit_after>import stubTransport from 'nodemailer-stub-transport';
import { test as postgresConfig } from '../../knexfile';


// Clustering for monitor-dogstats @todo replace in ansible-deploy
process.env.MONITOR_PREFIX = 'tests';

export function getConfig() {
  const config = {
    port:     31337,
    database: 3,

    secret:                    'secret',
    origin:                    'http://localhost:3333',
    appRoot:                   '.',
    acceptHashedPasswordsOnly: false,

    // disableRealtime: true,
    onboardingUsername: 'welcome',
    recaptcha:          { enabled: false },

    frontendPreferencesLimit: 65536,

    dynamicRiverOfNews: true,
  };

  config.host = `http://localhost:${config.port}`;

  config.application = {
    USERNAME_STOP_LIST: [
      '404', 'about', 'account', 'anonymous', 'attachments', 'dev', 'files', 'filter',
      'friends', 'groups', 'help', 'home', 'iphone', 'list', 'logout', 'profilepics',
      'public', 'requests', 'search', 'settings', 'share', 'signin', 'signup', 'summary'
    ],
    EXTRA_STOP_LIST: [
      'thatcreepyguy', 'nicegirlnextdoor', 'perfectstranger'
    ]
  };

  config.media = {
    url:     `${config.host}/`, // must have trailing slash
    storage: {
      type:    'fs',
      rootDir: '/tmp/pepyatka-media/' // must have trailing slash
    }
  };
  config.attachments = {
    url:           config.media.url,
    storage:       config.media.storage,
    path:          'attachments/', // must have trailing slash
    fileSizeLimit: 10 * 1000 * 1000,
    maxCount:      20,
    imageSizes:    {
      t: {
        path:   'attachments/thumbnails/', // must have trailing slash
        bounds: { width: 525, height: 175 }
      },
      t2: {
        path:   'attachments/thumbnails2/', // must have trailing slash
        bounds: { width: 1050, height: 350 }
      },
      anotherTestSize: {
        path:   'attachments/anotherTestSize/', // must have trailing slash
        bounds: { width: 1600, height: 1200 }
      }
    }
  };
  config.profilePictures = {
    defaultProfilePictureMediumUrl: 'http://placekitten.com/50/50',

    url:     config.media.url,
    storage: config.media.storage,
    path:    'profilepics/' // must have trailing slash
  };

  config.mailer = {
    transport:                stubTransport,
    fromName:                 'Pepyatka',
    fromEmail:                '<EMAIL>',
    resetPasswordMailSubject: 'Pepyatka password reset',
    host:                     config.origin,
    options:                  {},
    adminRecipient:           { email: '<EMAIL>', screenName: 'Pepyatka admin' },
  };

  config.redis = {
    host:    'localhost',
    port:    6379,
    options: {}
  };
{'fraction_non_alphanumeric': 0.13816032508311785, 'fraction_numerical': 0.021795345400812707, 'mean_word_length': 2.1555944055944054, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '4709591', 'n_tokens_mistral': 1784, 'n_tokens_neox': 1636, 'n_words': 377}