Drop puma-dev in favor of localhost
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user