[PATCH] Add -N or --no-default-middleware option.
Lin Jen-Shin
godfat at godfat.org
Tue Jan 29 03:44:06 UTC 2013
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
---
bin/rainbows | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bin/rainbows b/bin/rainbows
index 878b3f2..4d6a5d6 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",
+ "no default middleware even if RACK_ENV is development") 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
More information about the rainbows-talk
mailing list