Sha256: 65106a992d68ce55a7715a40c54223b860b8d702a02ede7b3be81df6d35711fb

Contents?: true

Size: 673 Bytes

Versions: 5

Compression:

Stored size: 673 Bytes

Contents

#!/usr/bin/env bash
#
# Run the passed arguments in a near-production configuration
#
# prerequisits:
#  * db is running
#  * no other server is listening on port 3000

if [[ $# -eq 0 ]]; then
  echo "You must pass the test to run against the CI environment server"
  exit 1
fi

export RAILS_ENV=ci

# ensure assets are properly compiled for CI environment
bundle exec rake assets:clobber
bundle exec rake assets:precompile

# run the server
bundle exec rails server &
server_pid=$!
# pause to ensure the server has started
sleep 5


$@
exit_status=$?


# shut down the server and cleanup after ourselves
bundle exec rake assets:clobber
kill $server_pid

exit $exit_status

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_template_18f-0.4.1 templates/bin/with-server
rails_template_18f-0.4.0 templates/bin/with-server
rails_template_18f-0.3.0 templates/bin/with-server
rails_template_18f-0.2.0 templates/bin/with-server
rails_template_18f-0.1.0 templates/bin/with-server