<commit_before>#!/bin/bash

echo "$GITHUB_SSH_KEY" > ~/.ssh/github_key && chmod 600 ~/.ssh/github_key

GIT_BRANCH=${GIT_BRANCH:-"master"}


cd /home/app/webapp



if [ -z "$GIT_PATH" ]
  then
    git clone $GITHUB_REPO --branch $GIT_BRANCH --single-branch .
  else
    git clone -n $GITHUB_REPO --branch $GIT_BRANCH --single-branch .
    git config core.sparseCheckout true
    echo "$GIT_PATH" >> .git/info/sparse-checkout
    git checkout $GIT_BRANCH
    mv /home/app/webapp/$GIT_PATH/* /home/app/webapp
fi

bundle install

chown -R app /home/app/webapp<commit_msg>whitelisting all environment variables to be visible from passenger app<commit_after>#!/bin/bash

echo "$GITHUB_SSH_KEY" > ~/.ssh/github_key && chmod 600 ~/.ssh/github_key

GIT_BRANCH=${GIT_BRANCH:-"master"}


cd /home/app/webapp



if [ -z "$GIT_PATH" ]
  then
    git clone $GITHUB_REPO --branch $GIT_BRANCH --single-branch .
  else
    git clone -n $GITHUB_REPO --branch $GIT_BRANCH --single-branch .
    git config core.sparseCheckout true
    echo "$GIT_PATH" >> .git/info/sparse-checkout
    git checkout $GIT_BRANCH
    mv /home/app/webapp/$GIT_PATH/* /home/app/webapp
fi


ruby -e 'ENV.map{|e| puts "env #{e.first};"}' > /etc/nginx/main.d/rb_env.conf

bundle install

chown -R app /home/app/webapp
{'fraction_non_alphanumeric': 0.1430817610062893, 'fraction_numerical': 0.0047169811320754715, 'mean_word_length': 3.2861952861952863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, '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': '3890668', 'n_tokens_mistral': 537, 'n_tokens_neox': 509, 'n_words': 111}