#!/usr/bin/env bash
set -e

# Force node version
if hash nvm 2> /dev/null; then
  nvm use 6.9.5
fi

# Install yarn with npm
if ! hash yarn 2> /dev/null; then
  npm install -g yarn@1.0.2
fi

# Install dependencies
gem install --no-document bundler
bundle install
yarn install

cd spec/dummy
bash bin/install
