Sha256: 2261af14133d2dbab61794388e8e3c4a7155d4b76a43b2331dc38ee350c5fef7

Contents?: true

Size: 942 Bytes

Versions: 1

Compression:

Stored size: 942 Bytes

Contents

#!/usr/bin/env sh

# Run this script immediately after cloning the codebase.

# Make sure Bundler is installed
if [ "$(gem query -i -n bundler)" = "false" ]; then
  echo "Installing Bundler..."
  gem install bundler
fi

# Set up Ruby dependencies via Bundler
echo "Installing Dependencies..."
bundle install

# Rename database & and making first commit
DEV_DB_NAME="${PWD##*/}_development"
sed -i.bak "s/venice_development/${DEV_DB_NAME}/g" config/mongoid.yml
rm config/mongoid.yml.bak

# Seed data
bundle exec rake db:seed

# Remove Git remote if it's still the venice repo (after cloning)
if [ "$(git config --get remote.origin.url)" = "git@github.com:alexkravets/venice.git" ]; then
  git remote rename origin venice

  echo "What is your repo url? Enter URL or leave blank"
  read url
  if [ -z "$url" ]; then
    git remote add origin "$url"

    git add config/mongoid.yml
    git commit -am "Update development database name."
  fi
fi

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
venice-chr-0.1.5 bin/setup