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

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Variables

declare -r -a RUBY_VERSIONS=(
    '1.9.3'
)

declare RUBY_DEFAULT='1.9.3'

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Definitions

install_ruby_versions() {

    declare -r RVM_DIRECTORY="$HOME/.rvm"
    declare -r CONFIGS='
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Ruby Version Manager

export RVM_DIR="'$RVM_DIRECTORY'"

export rvm_path=$RVM_DIR

[ -f "$RVM_DIR/scripts/completion" ] \
  && source $RVM_DIR/scripts/completion

[ -s "$RVM_DIR/scripts/rvm" ] \
  && source $RVM_DIR/scripts/rvm
' # END declare=CONFIGS

    local workingDirectory="$(pwd)" \
        && cd "$(dirname $BASH_SOURCE[0])"

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    # Check if `Curl` is installed

    if ! cmd_exists 'curl'; then
        print_error 'Curl is required, please install it!'
        exit 1
    fi

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    # Install `rvm` and add the necessary configs to `~/.bash.local`

    if [ ! -d "$RVM_DIRECTORY" ]; then
        # Import RVM keys first
        curl -sSL https://rvm.io/mpapis.asc | gpg --import - > /dev/null 2>&1

        curl -sSL https://get.rvm.io | bash -s stable --ignore-dotfiles > /dev/null 2>&1

        print_result $? 'rvm'

        if [ $? -eq 0 ]; then
            [ -f "$HOME/.bash.local" ] \
              && append_to_file_once "$HOME/.bash.local" "$CONFIGS" \
              && source "$HOME/.bash.local"

            print_result $? 'rvm (update ~/.bash.local)'
        fi

    fi

    # TODO - Include this bit in the bash proxy watcher
    if [ "$HTTP_PROXY" != '' ]; then
        append_to_file_once "$HOME/.gemrc" "http-proxy: $HTTP_PROXY"
        append_to_file_once "$HOME/.gemrc" "https-proxy: $HTTPS_PROXY"

        print_in_white "\n    Proxy set: $HOME/.gemrc.\n"
    fi

    if [ -d "$RVM_DIRECTORY" ]; then

        [ -s "$RVM_DIR/scripts/rvm" ] \
          && source $RVM_DIR/scripts/rvm

        # Install ruby versions
        for i in ${RUBY_VERSIONS[@]}; do
            execute "rvm --quiet-curl --install $i" "rvm (install: $i)"
        done

        execute_quietly "rvm use --default $RUBY_DEFAULT" "rvm (set default: $RUBY_DEFAULT)"

        execute_quietly "rvm cleanup all" "rvm (cleanup)"

        if [[ "$(get_os)" == 'osx' ]]; then
            execute_quietly "rvm osx-ssl-certs update all" "Update OS X SSL certs"
        fi

    fi

    cd "$workingDirectory"

}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Main
<commit_msg>Fixed mistyped variable in ruby installer. Changed order of bash_profile sources. Removed once-used variable<commit_after>#!/usr/bin/env bash

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Variables

declare -r -a RUBY_VERSIONS=(
    '1.9.3'
)

declare RUBY_DEFAULT='1.9.3'

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Definitions

install_ruby_versions() {

    declare -r RVM_DIRECTORY="$HOME/.rvm"
    declare -r CONFIGS='
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Ruby Version Manager

export RVM_DIR="'$RVM_DIRECTORY'"

export rvm_path=$RVM_DIR

[ -f "$RVM_DIR/scripts/completion" ] \
  && source $RVM_DIR/scripts/completion

[ -s "$RVM_DIR/scripts/rvm" ] \
  && source $RVM_DIR/scripts/rvm
' # END declare=CONFIGS

    local workingDirectory="$(pwd)" \
        && cd "$(dirname $BASH_SOURCE[0])"

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    # Check if `Curl` is installed

    if ! cmd_exists 'curl'; then
        print_error 'Curl is required, please install it!'
        exit 1
    fi

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    # Install `rvm` and add the necessary configs to `~/.bash.local`

    if [ ! -d "$RVM_DIRECTORY" ]; then
        # Import RVM keys first
        curl -sSL https://rvm.io/mpapis.asc | gpg --import - > /dev/null 2>&1

        curl -sSL https://get.rvm.io | bash -s stable --ignore-dotfiles > /dev/null 2>&1

        print_result $? 'rvm'

        if [ $? -eq 0 ]; then
            [ -f "$HOME/.bash.local" ] \
              && append_to_file_once "$HOME/.bash.local" "$CONFIGS" \
              && source "$HOME/.bash.local"

            print_result $? 'rvm (update ~/.bash.local)'
        fi

    fi

    # TODO - Include this bit in the bash proxy watcher
    if [ "$HTTP_PROXY" != '' ]; then
        append_to_file_once "$HOME/.gemrc" "http-proxy: $HTTP_PROXY"
        append_to_file_once "$HOME/.gemrc" "https-proxy: $HTTPS_PROXY"

        print_in_white "\n    Proxy set: $HOME/.gemrc.\n"
    fi

    if [ -d "$RVM_DIRECTORY" ]; then

        [ -s "$RVM_DIRECTORY/scripts/rvm" ] \
          && source $RVM_DIRECTORY/scripts/rvm

        # Install ruby versions
        for i in ${RUBY_VERSIONS[@]}; do
            execute "rvm --quiet-curl --install $i" "rvm (install: $i)"
        done

        execute_quietly "rvm use --default $RUBY_DEFAULT" "rvm (set default: $RUBY_DEFAULT)"

        execute_quietly "rvm cleanup all" "rvm (cleanup)"

        if [[ "$(get_os)" == 'osx' ]]; then
            execute_quietly "rvm osx-ssl-certs update all" "Update OS X SSL certs"
        fi

    fi

    cd "$workingDirectory"

}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Main

{'fraction_non_alphanumeric': 0.1983245310508104, 'fraction_numerical': 0.004735020943361865, 'mean_word_length': 1.4098288723124177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2616078', 'n_tokens_mistral': 2161, 'n_tokens_neox': 2045, 'n_words': 405}