<commit_before>set -ue

SHADOW_PUPPET_VERSION="0.3.2"
MANIFEST_VERSION="0.1.0"

trap "echo FAILED" EXIT

# ensure_gem GEM [VERSION]
function ensure_gem()
{
	if [ $# -eq 2 ]; then
		# name + version
		if ! gem list $1 | grep -q "$1 (\([^,]*, \)*${2//./\\.}\(, [^,]*\)*)$"; then
			echo installing $1 -v$2
			gem install --no-ri --no-rdoc $1 -v$2
		fi
	else
		# name only
		if ! gem list $1 | grep -q "^$1 ";then
			echo installing $1
			gem install --no-ri --no-rdoc $1
		fi
	fi
}

function use_system_ruby() {
	if [ -e /usr/local/rvm ]; then
		echo RVM: Switch to system ruby
		set +eu
		. /usr/local/rvm/scripts/rvm<commit_msg>manifest 1.1.1<commit_after>set -ue

SHADOW_PUPPET_VERSION="0.3.2"
MANIFEST_VERSION="0.1.1"

trap "echo FAILED" EXIT

# ensure_gem GEM [VERSION]
function ensure_gem()
{
	if [ $# -eq 2 ]; then
		# name + version
		if ! gem list $1 | grep -q "$1 (\([^,]*, \)*${2//./\\.}\(, [^,]*\)*)$"; then
			echo installing $1 -v$2
			gem install --no-ri --no-rdoc $1 -v$2
		fi
	else
		# name only
		if ! gem list $1 | grep -q "^$1 ";then
			echo installing $1
			gem install --no-ri --no-rdoc $1
		fi
	fi
}

function use_system_ruby() {
	if [ -e /usr/local/rvm ]; then
		echo RVM: Switch to system ruby
		set +eu
		. /usr/local/rvm/scripts/rvm
{'fraction_non_alphanumeric': 0.1957040572792363, 'fraction_numerical': 0.031026252983293555, 'mean_word_length': 2.5738636363636362, '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': '7337592', 'n_tokens_mistral': 602, 'n_tokens_neox': 543, 'n_words': 150}