<commit_before>#!/bin/sh
mailcatcher_basedir=$(dirname $(readlink -f $0))
mailcatcher_calldir=$(pwd)

cd "$mailcatcher_basedir"

set -e

# install mailcatcher
apt-get install -y build-essential libsqlite3-dev ruby-dev

gem install mailcatcher

install -Dm644 files/mailcatcher.upstart.conf \
    /etc/init/mailcatcher.conf

if which php > /dev/null 2>&1; then
    echo "sendmail_path = /usr/bin/env $(which catchmail)" \
        >> /etc/php5/mods-available/mailcatcher.ini
    php5enmod mailcatcher

    service php5-fpm restart
fi
<commit_msg>mailcatcher, from and port must be set else mailcatcher just gives an error and does nothing<commit_after>#!/bin/sh
mailcatcher_basedir=$(dirname $(readlink -f $0))
mailcatcher_calldir=$(pwd)

cd "$mailcatcher_basedir"

set -e

# install mailcatcher
apt-get install -y build-essential libsqlite3-dev ruby-dev

gem install mailcatcher

install -Dm644 files/mailcatcher.upstart.conf \
    /etc/init/mailcatcher.conf

if which php > /dev/null 2>&1; then
    echo "sendmail_path = /usr/bin/env $(which catchmail) -f <EMAIL> --smtp-port 25" \
        >> /etc/php5/mods-available/mailcatcher.ini
    php5enmod mailcatcher

    service php5-fpm restart
fi

{'fraction_non_alphanumeric': 0.11316010058675607, 'fraction_numerical': 0.018440905280804692, 'mean_word_length': 3.8536585365853657, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, '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': '317821', 'n_tokens_mistral': 451, 'n_tokens_neox': 427, 'n_words': 105}