<commit_before>#!/bin/bash

echo 'Setting up your developmental environment. This may take a while.'

echo '[*] Installing GNUpg...'
brew install gnupg

echo '[*] Checking for rvm...'
if ! which rvm > /dev/null; then
  gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && echo '[*] Installing rvm...' && \curl -sSL https://get.rvm.io | bash -s stable
  source /home/sage/.rvm/scripts/rvm
fi

echo '[*] Installing Ruby-2.5.0...'
rvm install ruby-2.5.0

echo '[*] Install node.js...'
brew install node

echo '[*] Installing bundler...'
gem install bundler

echo '[*] Installing Gems and dependencies...'
bundle install

echo '[*] Installing yarn...'
brew install yarn

echo '[*] Installing node_modules...'
yarn

echo '[*] Installing phantomjs-prebuilt...'
sudo yarn global add phantomjs-prebuilt

echo '[*] Installing pandoc...'
brew install pandoc

echo '[*] Creating configuration files...'
cp config/application.example.yml config/application.yml
cp config/database.example.yml config/database.yml

echo '[*] Installing Mysql-server...'
brew install mysql
mysql.server start

echo '[*] Creating databases...'
echo 'Enter password for Mysql root user'
echo 'CREATE DATABASE dashboard DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
      CREATE DATABASE dashboard_testing DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
      exit' | sudo mysql -p

echo '[*] Installing redis-server...'
brew install redis

echo '[*] Installing gulp...'
sudo yarn global add gulp

echo '[*] Installing R...'
brew tap homebrew/science && brew install r

echo '[*] Migrating databases...'
rake db:migrate
rake db:migrate RAILS_ENV=test<commit_msg>remove deprecated homebrew/science, now part of core from MacOS setup (#1731)<commit_after>#!/bin/bash

echo 'Setting up your developmental environment. This may take a while.'

echo '[*] Installing GNUpg...'
brew install gnupg

echo '[*] Checking for rvm...'
if ! which rvm > /dev/null; then
  gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && echo '[*] Installing rvm...' && \curl -sSL https://get.rvm.io | bash -s stable
  source /home/sage/.rvm/scripts/rvm
fi

echo '[*] Installing Ruby-2.5.0...'
rvm install ruby-2.5.0

echo '[*] Install node.js...'
brew install node

echo '[*] Installing bundler...'
gem install bundler

echo '[*] Installing Gems and dependencies...'
bundle install

echo '[*] Installing yarn...'
brew install yarn

echo '[*] Installing node_modules...'
yarn

echo '[*] Installing phantomjs-prebuilt...'
sudo yarn global add phantomjs-prebuilt

echo '[*] Installing pandoc...'
brew install pandoc

echo '[*] Creating configuration files...'
cp config/application.example.yml config/application.yml
cp config/database.example.yml config/database.yml

echo '[*] Installing Mysql-server...'
brew install mysql
mysql.server start

echo '[*] Creating databases...'
echo 'Enter password for Mysql root user'
echo 'CREATE DATABASE dashboard DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
      CREATE DATABASE dashboard_testing DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
      exit' | sudo mysql -p

echo '[*] Installing redis-server...'
brew install redis

echo '[*] Installing gulp...'
sudo yarn global add gulp

echo '[*] Installing R...'
brew install r

echo '[*] Migrating databases...'
rake db:migrate
rake db:migrate RAILS_ENV=test
{'fraction_non_alphanumeric': 0.12903225806451613, 'fraction_numerical': 0.03825292606337425, 'mean_word_length': 4.070911722141823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '188403', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1132, 'n_words': 362}