<commit_before>#!/bin/sh

# Set up Rails app. Run this script immediately after cloning the codebase.
# https://la-guia.platan.us/code/rails.html#getting-started

# Exit if any subcommand fails
set -e

# Set up Ruby dependencies via Bundler
gem install bundler --conservative
bundle check || bundle install

# Set up database
bin/rake db:setup

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

<% if selected?(:heroku) -%>
# Setup heroku application remotes
if heroku apps:info --app <%= get(:heroku_app_name_staging) %> &> /dev/null; then
  git remote add staging <EMAIL>:<%= get(:heroku_app_name_staging) %>.git || true
  git config heroku.remote staging
  echo 'You are a collaborator on the "<%= get(:heroku_app_name_staging) %>" Heroku app'
else
  echo 'Ask for access to the "<%= get(:heroku_app_name_staging) %>" Heroku app'
fi

if heroku apps:info --app <%= get(:heroku_app_name_production) %> &> /dev/null; then
  git remote add production <EMAIL>:<%= get(:heroku_app_name_production) %>.git || true
  echo 'You are a collaborator on the "<%= get(:heroku_app_name_production) %>" Heroku app'
else
  echo 'Ask for access to the "<%= get(:heroku_app_name_production) %>" Heroku app'
fi
<% end-%><commit_msg>fix(heroku): adds login check on the bin/setup script<commit_after>#!/bin/sh

# Set up Rails app. Run this script immediately after cloning the codebase.
# https://la-guia.platan.us/code/rails.html#getting-started

# Exit if any subcommand fails
set -e

# Set up Ruby dependencies via Bundler
gem install bundler --conservative
bundle check || bundle install

# Set up database
bin/rake db:setup

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

<% if selected?(:heroku) -%>
if heroku auth:whoami &> /dev/null; then
  # Setup heroku application remotes
  if heroku apps:info --app <%= get(:heroku_app_name_staging) %> &> /dev/null; then
    git remote add staging <EMAIL>:<%= get(:heroku_app_name_staging) %>.git || true
    git config heroku.remote staging
    echo 'You are a collaborator on the "<%= get(:heroku_app_name_staging) %>" Heroku app'
  else
    echo 'Ask for access to the "<%= get(:heroku_app_name_staging) %>" Heroku app'
  fi

  if heroku apps:info --app <%= get(:heroku_app_name_production) %> &> /dev/null; then
    git remote add production <EMAIL>:<%= get(:heroku_app_name_production) %>.git || true
    echo 'You are a collaborator on the "<%= get(:heroku_app_name_production) %>" Heroku app'
  else
    echo 'Ask for access to the "<%= get(:heroku_app_name_production) %>" Heroku app'
  fi
else
  echo 'You need to login to heroku. Run "heroku login"'
fi
<% end-%>
{'fraction_non_alphanumeric': 0.1364644970414201, 'fraction_numerical': 0.0, 'mean_word_length': 4.283203125, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 32, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3378903', 'n_tokens_mistral': 963, 'n_tokens_neox': 898, 'n_words': 293}