About Unicorn Rack handler

Lin Jen-Shin (aka godfat 真常) godfat at godfat.org
Wed Nov 4 07:37:16 EST 2009


A couple days ago, I was trying to run Unicorn for Ramaze,
and found that `Unicorn.run' didn't share the same interface
with other Rack handlers, i.e. `options[:Host]' and `options[:Port]'

Because of this, I can't just use:

  Rack::Handler.register('unicorn', 'Unicorn')

And invoke this:

  Ramaze.start(:adapter => 'unicorn', :port => 8080)

To address this, I added a simple wrapper in
Innate (which is the core of Ramaze):


In short, simply hack the config to:

  {:listeners => ["#{config[:Host]}:#{config[:Port]}"]}

Should we adapt to this interface in Unicorn::Configurator,
or provide an additional Rack handle to adapt to this,
or maintain this Rack handler in Rack repository, just like the others?

I'm looking forward to your opinion, many thanks!

More information about the mongrel-unicorn mailing list