#!/bin/bash -x
set -e

rm -f Gemfile.lock
git clean -fdx

export GOVUK_APP_DOMAIN=dev.gov.uk

for version in 2.2 2.1 1.9.3; do
  export RBENV_VERSION=$version
  echo "Running tests under ruby $version"
  bundle install --path "${HOME}/bundles/${JOB_NAME}"
  bundle exec rake
done

unset RBENV_VERSION

if [[ -n "$PUBLISH_GEM" ]]; then
  bundle exec rake publish_gem --trace
fi

#!/bin/bash -x
set -e

git clean -fdx

export GOVUK_APP_DOMAIN=dev.gov.uk

for version in 2.2 2.1 1.9.3; do
  rm -f Gemfile.lock
  export RBENV_VERSION=$version
  echo "Running tests under ruby $version"
  bundle install --path "${HOME}/bundles/${JOB_NAME}"
  bundle exec rake
done

unset RBENV_VERSION

if [[ -n "$PUBLISH_GEM" ]]; then
  bundle exec rake publish_gem --trace
fi

Clear out the Gemfile.lock per Ruby version
Clear out the Gemfile.lock per Ruby version

This ensures we're fully compatible with older
Ruby versions when they set specific gem versions.