language: ruby

bundler_args: --deployment --without development

rvm:
- 1.9.3-p448

script: bundle exec rspec spec

before_script:
- mysql -u root -e "DELETE FROM mysql.user WHERE Host='localhost' AND User=''"
- mysql -u root -e "SET GLOBAL innodb_stats_on_metadata=ON, innodb_stats_persistent=OFF;"
- mysql -u root -e "SHOW VARIABLES"


language: ruby

bundler_args: --deployment --without development

rvm:
- 1.9.3-p448

script: bundle exec rspec spec

before_script:
# uninstall MySQL 5.5
- sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5
- sudo apt-get autoremove
# install MySQL 5.6
- sudo apt-get install libaio1
- wget -O mysql-5.6.13.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.13-debian6.0-x86_64.deb/from/http://cdn.mysql.com/
- sudo dpkg -i mysql-5.6.13.deb
- sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server
- sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/
# update configuration for switch from 5.5 to 5.6
- sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf
- sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf
- sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf
- sudo /etc/init.d/mysql.server start
- mysql -u root -e "DELETE FROM mysql.user WHERE Host='localhost' AND User='';"
- mysql -u root -e "SET GLOBAL innodb_stats_on_metadata=ON, innodb_stats_persistent=OFF;"
- mysql -u root -e "SHOW VARIABLES;"

Install MySQL 5.6 on Travis
Install MySQL 5.6 on Travis
