Skip to content

Commit

Permalink
spaces in file names are not the enemy
Browse files Browse the repository at this point in the history
  • Loading branch information
dzuelke committed Aug 20, 2014
1 parent fff2cbb commit 7247160
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions bin/heroku-hhvm-apache2
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ set -eu
shopt -s extglob

php_passthrough() {
local dir=$(dirname $1)
local file=$(basename $1)
local out=$(basename $file .php)
local dir=$(dirname "$1")
local file=$(basename "$1")
local out=$(basename "$file" .php)
if [[ "$out" != "$file" ]]; then
echo "Interpreting ${1#$HEROKU_APP_DIR/} to $out" >&2
out="$dir/$out"
hhvm $1 > $out
echo $out
hhvm "$1" > "$out"
echo "$out"
else
echo $1
echo "$1"
fi
}

Expand Down
12 changes: 6 additions & 6 deletions bin/heroku-hhvm-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ set -eu
shopt -s extglob

php_passthrough() {
local dir=$(dirname $1)
local file=$(basename $1)
local out=$(basename $file .php)
local dir=$(dirname "$1")
local file=$(basename "$1")
local out=$(basename "$file" .php)
if [[ "$out" != "$file" ]]; then
echo "Interpreting ${1#$HEROKU_APP_DIR/} to $out" >&2
out="$dir/$out"
hhvm $1 > $out
echo $out
hhvm "$1" > "$out"
echo "$out"
else
echo $1
echo "$1"
fi
}

Expand Down
12 changes: 6 additions & 6 deletions bin/heroku-php-apache2
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ set -eu
shopt -s extglob

php_passthrough() {
local dir=$(dirname $1)
local file=$(basename $1)
local out=$(basename $file .php)
local dir=$(dirname "$1")
local file=$(basename "$1")
local out=$(basename "$file" .php)
if [[ "$out" != "$file" ]]; then
echo "Interpreting ${1#$HEROKU_APP_DIR/} to $out" >&2
out="$dir/$out"
php $1 > $out
echo $out
php "$1" > "$out"
echo "$out"
else
echo $1
echo "$1"
fi
}

Expand Down
12 changes: 6 additions & 6 deletions bin/heroku-php-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ set -eu
shopt -s extglob

php_passthrough() {
local dir=$(dirname $1)
local file=$(basename $1)
local out=$(basename $file .php)
local dir=$(dirname "$1")
local file=$(basename "$1")
local out=$(basename "$file" .php)
if [[ "$out" != "$file" ]]; then
echo "Interpreting ${1#$HEROKU_APP_DIR/} to $out" >&2
out="$dir/$out"
php $1 > $out
echo $out
php "$1" > "$out"
echo "$out"
else
echo $1
echo "$1"
fi
}

Expand Down
12 changes: 6 additions & 6 deletions conf/apache2/heroku.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Listen ${PORT}

TraceEnable off

<Directory ${HEROKU_APP_DIR}>
<Directory "${HEROKU_APP_DIR}">
# lock it down fully by default
# if it's also the docroot, it'll be opened up again further below
Require all denied
Expand All @@ -32,16 +32,16 @@ Listen ${PORT}
</FilesMatch>
</Directory>
# handle these separately; who knows where they are and whether they're accessible
<Directory ${HEROKU_APP_DIR}/${COMPOSER_VENDOR_DIR}>
<Directory "${HEROKU_APP_DIR}/${COMPOSER_VENDOR_DIR}">
Require all denied
</Directory>
<Directory ${HEROKU_APP_DIR}/${COMPOSER_BIN_DIR}>
<Directory "${HEROKU_APP_DIR}/${COMPOSER_BIN_DIR}">
Require all denied
</Directory>

DocumentRoot ${DOCUMENT_ROOT}
DocumentRoot "${DOCUMENT_ROOT}"

<Directory ${DOCUMENT_ROOT}>
<Directory "${DOCUMENT_ROOT}">
Options FollowSymLinks

# allow .htaccess to do everything
Expand All @@ -60,6 +60,6 @@ Listen ${PORT}
SetHandler proxy:fcgi://heroku-fcgi
</FilesMatch>

Include ${HEROKU_PHP_HTTPD_CONFIG_INCLUDE}
Include "${HEROKU_PHP_HTTPD_CONFIG_INCLUDE}"

</VirtualHost>
4 changes: 2 additions & 2 deletions conf/nginx/heroku.conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
# FIXME: breaks redirects with foreman
port_in_redirect off;

root <?=getenv('DOCUMENT_ROOT')?:getenv('HEROKU_APP_DIR')?:getcwd()?>;
root "<?=getenv('DOCUMENT_ROOT')?:getenv('HEROKU_APP_DIR')?:getcwd()?>";

error_log stderr;
access_log /tmp/heroku.nginx_access.<?=getenv('PORT')?:'8080'?>.log;

include <?=getenv('HEROKU_PHP_NGINX_CONFIG_INCLUDE')?>;
include "<?=getenv('HEROKU_PHP_NGINX_CONFIG_INCLUDE')?>";

# restrict access to hidden files, just in case
location ~ /\. {
Expand Down

0 comments on commit 7247160

Please sign in to comment.