Sha256: e8aff935f3cb011ebd18a6052a70355f30148eba1763182f7ebe9a314c6ecb66

Contents?: true

Size: 728 Bytes

Versions: 15

Compression:

Stored size: 728 Bytes

Contents

#!/usr/bin/env bash
set -e

case "$1" in

  start)
  config="${CONFIG_RU:-test/benchmark/config.ru}"
  bundle exec ruby -Ilib -S rackup "$config" --daemonize --pid tmp/benchmark_app.pid --warn --server webrick
  until [ -f 'tmp/benchmark_app.pid' ]; do
    sleep 0.1 # give it time to start.. I don't know a better way
  done
  cat tmp/benchmark_app.pid
  true
  ;;

  stop)
  if [ -f 'tmp/benchmark_app.pid' ]; then
    kill -TERM $(cat tmp/benchmark_app.pid)
  else
    echo 'No pidfile'
    false
  fi
  ;;

  status)
  if [ -f 'tmp/benchmark_app.pid' ]; then
    kill -0 $(cat tmp/benchmark_app.pid)
    [ "$?" -eq 0 ]
  else
    echo 'No pidfile'
    false
  fi
  ;;

  *)
  echo "Usage: $0 [start|stop|status]"
  ;;

esac

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
active_model_serializers_custom-0.10.90 bin/serve_benchmark
active_model_serializers-0.10.9 bin/serve_benchmark
active_model_serializers-0.10.8 bin/serve_benchmark
active_model_serializers-0.10.7 bin/serve_benchmark
active_model_serializers-0.10.6 bin/serve_benchmark
active_model_serializers-0.10.5 bin/serve_benchmark
active_model_serializers-0.10.4 bin/serve_benchmark
agi_active_model_serializers-0.10.9 bin/serve_benchmark
agi_active_model_serializers-0.10.8 bin/serve_benchmark
agi_active_model_serializers-0.10.7 bin/serve_benchmark
active_model_serializers-0.10.3 bin/serve_benchmark
active_model_serializers-0.10.2 bin/serve_benchmark
active_model_serializers-0.10.1 bin/serve_benchmark
active_model_serializers-0.10.0 bin/serve_benchmark
active_model_serializers-0.10.0.rc5 bin/serve_benchmark