From a552fb90230eb65c28897398c7786dc9a13446ca Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 29 Jan 2013 11:44:06 +0800 Subject: Add -N or --no-default-middleware option. This would prevent Unicorn (Rainbows) 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 Signed-off-by: Eric Wong --- bin/rainbows | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/rainbows b/bin/rainbows index 878b3f2..f5ddaa7 100644 --- a/bin/rainbows +++ b/bin/rainbows @@ -59,6 +59,11 @@ op = 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 -- cgit v1.2.3-24-ge0c7