Skip to content

Commit

Permalink
Merge d4e8e8c into 132b976
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Oct 26, 2019
2 parents 132b976 + d4e8e8c commit 5f6277d
Show file tree
Hide file tree
Showing 22 changed files with 235 additions and 229 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
language: ruby
sudo: false
rvm:
- 2.3
- 2.4
services:
- xvfb
- mysql
- redis-server
addons:
apt:
packages:
- libmagic-dev
- qt5-default
- libqt5webkit5-dev
- gstreamer1.0-plugins-base
- gstreamer1.0-tools
chrome: stable
env: COVERALLS=1
cache: bundler
bundler_args:
Expand All @@ -24,4 +20,4 @@ before_script:
- "mysql -e 'grant all on foodsoft_test.* to travis;'"
- 'printf "test:\n adapter: mysql2\n database: foodsoft_test\n username: travis\n encoding: utf8\n" >config/database.yml'
- 'bundle exec rake db:schema:load RAILS_ENV=test'
script: xvfb-run -a bundle exec rake rspec-rerun:spec
script: bundle exec rake rspec-rerun:spec
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.3
FROM ruby:2.4

RUN supercronicUrl=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64 && \
supercronicBin=/usr/local/bin/supercronic && \
Expand Down Expand Up @@ -34,14 +34,14 @@ RUN export DATABASE_URL=mysql2://localhost/temp && \
export SECRET_KEY_BASE=thisisnotimportantnow && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y mysql-server && \
apt-get install -y mariadb-server && \
/etc/init.d/mysql start && \
cp config/app_config.yml.SAMPLE config/app_config.yml && \
bundle exec rake db:setup assets:precompile && \
rm -Rf config/app_config.yml tmp/* && \
/etc/init.d/mysql stop && \
rm -Rf /run/mysqld /tmp/* /var/tmp/* /var/lib/mysql /var/log/mysql* && \
apt-get purge -y --auto-remove mysql-server && \
apt-get purge -y --auto-remove mariadb-server && \
rm -Rf /var/lib/apt/lists/* /var/cache/apt/*

# Make relevant dirs writable for app user
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ruby:2.3
FROM ruby:2.4

# Install dependencies
RUN deps='libmagic-dev xvfb qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x' && \
RUN deps='libmagic-dev chromium' && \
apt-get update && \
apt-get install --no-install-recommends -y $deps && \
rm -Rf /var/lib/apt/lists/* /var/cache/apt/*
Expand All @@ -12,6 +12,9 @@ ENV PORT=3000 \
RAILS_LOG_TO_STDOUT=true \
RAILS_SERVE_STATIC_FILES=true \
\
CHROMIUM_FLAGS=--no-sandbox \
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true \
\
BUNDLE_PATH=/home/app/bundle \
BUNDLE_APP_CONFIG=/home/app/bundle/config

Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ group :test do
gem 'factory_bot_rails'
gem 'faker'
gem 'capybara'
gem 'capybara-webkit'
gem 'puma' # for faster Capybara tests
gem 'apparition' # Capybara javascript driver
gem 'database_cleaner'
gem 'connection_pool'
# need to include rspec components before i18n-spec or rake fails in test environment
Expand Down
Loading

0 comments on commit 5f6277d

Please sign in to comment.