From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?TGluIEplbi1TaGluIChha2EgZ29kZmF0IOecn+W4uCk=?= Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: About Unicorn Rack handler Date: Wed, 4 Nov 2009 20:37:16 +0800 Message-ID: <56e58d960911040437g12cb6291rb19c2fe21cae834@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1257338250 30701 80.91.229.12 (4 Nov 2009 12:37:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Nov 2009 12:37:30 +0000 (UTC) Cc: =?UTF-8?B?Z29kZmF0IOecn+W4uA==?= To: mongrel-unicorn@rubyforge.org Original-X-From: mongrel-unicorn-bounces@rubyforge.org Wed Nov 04 13:37:23 2009 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:130 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1N5f74-0007D0-Hv for gclrug-mongrel-unicorn@m.gmane.org; Wed, 04 Nov 2009 13:37:22 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id BA2EE18582CB; Wed, 4 Nov 2009 07:37:21 -0500 (EST) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by rubyforge.org (Postfix) with ESMTP id C173F18582C1 for ; Wed, 4 Nov 2009 07:37:16 -0500 (EST) Received: by qw-out-2122.google.com with SMTP id 9so1303460qwb.29 for ; Wed, 04 Nov 2009 04:37:16 -0800 (PST) Received: by 10.224.108.16 with SMTP id d16mr722316qap.23.1257338236164; Wed, 04 Nov 2009 04:37:16 -0800 (PST) Hi, 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): http://github.com/godfat/innate/commit/9d607f41fdeeca366a9a07155e685ae2605c7025 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? http://github.com/rack/rack/tree/master/lib/rack/handler I'm looking forward to your opinion, many thanks! cheers,