language: ruby

env:
  global:
    - ROOMS_DB_USER=root
    - ROOMS_DB_DATABASE=nyu_rooms_test
    - ROOMS_DB_HOST=localhost
    - ROOMS_SECRET_TOKEN=1234
    - ROOMS_COOKIE_DOMAIN=.local
    - LOGIN_URL=https://dev.login.library.nyu.edu
    - SSO_LOGOUT_PATH=/logout

before_install:
  - curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.0/elasticsearch-2.4.0.deb && sudo dpkg -i --force-confnew elasticsearch-2.4.0.deb && sudo service elasticsearch restart

before_script:
  - ls -la /usr/share/elasticsearch/bin/elasticsearch
  - elasticsearch -v
  - mysql -e 'create database nyu_rooms_test;'
  - bundle exec rake db:schema:load

script:
  - SERVER=launch TEST_CLUSTER_COMMAND=/usr/share/elasticsearch/bin/elasticsearch TEST_CLUSTER_PARAMS='-Des.default.path.conf=/etc/elasticsearch/ -Des.default.path.logs==/var/log/elasticsearch/' bundle exec rake

rvm:
  - 2.2.6
  - 2.3.3

cache: bundler

notifications:
  email:
    - lib-webservices@nyu.edu

sudo: false

language: ruby

env:
  global:
    - ROOMS_DB_USER=root
    - ROOMS_DB_DATABASE=nyu_rooms_test
    - ROOMS_DB_HOST=localhost
    - ROOMS_SECRET_TOKEN=1234
    - ROOMS_COOKIE_DOMAIN=.local
    - LOGIN_URL=https://dev.login.library.nyu.edu
    - SSO_LOGOUT_PATH=/logout

before_install:
  - curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.0/elasticsearch-2.4.0.deb && dpkg -i --force-confnew elasticsearch-2.4.0.deb && service elasticsearch restart

before_script:
  - ls -la /usr/share/elasticsearch/bin/elasticsearch
  - elasticsearch -v
  - mysql -e 'create database nyu_rooms_test;'
  - bundle exec rake db:schema:load

script:
  - SERVER=launch TEST_CLUSTER_COMMAND=/usr/share/elasticsearch/bin/elasticsearch TEST_CLUSTER_PARAMS='-Des.default.path.conf=/etc/elasticsearch/ -Des.default.path.logs==/var/log/elasticsearch/' bundle exec rake

rvm:
  - 2.2.6
  - 2.3.3

cache: bundler

notifications:
  email:
    - lib-webservices@nyu.edu

sudo: false

Remove sudo from elasticsearch insatll
Remove sudo from elasticsearch insatll
