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: AS33070 50.56.128.0/17 X-Spam-Status: No, score=0.0 required=3.0 tests=MSGID_FROM_MTA_HEADER, TVD_RCVD_IP shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Lin Jen-Shin Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: [PATCH] Add -N or --no-default-middleware option. Date: Tue, 29 Jan 2013 12:06:00 +0800 Message-ID: <1359432360-23122-1-git-send-email-godfat@godfat.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359432863 8572 80.91.229.3 (29 Jan 2013 04:14:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2013 04:14:23 +0000 (UTC) Cc: Lin Jen-Shin To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Jan 29 05:14:42 2013 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Greylist: delayed 490 seconds by postgrey-1.31 at rubyforge; Tue, 29 Jan 2013 04:14:20 UTC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=godfat.org; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=qwLVyjbV1vYx9+aXKdNQJJUvQD+Hn99q2AyaSYRvgVI=; b=Appkbh//M0uXrT5DugXzEWNJ6DF43FlP//TzTE73q8QbSxMaTDn5qUdtwPPWUmllre v6QJwkYHvO3mS8yF61gqnWqG7mdF5DorjEzFgzG2vkmrpyxH4z2PLrXoPfTNPnbveEiz OF+MPnIS9s0IjSpcf7B7RkuYaM3OyqZKAwvR0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=qwLVyjbV1vYx9+aXKdNQJJUvQD+Hn99q2AyaSYRvgVI=; b=Nixn89cSb+yBBZcA0jLhA+iZz3MxzwLxomlRq/PqlnJD3F6pbwRhNOg48pFDiixEMV KheGFVG33ITmLUPnOOp6551ZFwr6vsjLnRcTMKhffbhzcKINUZ0F3ew6iDOJkQNbdRhZ h4LPTVG5rOIONuI5QzXVE44ewM6mXvgG52v7sRfLtkarCHzI4r++zdGfrkJoJJ3juiqh +czI6fWRt3kTYqjUbqeOMYWR3SZ62YoDxTyieakQ021qJarA5seU638XHkhdISAnNkxK v4QIhk00Rgg/2GDsoCqJ4iBDeOvP8dnXsKh7HZ0myhRhxgIOskty85vF2gXgF7JEdz5V LFow== X-Received: by 10.68.223.230 with SMTP id qx6mr159728pbc.159.1359432370056; Mon, 28 Jan 2013 20:06:10 -0800 (PST) X-Mailer: git-send-email 1.8.1.1 X-Gm-Message-State: ALoCoQkLM7Z/j3j67r9n7U9iaWAkPjtA6j3sKtwmjbtWOGdepGQRjbwNi3QXgEyHbhnKgyUDJnox X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:441 Archived-At: Received: from 50-56-192-79.static.cloud-ips.com ([50.56.192.79] helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U02ao-0006fc-Dv for gclrrg-rainbows-talk@m.gmane.org; Tue, 29 Jan 2013 05:14:42 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 9D6EA2E096; Tue, 29 Jan 2013 04:14:24 +0000 (UTC) Received: from mail-da0-f43.google.com (mail-da0-f43.google.com [209.85.210.43]) by rubyforge.org (Postfix) with ESMTP id 1158D2E096 for ; Tue, 29 Jan 2013 04:14:19 +0000 (UTC) Received: by mail-da0-f43.google.com with SMTP id u36so9522dak.16 for ; Mon, 28 Jan 2013 20:14:19 -0800 (PST) Received: from 220-135-160-129.hinet-ip.hinet.net (220-135-160-129.HINET-IP.hinet.net. [220.135.160.129]) by mx.google.com with ESMTPS id od3sm5846985pbb.6.2013.01.28.20.06.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Jan 2013 20:06:08 -0800 (PST) This would prevent Unicorn (Zbatery) from adding default middleware, as if RACK_ENV were always none. (not development nor deployment) This is implemented in Unicorn, so we only need to update the option parser here. Discussion thread on Unicorn mailing list: http://rubyforge.org/pipermail/mongrel-unicorn/2013-January/001675.html --- bin/zbatery | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/zbatery b/bin/zbatery index 99ca46e..392e5c3 100755 --- a/bin/zbatery +++ b/bin/zbatery @@ -59,6 +59,11 @@ opts = OptionParser.new("", 24, ' ') do |opts| ENV["RACK_ENV"] = e end + opts.on("-N", "--no-default-middleware", + "do not load middleware implied by RACK_ENV") do |e| + rackup_opts[:no_default_middleware] = true + end + opts.on("-D", "--daemonize", "run daemonized in the background") do |d| rackup_opts[:daemonize] = !!d end -- 1.8.1.1 _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying