diff --git a/bin/dev b/bin/dev new file mode 100755 index 000000000..5b780ed3f --- /dev/null +++ b/bin/dev @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +echo "Starting Fizzy on http://localhost:3006" +echo "Login with david@37signals.com using secret123456" + +exec ./bin/rails server -p 3006 diff --git a/bin/setup b/bin/setup index 118f5d320..d297520f7 100755 --- a/bin/setup +++ b/bin/setup @@ -1,26 +1,21 @@ #!/usr/bin/env bash set -eo pipefail -app_root="$( cd "$(dirname "$0")/.."; pwd )" -app_name="fizzy" - # Use application binstubs -export PATH="$app_root/bin:$PATH" +export PATH="./bin:$PATH" announce() { - echo - echo "--- $@" + printf "\n--- $@\n" } announce "Installing dependencies" gem install bundler --conservative bundle check || bundle install +announce "Preparing database" if [[ $* == *--reset* ]]; then - announce "Recreating database" rails db:reset else - announce "Preparing database" rails db:prepare fi @@ -30,10 +25,5 @@ rails log:clear tmp:clear announce "Restarting services" rails restart -if [ -d "$HOME/.puma-dev" ]; then - announce "Configuring puma-dev" - ln -nfs "$app_root" "$HOME/.puma-dev/$app_name" - - announce "Checking https://$app_name.test/up" - curl -Is "https://$app_name.test/up" | head -n 1 -fi +echo +echo "Start developing with ./bin/dev"