<commit_before>#!/bin/bash
set -e

if [ "$1" = 'web' ]; then
  rm -rf tmp/pids/*

  rm -rf public/uploads/
  ln -s /uploads public/uploads

  yarn install
  bundle exec rake assets:precompile db:migrate
  bundle exec rails server puma -p 80 --binding 0.0.0.0
fi

if [ "$1" = 'worker' ]; then
  rm -rf tmp/pids/*

  rm -rf public/uploads/
  ln -s /uploads public/uploads

  bundle exec rake db:migrate

  export QUEUES=default,high_priority,low_priority 
  bundle exec rake jobs:work
fi

if [ "$1" = 'test' ]; then
  echo 'Specs...'
  export RAILS_ENV=test
  yarn install
  bundle exec rake db:migrate
  bundle exec rspec

  exit 0
fi

exec "$@"<commit_msg>test fix<commit_after>#!/bin/bash
set -e

if [ "$1" = 'web' ]; then
  rm -rf tmp/pids/*

  rm -rf public/uploads/
  ln -s /uploads public/uploads

  yarn install
  bundle exec rake assets:precompile db:migrate
  bundle exec rails server puma -p 80 --binding 0.0.0.0
fi

if [ "$1" = 'worker' ]; then
  rm -rf tmp/pids/*

  rm -rf public/uploads/
  ln -s /uploads public/uploads

  bundle exec rake db:migrate

  export QUEUES=default,high_priority,low_priority 
  bundle exec rake jobs:work
fi

if [ "$1" = 'test' ]; then
  echo 'Specs...'
  export RAILS_ENV=test
  yarn install
  bundle exec rake db:create db:migrate
  bundle exec rspec

  exit 0
fi

exec "$@"
{'fraction_non_alphanumeric': 0.12072892938496584, 'fraction_numerical': 0.015186028853454821, 'mean_word_length': 2.934328358208955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2088986', 'n_tokens_mistral': 533, 'n_tokens_neox': 490, 'n_words': 162}