From: Eric Wong <e@80x24.org>
To: Jeremy Evans <code@jeremyevans.net>
Cc: unicorn-public@bogomips.org
Subject: Re: Support default_middleware configurator method
Date: Thu, 13 Sep 2018 22:34:07 +0000 [thread overview]
Message-ID: <20180913223407.GA44494@ailurophile> (raw)
In-Reply-To: <20180913192055.GD48926@jeremyevans.local>
Jeremy Evans <code@jeremyevans.net> wrote:
> I was originally looking for a way to turn off default middleware
> without having to specify the -N command line option every time.
> After reading the Unicorn.builder code, I thought it may be
> possible to do this by specifying the option as an embedded option
> in the rackup file, via the following line at the top of the file:
>
> #\-N
>
> Unfortunately, while this works for many other command line options,
> because of Unicorn's internals, this doesn't work for -N, as
> embedded options are not parsed until after the check for skipping
> default middleware is made.
That was intentional, I think. We should never be encouraging
users to pollute config.ru and make it difficult to migrate/test
other servers.
> This patch makes the embedded -N option work, as well as adds a
> default_middleware configuration file option
I really hate the -N vs RACK_ENV=none redundancy... Is -N still
needed for Rails or something else while keeping RACK_ENV unset?
Worse case is we only support default_middleware as a config
option (but I prefer not to add more options). Embedded -N support
is an anti-feature which leads to lock-in.
Thanks.
next prev parent reply other threads:[~2018-09-13 22:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 19:20 Support default_middleware configurator method Jeremy Evans
2018-09-13 22:34 ` Eric Wong [this message]
2018-09-14 0:00 ` Jeremy Evans
2018-09-14 10:56 ` Eric Wong
2018-09-14 15:03 ` Jeremy Evans
2018-09-19 7:39 ` Eric Wong
2018-09-21 0:21 ` Jeremy Evans
2018-09-23 8:52 ` Eric Wong
2018-09-21 0:34 ` [PATCH 2/1] tests: ensure -N/--no-default-middleware not supported in config.ru Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180913223407.GA44494@ailurophile \
--to=e@80x24.org \
--cc=code@jeremyevans.net \
--cc=unicorn-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).