<commit_before>#! /usr/bin/env bash

set -e

[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm

if [[ -z ${RUBY_RUNTIME} ]]; then
  RUBY_RUNTIME=1.8.7
fi

if [[ -n "${JOB_NAME}" ]] ; then
  GEMSET=`echo ${JOB_NAME} | sed "s!/RUBY_RUNTIME=.*!!" | sed "s/ /_/g"`
else
  GEMSET=easy_multipart
fi

if [[ -z "$(rvm list | grep $RUBY_RUNTIME)" ]] ; then
    rvm install ${RUBY_RUNTIME} -C --with-iconv-dir=/usr/local
fi

rvm use ${RUBY_RUNTIME} && \
  rvm --force gemset delete $GEMSET && \
  rvm gemset create $GEMSET && \
  rvm gemset use $GEMSET && \
  gem install rails --version "2.3.8" --no-ri --no-rdoc && \
  rake -t test<commit_msg>Improve the hudson script a bit.<commit_after>#! /usr/bin/env bash

set -e

[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm

if [[ -z ${RUBY_RUNTIME} ]]; then
  RUBY_RUNTIME=$1
fi
if [[ -z ${RUBY_RUNTIME} ]]; then
  RUBY_RUNTIME=1.8.7
fi

if [[ -n "${JOB_NAME}" ]] ; then
  GEMSET=`echo ${JOB_NAME} | sed "s!/RUBY_RUNTIME=.*!!" | sed "s/ /_/g"`
else
  GEMSET=`basename $PWD`
fi

if [[ -z "$(rvm list | grep $RUBY_RUNTIME)" ]] ; then
    rvm install ${RUBY_RUNTIME} -C --with-iconv-dir=/usr/local
fi

rvm use ${RUBY_RUNTIME} && \
  rvm --force gemset delete $GEMSET && \
  rvm gemset create $GEMSET && \
  rvm gemset use $GEMSET || 0

gem install rails --version "2.3.8" --no-ri --no-rdoc

rake -t test
{'fraction_non_alphanumeric': 0.2010233918128655, 'fraction_numerical': 0.01023391812865497, 'mean_word_length': 2.991253644314869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6141759', 'n_tokens_mistral': 638, 'n_tokens_neox': 603, 'n_words': 148}