Merge pull request #282 from monotek/develop

added .travis.yml / added Ubuntu 16.04 to .pkgr.yml / fixed db_preferences_mysql.rb
This commit is contained in:
Thorsten 2016-10-24 13:21:06 +02:00 committed by GitHub
commit e0a9a42c7a
3 changed files with 45 additions and 14 deletions

View file

@ -11,7 +11,12 @@ targets:
- postgresql
- postgresql-server
- postgresql-devel
ubuntu-16.04:
dependencies:
- httpd
- postgresql
- postgresql-server
- postgresql-devel
before:
- uname -a
- ruby -v

27
.travis.yml Normal file
View file

@ -0,0 +1,27 @@
dist: trusty
sudo: required
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
services:
- mysql
language: ruby
rvm:
- 2.3.1
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';"
- export RAILS_ENV=production
- cp config/database.yml.dist config/database.yml
install:
- bundle install --without test development postgres
script:
- rake db:create
- rake db:migrate
- rake db:seed
- rake assets:precompile

View file

@ -14,7 +14,6 @@ if ActiveRecord::Base.connection_config[:adapter] == 'mysql2'
(major, minor) = server_version.split('.')
if server_vendor == 'MySQL'
if major.to_i < 5 || (major.to_i == 5 && minor.to_i < 6)
# rubocop:disable Rails/Output
# rubocop:disable Rails/Exit
p '+++++++++++++++++++++++++++++++++++++++++++++++++++++'
@ -24,8 +23,9 @@ if ActiveRecord::Base.connection_config[:adapter] == 'mysql2'
# rubocop:enable Rails/Exit
# rubocop:enable Rails/Output
end
elsif major.to_i < 10
end
elsif server_vendor == 'MariaDB'
if major.to_i < 10
# rubocop:disable Rails/Output
# rubocop:disable Rails/Exit
p '+++++++++++++++++++++++++++++++++++++++++++++++++++++'
@ -34,6 +34,5 @@ if ActiveRecord::Base.connection_config[:adapter] == 'mysql2'
exit 1
# rubocop:enable Rails/Exit
# rubocop:enable Rails/Output
end
end