Skip to content

Commit

Permalink
Only execute assets generation for rspec if 100% necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
CSammy committed Apr 16, 2018
1 parent 17bb9c7 commit 061624e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ dia_restart() {

dia_rspec() {
! dia_is_configured && exit_unconfigured
docker-compose run --rm diaspora /bin/sh -c 'RAILS_ENV="test" bin/rake db:create db:migrate assets:generate_error_pages'
addendum=""
[ -f "$DIASPORA_PATH"/public/404.html ] && addendum="assets:generate_error_pages"
docker-compose run --rm diaspora /bin/sh -c "RAILS_ENV=test bin/rake db:create db:migrate ${addendum}"
docker-compose run --rm diaspora bin/rspec "$@"
}

Expand Down

0 comments on commit 061624e

Please sign in to comment.