praized/raad — Issue #8: bootstrap-less option
Author: bporterfield
Created: 2012-02-11 03:08:22+00:00
State: open

Hello! Thanks for this gem!

I have an existing Thor-based command-line interface that I want to have start|stop to daemonize, but also needs a variety of other CLI options. The way the Raad gem is currently set up with bootstrapping, it appears to assume that the only command-line options are start/stop. It also seems to makes assumptions based on the current filename for service initiation that, in my case, would not make sense.

I can hack what I need together with some ideas from this gem, but this is what I would have loved to see:

in bin/my_app:

require 'raad'
require 'thor'

class MyApp < Thor

default_task :start

desc "Start My App", "Starts App Server"
def start

daemonize = true

if daemonize
Raad::Runner.new('ruby path_to_my_service_starter.rb').daemonize
else
MyServiceStarter.run
end
end

desc "Some other option I need"
def my_option
end

end

Or something to this effect. Not really an issue, just a suggestion. Thanks again.