<commit_before>#!/bin/bash
# Pin commands to install vagrant, ansible, serverspec
# Pinning commands will ensure that they are ran in each snap-ci stage. This is
# useful when you only want to re-run one stage.
#
#
# Cache and install Vagrant
[[ -f ${SNAP_CACHE_DIR}/$vagrant_rpm ]] || wget https://dl.bintray.com/mitchellh/vagrant/$vagrant_rpm -O ${SNAP_CACHE_DIR}/$vagrant_rpm
[[ -x /usr/bin/vagrant ]] || sudo -E rpm -ivh ${SNAP_CACHE_DIR}/$vagrant_rpm
# TODO: Check for vagrant plugins before installing them.
#
# An older version of digital_ocean plugin is used because of an issue with the
# current version that doesn't support using snapshots.
# https://github.com/smdahlen/vagrant-digitalocean/issues/187
#/usr/bin/vagrant plugin install vagrant-digitalocean --plugin-version '0.7.0'
/usr/bin/vagrant plugin install vagrant-digitalocean
vagrant plugin install vagrant-hostmanager
[[ -f ${SNAP_CACHE_DIR}/digital_ocean.box ]] || wget https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box -O ${SNAP_CACHE_DIR}/digital_ocean.box
# TODO: Check to see if the box was already added before doing again.
vagrant box add digital_ocean ${SNAP_CACHE_DIR}/digital_ocean.box --force

# Install Ansible dependencies
sudo yum install ansible -y

# Install serverspec dependencies
sudo yum install bundler -y
cd /var/snap-ci/repo/spec_tests/ && bundle update
<commit_msg>removes "bundler" package installation attempt<commit_after>#!/bin/bash
# Pin commands to install vagrant, ansible, serverspec
# Pinning commands will ensure that they are ran in each snap-ci stage. This is
# useful when you only want to re-run one stage.
#
#
# Cache and install Vagrant
[[ -f ${SNAP_CACHE_DIR}/$vagrant_rpm ]] || wget https://dl.bintray.com/mitchellh/vagrant/$vagrant_rpm -O ${SNAP_CACHE_DIR}/$vagrant_rpm
[[ -x /usr/bin/vagrant ]] || sudo -E rpm -ivh ${SNAP_CACHE_DIR}/$vagrant_rpm
# TODO: Check for vagrant plugins before installing them.
#
# An older version of digital_ocean plugin is used because of an issue with the
# current version that doesn't support using snapshots.
# https://github.com/smdahlen/vagrant-digitalocean/issues/187
#/usr/bin/vagrant plugin install vagrant-digitalocean --plugin-version '0.7.0'
/usr/bin/vagrant plugin install vagrant-digitalocean
vagrant plugin install vagrant-hostmanager
[[ -f ${SNAP_CACHE_DIR}/digital_ocean.box ]] || wget https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box -O ${SNAP_CACHE_DIR}/digital_ocean.box
# TODO: Check to see if the box was already added before doing again.
vagrant box add digital_ocean ${SNAP_CACHE_DIR}/digital_ocean.box --force

# Install Ansible dependencies
sudo yum install ansible -y

# Install serverspec dependencies
cd /var/snap-ci/repo/spec_tests/ && bundle update

{'fraction_non_alphanumeric': 0.10792398709214772, 'fraction_numerical': 0.004302617425600574, 'mean_word_length': 4.8004158004158, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '2082633', 'n_tokens_mistral': 969, 'n_tokens_neox': 923, 'n_words': 273}