ddollar/foreman — pull request #509 by lukaszkorecki (2014-12-23 19:35:34+00:00)
Title: When exporting upstart configs only relevant files should be deleted.

This fixes #491

It seems to work as expected now:

```
vagrant 🍭 0 🐧 foreman bugfix-upstart-config-deletion: bundle exec ./bin/foreman export -f procf2 --app test-app-worker upstart .
[foreman export] writing: test-app-worker.conf
[foreman export] writing: test-app-worker-worker.conf
[foreman export] writing: test-app-worker-worker-1.conf
vagrant 🍭 0 🐧 foreman bugfix-upstart-config-deletion: bundle exec ./bin/foreman export -f procf1 --app test-app upstart .
[foreman export] writing: test-app.conf
[foreman export] writing: test-app-web.conf
[foreman export] writing: test-app-web-1.conf
vagrant 🍭 0 🐧 foreman bugfix-upstart-config-deletion: ls *.conf
test-app.conf test-app-web-1.conf test-app-web.conf test-app-worker.conf test-app-worker-worker-1.conf test-app-worker-worker.conf
```

Of course if `procfile1` would have `worker:` entry then it would delete relevant files. I don't think there's a solution to this kind of situation, other than renaming the applications (which makes sense in my opinion).

Let me know what you think.