<commit_before>#!/usr/bin/env bash

# Install everything
sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql php5-sqlite

# Configure Apache
WEBROOT="$(pwd)"
CGIROOT=`dirname "$(which php-cgi)"`
echo "WEBROOT: $WEBROOT"
echo "CGIROOT: $CGIROOT"
sudo echo "<VirtualHost *:80>
        DocumentRoot $WEBROOT
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory $WEBROOT >
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

		# Configure PHP as CGI
		ScriptAlias /local-bin $CGIROOT
		DirectoryIndex index.php index.html
		AddType application/x-httpd-php5 .php
		Action application/x-httpd-php5 '/local-bin/php-cgi'

</VirtualHost>" | sudo tee /etc/apache2/sites-available/default > /dev/null
cat /etc/apache2/sites-available/default

sudo a2enmod rewrite
sudo a2enmod actions
sudo service apache2 restart

# apply permissions on writable directories
sudo chown -R www-data shared
sudo chown -R www-data public/storage

# mysql -e 'CREATE DATABASE dlapi;'
# sed s/%database_name%/myapp_test/ app/config/parameters.ini-dist | sed s/%database_login%/root/ | sed s/%database_password%// > app/config/parameters.ini

# Configure custom domain
echo "127.0.0.1 hook.dev" | sudo tee --append /etc/hosts

# create default app
curl -XPOST http://hook-stuff.dev/hook/public/index.php/apps --data '{"app":{"name":"travis"}}' > tests/app.json

echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"<commit_msg>fix URL to create default app when booting travis<commit_after>#!/usr/bin/env bash

# Install everything
sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-mysql php5-sqlite

# Configure Apache
WEBROOT="$(pwd)"
CGIROOT=`dirname "$(which php-cgi)"`
echo "WEBROOT: $WEBROOT"
echo "CGIROOT: $CGIROOT"
sudo echo "<VirtualHost *:80>
        DocumentRoot $WEBROOT
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory $WEBROOT >
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

		# Configure PHP as CGI
		ScriptAlias /local-bin $CGIROOT
		DirectoryIndex index.php index.html
		AddType application/x-httpd-php5 .php
		Action application/x-httpd-php5 '/local-bin/php-cgi'

</VirtualHost>" | sudo tee /etc/apache2/sites-available/default > /dev/null
cat /etc/apache2/sites-available/default

sudo a2enmod rewrite
sudo a2enmod actions
sudo service apache2 restart

# apply permissions on writable directories
sudo chown -R www-data shared
sudo chown -R www-data public/storage

# mysql -e 'CREATE DATABASE dlapi;'
# sed s/%database_name%/myapp_test/ app/config/parameters.ini-dist | sed s/%database_login%/root/ | sed s/%database_password%// > app/config/parameters.ini

# Configure custom domain
echo "127.0.0.1 hook.dev" | sudo tee --append /etc/hosts

# create default app
curl -XPOST http://hook.dev/public/index.php/apps --data '{"app":{"name":"travis"}}' > tests/app.json

echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
{'fraction_non_alphanumeric': 0.11100889297761422, 'fraction_numerical': 0.012266176019625881, 'mean_word_length': 3.1031446540880503, 'pattern_counts': {'":': 4, '<': 15, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, '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': '643674', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1034, 'n_words': 275}