<commit_before>#!/bin/bash

set -eu

SECRET_KEY_BASE=$(rake secret)
sed -i "s/<%= ENV\[\"CHANGED_BY_BUILDING_TOOL\"\] %>/$SECRET_KEY_BASE/" "config/secrets.yml"


if [[ -f "db/production.sqlite3" ]] ; then
  read -p "Alle vorhandenen Daten löschen? [y/N] " -n 1 -r
  echo
  if [[ $REPLY =~ ^[YyjJ]$ ]] ; then
    rm -rf "db/production.sqlite3"
  fi
fi

gem install bundler
bundle --without development test staging

RAILS_ENV=production bundle exec rake assets:precompile
RAILS_ENV=production bundle exec rake db:drop
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake db:seed
RAILS_ENV=production bundle exec rake import:suggestions  <commit_msg>Linux-Installation korrigieren<commit_after>#!/bin/bash

set -eu
gem install bundler
bundle --without development test staging

SECRET_KEY_BASE=$(rake secret)
sed -i "s/<%= ENV\[\"CHANGED_BY_BUILDING_TOOL\"\] %>/$SECRET_KEY_BASE/" "config/secrets.yml"


if [[ -f "db/production.sqlite3" ]] ; then
  read -p "Alle vorhandenen Daten löschen? [y/N] " -n 1 -r
  echo
  if [[ $REPLY =~ ^[YyjJ]$ ]] ; then
    rm -rf "db/production.sqlite3"
  fi
fi


RAILS_ENV=production bundle exec rake assets:precompile
RAILS_ENV=production bundle exec rake db:drop
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake db:seed
RAILS_ENV=production bundle exec rake import:suggestions  
{'fraction_non_alphanumeric': 0.12219812002892264, 'fraction_numerical': 0.004338394793926247, 'mean_word_length': 4.695473251028806, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4189378', 'n_tokens_mistral': 542, 'n_tokens_neox': 521, 'n_words': 137}