Rainbows! Rack HTTP server user/dev discussion
 help / Atom feed
* [PATCH] Add -N or --no-default-middleware option.
@ 2013-01-29  3:44 Lin Jen-Shin
  0 siblings, 0 replies; 3+ messages in thread
From: Lin Jen-Shin @ 2013-01-29  3:44 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw; +Cc: Lin Jen-Shin

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

_______________________________________________
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Add -N or --no-default-middleware option.
@ 2013-01-29  4:06 Lin Jen-Shin
       [not found] ` <1359432360-23122-1-git-send-email-godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Lin Jen-Shin @ 2013-01-29  4:06 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw; +Cc: Lin Jen-Shin

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add -N or --no-default-middleware option.
       [not found] ` <1359432360-23122-1-git-send-email-godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org>
@ 2013-01-29  4:49   ` Eric Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2013-01-29  4:49 UTC (permalink / raw)
  To: Rainbows! list; +Cc: Lin Jen-Shin

Thanks, both applied and pushed (they're no-ops until unicorn 4.6.0,
though).
_______________________________________________
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-29  3:44 [PATCH] Add -N or --no-default-middleware option Lin Jen-Shin
2013-01-29  4:06 Lin Jen-Shin
     [not found] ` <1359432360-23122-1-git-send-email-godfat-hOE/xeEBYYIdnm+yROfE0A@public.gmane.org>
2013-01-29  4:49   ` Eric Wong

Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror https://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox