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

ruby_archive="rubinius-$ruby_version.tar.bz2"
ruby_src_dir="rubinius-$ruby_version"
ruby_mirror="${ruby_mirror:-http://releases.rubini.us}"
ruby_url="${ruby_url:-$ruby_mirror/$ruby_archive}"

#
# Install optional dependencies for Rubinius.
#
function install_optional_deps()
{
	if ! command -v bundle >/dev/null; then
		log "Installing bundler ..."
		GEM_HOME=$src_dir/ gem install bundler || return $?
	fi
}

#
# Configures Rubinius.
#
function configure_ruby()
{
	export GEM_HOME="$PWD/vendor/gems"

	log "Bundling rubinius $ruby_version ..."
	gem install bundler || return $?
	./vendor/gems/bin/bundle install || return $?

	log "Configuring rubinius $ruby_version ..."
	case "$package_manager" in
		brew)
			./configure --prefix="$install_dir" \
				    --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm)" \
				    "${configure_opts[@]}" || return $?
			;;
		port)
			./configure --prefix="$install_dir" \
				    --with-opt-dir=/opt/local \
				    "${configure_opts[@]}" || return $?
			;;
		*)
			./configure --prefix="$install_dir" \
				    "${configure_opts[@]}" || return $?
			;;
	esac
}

#<commit_msg>Export $PATH as well.<commit_after>#!/usr/bin/env bash

ruby_archive="rubinius-$ruby_version.tar.bz2"
ruby_src_dir="rubinius-$ruby_version"
ruby_mirror="${ruby_mirror:-http://releases.rubini.us}"
ruby_url="${ruby_url:-$ruby_mirror/$ruby_archive}"

#
# Install optional dependencies for Rubinius.
#
function install_optional_deps()
{
	if ! command -v bundle >/dev/null; then
		log "Installing bundler ..."
		GEM_HOME=$src_dir/ gem install bundler || return $?
	fi
}

#
# Configures Rubinius.
#
function configure_ruby()
{
	export PATH="$PWD/vendor/gems/bin:$PATH"
	export GEM_HOME="$PWD/vendor/gems"

	log "Bundling rubinius $ruby_version ..."
	gem install bundler || return $?
	bundle install || return $?

	log "Configuring rubinius $ruby_version ..."
	case "$package_manager" in
		brew)
			./configure --prefix="$install_dir" \
				    --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm)" \
				    "${configure_opts[@]}" || return $?
			;;
		port)
			./configure --prefix="$install_dir" \
				    --with-opt-dir=/opt/local \
				    "${configure_opts[@]}" || return $?
			;;
		*)
			./configure --prefix="$install_dir" \
				    "${configure_opts[@]}" || return $?
			;;
	esac
}

#
{'fraction_non_alphanumeric': 0.18536585365853658, 'fraction_numerical': 0.0008130081300813008, 'mean_word_length': 3.574349442379182, 'pattern_counts': {'":': 0, '<': 3, '<?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': '347853', 'n_tokens_mistral': 978, 'n_tokens_neox': 853, 'n_words': 159}