<commit_before>#!/bin/sh

cp Tokaido/Gemfile $TKD_TMP_PATH/Gemfile
cd $TKD_TMP_PATH

echo "Removing existing GEM_HOME to rebuild it"
rm -rf gem_home

echo "Building new GEM_HOME"
mkdir -p $TKD_TMP_PATH/gem_home/ruby/$TKD_RUBY_NAMESPACE


command -v pkg-config >/dev/null 2>&1 && bundle config --local build.nokogiri --with-opt-dir=$(pkg-config iconv --variable=prefix)
command -v pkg-config >/dev/null 2>&1 && bundle config --local build.sqlite3 --with-opt-dir=$(pkg-config sqlite3 --variable=prefix)

bundle --path gem_home --gemfile Gemfile

gem install bundler -E --no-ri --no-rdoc -i gem_home/ruby/$TKD_RUBY_NAMESPACE

rm -f tokaido-gems.zip
rm -Rf Gems

mkdir Gems
cd Gems
cp -R ../gem_home/ruby/$TKD_RUBY_NAMESPACE .
cd ..
mkdir -p Gems/supps
#FIXME
cp $TKD_EXTENSIONS_PATH/railties-4.2.1_app_base.rb Gems/$TKD_RUBY_NAMESPACE/gems/railties-4.2.1/lib/rails/generators/app_base.rb

cp -R $TKD_SUPPLEMENTS_PATH/iconv Gems/supps/iconv
cp -R $TKD_SUPPLEMENTS_PATH/bin_files Gems/bin_files

zip -r tokaido-gems.zip Gems<commit_msg>Ruby changed the way gem installation options work (documentation generation)<commit_after>#!/bin/sh

cp Tokaido/Gemfile.$RAILS_GEMFILE $TKD_TMP_PATH/Gemfile
cd $TKD_TMP_PATH

echo "Removing existing GEM_HOME to rebuild it"
rm -rf gem_home

echo "Building new GEM_HOME"
mkdir -p $TKD_TMP_PATH/gem_home/ruby/$TKD_RUBY_NAMESPACE

#command -v pkg-config >/dev/null 2>&1 && bundle config --local build.nokogiri --with-opt-dir=$(pkg-config iconv --variable=prefix)
#command -v pkg-config >/dev/null 2>&1 && bundle config --local build.sqlite3 --with-opt-dir=$(pkg-config sqlite3 --variable=prefix)

bundle --path gem_home --gemfile Gemfile
gem install bundler -E $NO_DOC_OPTION -i gem_home/ruby/$TKD_RUBY_NAMESPACE

rm -f tokaido-gems.zip
rm -Rf Gems

mkdir Gems
cd Gems
cp -R ../gem_home/ruby/$TKD_RUBY_NAMESPACE .
cd ..
mkdir -p Gems/supps
cp -R $TKD_SUPPLEMENTS_PATH/bin_files Gems/bin_files

zip -r tokaido-gems.zip Gems
{'fraction_non_alphanumeric': 0.12358974358974359, 'fraction_numerical': 0.009230769230769232, 'mean_word_length': 4.258760107816712, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3775619', 'n_tokens_mistral': 841, 'n_tokens_neox': 787, 'n_words': 185}