From dc1559c7b8259da7088521269beb186fbdc70ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Mon, 24 Oct 2016 12:42:07 +0200 Subject: [PATCH] .travis.yml changes --- .travis.yml | 4 ++-- config/initializers/db_preferences_mysql.rb | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index cef570780..1544d3bba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,8 @@ rvm: before_install: - sudo apt-get -qq update - sudo apt-get install -y curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev - - mysql -u root -e 'CREATE USER "some_user"@"localhost" IDENTIFIED BY "some_pass";' - - mysql -u root -e 'GRANT ALL PRIVILEGES ON zammad_prod.* TO "some_user"@"localhost";' + - mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';" + - mysql -u root -e "GRANT ALL PRIVILEGES ON zammad_prod.* TO 'some_user'@'localhost';" - export RAILS_ENV=production - cp config/database.yml.dist config/database.yml install: diff --git a/config/initializers/db_preferences_mysql.rb b/config/initializers/db_preferences_mysql.rb index b5374e142..f416c7ae4 100644 --- a/config/initializers/db_preferences_mysql.rb +++ b/config/initializers/db_preferences_mysql.rb @@ -24,16 +24,16 @@ if ActiveRecord::Base.connection_config[:adapter] == 'mysql2' # rubocop:enable Rails/Exit # rubocop:enable Rails/Output end - elsif major.to_i < 10 - - # rubocop:disable Rails/Output - # rubocop:disable Rails/Exit - p '+++++++++++++++++++++++++++++++++++++++++++++++++++++' - p '+ I\'m sorry, MariaDB 10.0+ is required +' - p '+++++++++++++++++++++++++++++++++++++++++++++++++++++' - exit 1 - # rubocop:enable Rails/Exit - # rubocop:enable Rails/Output + elsif server_vendor == 'MariaDB' + if major.to_i < 10 + # rubocop:disable Rails/Output + # rubocop:disable Rails/Exit + p '+++++++++++++++++++++++++++++++++++++++++++++++++++++' + p '+ I\'m sorry, MariaDB 10.0+ is required +' + p '+++++++++++++++++++++++++++++++++++++++++++++++++++++' + exit 1 + # rubocop:enable Rails/Exit + # rubocop:enable Rails/Output end end