From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.140.128.1 with SMTP id a1cs147311rvd; Thu, 1 Apr 2010 21:03:35 -0700 (PDT) Received-SPF: pass (google.com: domain of 3kmy1SwgJCgAchiologygmail.comrack-develgooglegroups.com@groups.bounces.google.com designates 10.91.49.16 as permitted sender) client-ip=10.91.49.16; Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3kmy1SwgJCgAchiologygmail.comrack-develgooglegroups.com@groups.bounces.google.com designates 10.91.49.16 as permitted sender) smtp.mail=3kmy1SwgJCgAchiologygmail.comrack-develgooglegroups.com@groups.bounces.google.com; dkim=pass header.i=3kmy1SwgJCgAchiologygmail.comrack-develgooglegroups.com@groups.bounces.google.com Received: from mr.google.com ([10.91.49.16]) by 10.91.49.16 with SMTP id b16mr2292952agk.8.1270181013563 (num_hops = 1); Thu, 01 Apr 2010 21:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:mime-version:received:in-reply-to :references:from:date:received:message-id:subject:to :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :x-thread-url:x-message-url:sender:list-subscribe:list-unsubscribe :content-type:content-transfer-encoding; bh=gJFb6HDoA2/XdS7q7iLlfrp9p43W7sBDw9+KLdovhVI=; b=SrcSX5Xi/MEiNLXO+N09Ncrp6ezmMgVS5nsaVR38zC2UodoXhrALouyrWyZuZCl2Tr MXmMmS46nhKBl66zbUImSsvy/pi0uIkF2ZroD7x9zsKct69OEVUKBm84XCvWqWbYqx7e ceib9XAUwDkIIftwRTrJmWi0VsEbamNzQPjR4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:from :date:message-id:subject:to:x-original-authentication-results :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:x-thread-url:x-message-url:sender :list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; b=bbVidSNjkP7qG2r8CTrO4Ynt8jKkpBsdys3DB7p+nHC4ir2FS7Vuxv6sePLHwNrk64 m+czctRKfunFquAlwj5yVY3nZ7p2IFyJTABNytYjNGkidPFb9YGq2GfpBtv1r5s7l7Uj g01GcRQsnjalXcMEwcSWssXqxmx+EXNfbGZmc= Received: by 10.91.49.16 with SMTP id b16mr271251agk.8.1270181011057; Thu, 01 Apr 2010 21:03:31 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.204.32.206 with SMTP id e14ls831647bkd.2.p; Thu, 01 Apr 2010 21:03:29 -0700 (PDT) Received: by 10.204.22.69 with SMTP id m5mr101300bkb.39.1270181009484; Thu, 01 Apr 2010 21:03:29 -0700 (PDT) Received: by 10.204.22.69 with SMTP id m5mr101299bkb.39.1270181009452; Thu, 01 Apr 2010 21:03:29 -0700 (PDT) Return-Path: Received: from mail-ww0-f43.google.com (mail-ww0-f43.google.com [74.125.82.43]) by gmr-mx.google.com with ESMTP id h3si2660732bke.4.2010.04.01.21.03.28; Thu, 01 Apr 2010 21:03:28 -0700 (PDT) Received-SPF: pass (google.com: domain of chiology@gmail.com designates 74.125.82.43 as permitted sender) client-ip=74.125.82.43; Received: by mail-ww0-f43.google.com with SMTP id 30so454133wwg.30 for ; Thu, 01 Apr 2010 21:03:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.29.16 with HTTP; Thu, 1 Apr 2010 21:03:08 -0700 (PDT) In-Reply-To: <20100401211302.GA19563@dcvr.yhbt.net> References: <87hbnwr4pu.fsf@gmail.com> <20100401071650.GB30070@dcvr.yhbt.net> <35ED831D-F9B9-4D4C-A463-46CF62241EFE@gmail.com> <20100401211302.GA19563@dcvr.yhbt.net> From: Matt Todd Date: Fri, 2 Apr 2010 00:03:08 -0400 Received: by 10.216.161.146 with SMTP id w18mr902689wek.100.1270181008120; Thu, 01 Apr 2010 21:03:28 -0700 (PDT) Message-ID: Subject: Re: ENV["RACK_ENV"] is not set on startup [rack/rack GH-11] To: rack-devel@googlegroups.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of chiology@gmail.com designates 74.125.82.43 as permitted sender) smtp.mail=chiology@gmail.com; dkim=pass (test mode) header.i=@gmail.com X-Original-Sender: chiology@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/838c8abdaae55bb8 X-Message-Url: http://groups.google.com/group/rack-devel/msg/28e8315d1a740500 Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Apr 1, 2010 at 5:13 PM, Eric Wong wrote: > James Tucker wrote: >> On 1 Apr 2010, at 09:21, Matt Todd wrote: >> > I'm not a fan of --env/:env in general, specifically taking issue with >> > implicitly modifying the middleware stack. >> > >> > Because of this, I'm actually quite happy with the fact that >> > ENV['RACK_ENV'] isn't set when --env/:env is set. >> > >> > I'd much rather this feature go away and let handling environments be >> > left up to the user. >> > >> > More specifically: >> > * --env/:env should default to "development" >> > * --env/:env should set ENV['RACK_ENV'] >> > * --end/:env should have no other affect >> > * applications/frameworks should adjust their environments according >> > to ENV['RACK_ENV'] as they see fit >> > >> > I'm aware that this is mostly done to ease development and lower the >> > barrier of entry, which I'm not opposed to doing, but I think there >> > are other, better ways we can explore such as a separate >> > feature/option, perhaps only in rackup, that can enable these >> > middleware. >> >> Rackup wants a logger mostly. I'm actually wondering if rackup wants a >> logger in all environments (not --envs) apart from CGI. We're never >> going to please everyone on this front, but maybe we need a way for >> rackup to turn off the default logger middleware separately to the >> --env setting. >> >> --env development also has one other significantly relevant action, >> and that is to add Rack::Lint to the middleware stack in order to >> validate conformance to http and rack specs. I feel this should stay, >> regardless of other changes. >> >> I propose then, that we modify the logger middleware setup to be >> affected by another argument, and that --env development adds >> Rack::Lint, any other --env does not modify the middleware stack at >> all. > > Yes. =A0Lint is special. =A0It is important for development and should be > easily toggleable between different environments. =A0Heck, I wouldn't min= d > a version that adds Lint between every part of the middleware stack, > even. =A0That would of course be a pain to configure by hand. Ah, yeah, I see the value of that. Maybe there's another solution besides Lint just being a middleware? Perhaps a Lintified response? Not saying the middleware is bad, just looking at our options. >> This should be compatible with Rails envs, and also satisfy Erics >> desires. We can also then deprecate the unusual "deployment" >> environment which seems to be unique to rack. > > I prefer Matt's approach to not do any middleware changes to go with > RACK_ENV (except Lint, above). > > Extra command-line options that try to do the same thing as editing > config.ru make things more confusing than necessary. =A0I was not happy > with Rails inventing their own middleware configuration, either. Agreed, agreed, and agreed. Lint is acceptable, but I think there shouldn't be any other side effects by setting the environment other than making sure ENV['RACK_ENV'] is set, imo. To be clear, I think that we are just making it easy for others to utilize this feature, but if it was taken out of Rack altogether, nothing should change but give frameworks a little more work. > If people want a request logger, they can configure Rack::CommonLogger, > Clogger or whatever else in config.ru. Agreed. --=20 Matt Todd Highgroove Studios www.highgroove.com cell: 404-314-2612 blog: maraby.org Scout - Web Monitoring and Reporting Software www.scoutapp.com --=20 To unsubscribe, reply using "remove me" as the subject.