Sha256: d5573aeb61ec2569ec0fbaa7fd2daccc4d404b5aec2c640e4c20845786f2cf01

Contents?: true

Size: 940 Bytes

Versions: 3

Compression:

Stored size: 940 Bytes

Contents

#!/usr/bin/env sh

# Set up Rails app. Run this script immediately after cloning the codebase.
# https://github.com/thoughtbot/guides/tree/master/protocol

# Exit if any subcommand fails
set -e

# Set up Ruby dependencies via Bundler
if ! command -v bundle > /dev/null; then
  gem install bundler --no-document
fi

bundle install

# Set up configurable environment variables
if [ ! -f .env ]; then
  cp .sample.env .env
fi

# Set up database and add any development seed data
bundle exec rake dev:prime

# Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv
mkdir -p .git/safe

# Pick a port for Foreman
if ! grep -qs 'port' .foreman; then
  printf 'port: <%= config[:port_number] %>\n' >> .foreman
fi

# Error out if Foreman is not installed
if ! command -v foreman > /dev/null; then
  printf 'Foreman is not installed.\n'
  printf 'See https://github.com/ddollar/foreman for install instructions.\n'
  exit 1
fi

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
suspenders-1.18.0 templates/bin_setup.erb
railsqs-1.0.1 templates/bin_setup.erb
railsqs-1.0.0 templates/bin_setup.erb