dist: trusty
sudo: required
language: ruby
cache: bundler
rvm:
  - 2.0.0
  - 2.1.8
  - 2.2.4
  - 2.3.0
before_install:
  - gem install bundler
before_script:
  - sudo service mysql stop
  - sudo service postgresql stop
  - docker-compose up -d
  - function mysql_ping { mysqladmin -u root -h 127.0.0.1 -ppassword ping > /dev/null 2> /dev/null; }
  - function pg_ping { PGPASSWORD=password pg_isready -U postgres -h 127.0.0.1 > /dev/null 2> /dev/null; }
  - for i in {1..60}; do mysql_ping && break; sleep 1; done
  - for i in {1..60}; do pg_ping && break; sleep 1; done
script:
  - bundle exec rake
gemfile:
  - gemfiles/activerecord_4.2.gemfile
  - gemfiles/activerecord_5.0.gemfile
env:
  matrix:
    - ENABLE_MYSQL_AWESOME=0
    - ENABLE_MYSQL_AWESOME=1
    - POSTGRESQL=1
services:
  - docker
addons:
  apt:
    packages:
      - mysql-client-core-5.6
      - mysql-client-5.6
      - postgresql-client-9.4

dist: trusty
sudo: required
language: ruby
cache: bundler
rvm:
  - 2.2.4
  - 2.3.0
before_install:
  - gem install bundler
before_script:
  - sudo service mysql stop
  - sudo service postgresql stop
  - docker-compose up -d
  - function mysql_ping { mysqladmin -u root -h 127.0.0.1 -ppassword ping > /dev/null 2> /dev/null; }
  - function pg_ping { PGPASSWORD=password pg_isready -U postgres -h 127.0.0.1 > /dev/null 2> /dev/null; }
  - for i in {1..60}; do mysql_ping && break; sleep 1; done
  - for i in {1..60}; do pg_ping && break; sleep 1; done
script:
  - bundle exec rake
gemfile:
  - gemfiles/activerecord_4.2.gemfile
  - gemfiles/activerecord_5.0.gemfile
env:
  matrix:
    - ENABLE_MYSQL_AWESOME=0
    - ENABLE_MYSQL_AWESOME=1
    - POSTGRESQL=1
services:
  - docker
addons:
  apt:
    packages:
      - mysql-client-core-5.6
      - mysql-client-5.6
      - postgresql-client-9.4

Fix ruby version for spec
Fix ruby version for spec
