nickstenning/honcho — pull request #11 by flashingpumpkin (2012-10-27 14:42:51+00:00)
Title: Added export functionality

Hi tharr

I needed export functionality and didn't want to rely on `foreman` for it so I added it to `honcho`. For now it's only supporting `upstart`, but others can be added trivially, see `honcho.export.upstart.Export`.

Notes:

* I've had to add a `jinja2` dependency. I hoped to use string formatting only, but alas I required loops. I'm happy to use any other templating library (maybe one that does not require compilation, ie keep gcc / python-dev out of servers)

* There are currently no tests. I wasn't sure about how to go about it and how you'd prefer it. I thought about adding integration tests but decided to ask here first. (It requires write access to the file system, for one)

* The API is not final, I'm happy to hear your feedback and change it. Considering the tests, the current API might be awkward to test.

* The export options are currently defined in `honcho.command.EXPORT_CHOICES`. It would make sense to replace register those automatically with a metaclass when subclassing `honcho.export.base.BaseExport`.

Let me know what you think