ddollar/foreman — pull request #364 by shokai (2013-05-21 17:14:49+00:00)
Title: launchd export - replace $PORT in program args

replace $PORT by `engine.port_for(process, num)` in ProgramArguments of Launchd export.

## problem

export launchd .plist file

% foreman export launchd ~/Library/LaunchAgents/ --app test-app --port 6100

`$PORT` in ProgramArguments will not be 6100 on Launchd.
It will be string "$PORT".

```xml
EnvironmentVariables

PORT
6100

ProgramArguments

bundle
exec
rackup
config.ru
-p
$PORT

```

## patch
replace $PORT with `engine.port_for(process, num)`

```xml
EnvironmentVariables

PORT
6100

ProgramArguments

bundle
exec
rackup
config.ru
-p
6100

```