Mark Fredrickson
2007-Mar-28 02:52 UTC
Pimpin'' a patch: moving the bin/camping logic to classes
Hello, Zimbatm suggested the best way to push a patch into camping was to take my case to the people. So here it is. If you want to jump straight to the patch: http://code.whytheluckystiff.net/camping/ticket/117 Goal: Move the logic in the camping command line launcher into several classes Why? In the next version of parasite (http://parasite.rubyforge.org) I''d like to take over several of the standard Rails script/* tools. For example, script/sever and script/console. Camping already supports launching different servers (including an IRB session), but the logic for that (including all the reloader goodness) is tied up the bin/camping script. The linked patch above splits that logic in one class per server type, each descending from a parent class that handles a lot of initialization and interfacing with Camping::Reloader other other libraries. With this patch, I can simply overwrite script/server and script/console with little Ruby scripts that call into the appropriate Camping classes. I think this patch will also help with adding the --daemonize functionality or in a environment where you might like to quickly create a bunch of camping servers from within a Ruby script (e.g. a shared hosting environment or similar). For most users, this change would cause no change in behavior and usage. But for people looking to do more with the creation of camping servers, this could be very helpful. I''m unclear on any next steps, but if you like the idea and/or the patch, please comment on the issue: http://code.whytheluckystiff.net/camping/ticket/117 We''ll see where it goes from here. Cheers, -Mark
why the lucky stiff
2007-Mar-28 03:09 UTC
Pimpin'' a patch: moving the bin/camping logic to classes
On Tue, Mar 27, 2007 at 09:52:49PM -0500, Mark Fredrickson wrote:> I''m unclear on any next steps, but if you like the idea and/or the > patch, please comment on the issue: > > http://code.whytheluckystiff.net/camping/ticket/117The next step is for me to accept it and I accept it. You can go ahead apply this to trunk yourself, if you like, Mark. Thanks a lot for doing this! _why