From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.141.4.15 with SMTP id g15cs359734rvi; Thu, 8 Apr 2010 04:24:12 -0700 (PDT) Received-SPF: pass (google.com: domain of 3sry9SwgJCngYdekhkcuciWeh.YkinWYg-Zarahckkchacnkqlo.Yki@groups.bounces.google.com designates 10.91.56.20 as permitted sender) client-ip=10.91.56.20; Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3sry9SwgJCngYdekhkcuciWeh.YkinWYg-Zarahckkchacnkqlo.Yki@groups.bounces.google.com designates 10.91.56.20 as permitted sender) smtp.mail=3sry9SwgJCngYdekhkcuciWeh.YkinWYg-Zarahckkchacnkqlo.Yki@groups.bounces.google.com; dkim=pass header.i=3sry9SwgJCngYdekhkcuciWeh.YkinWYg-Zarahckkchacnkqlo.Yki@groups.bounces.google.com Received: from mr.google.com ([10.91.56.20]) by 10.91.56.20 with SMTP id i20mr94440agk.22.1270725846969 (num_hops = 1); Thu, 08 Apr 2010 04:24:06 -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=37sU41xJ6gSRxgA5i8H9nSENgFoYG7xLViHle9O3PQw=; b=WhfUF2+CS+htZ1cB43dC6jC8uxhFuxxn45fWoUxtp+5qjo4rznEohO2TzoQ6uFSVvY M6AYNMsKY5izIc6iKc8w441Kcx1ZJIPZnuEgw9IAM9wJT77pSmXGtXhpPfKg/rIXtXc/ rQZVvZtmd21uvs57MGyN7ixXZ3p9Vu0hJHMnI= 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=p/LFCm369I+k0U4yxRv98m3TT8HyoTLvyonWYPKseP9QI2tTMMMHpi7655kSziZtwy owQK4DWeLtuoYD4ryIQTGgM7NsERh7fX48Ly5YDpOhhfRX2+TmzHynoeNtl9Qn6Zd+R2 AweeFsnBVStVG41YQuafC5/YyEdeZ7PXB2VrY= Received: by 10.91.56.20 with SMTP id i20mr15876agk.22.1270725810728; Thu, 08 Apr 2010 04:23:30 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.204.6.87 with SMTP id 23ls2829508bky.0.p; Thu, 08 Apr 2010 04:23:28 -0700 (PDT) Received: by 10.204.127.4 with SMTP id e4mr531369bks.29.1270725808478; Thu, 08 Apr 2010 04:23:28 -0700 (PDT) Received: by 10.204.127.4 with SMTP id e4mr531365bks.29.1270725807542; Thu, 08 Apr 2010 04:23:27 -0700 (PDT) Return-Path: Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com [74.125.82.53]) by gmr-mx.google.com with ESMTP id h3si10466654bke.4.2010.04.08.04.23.26; Thu, 08 Apr 2010 04:23:26 -0700 (PDT) Received-SPF: pass (google.com: domain of chiology@gmail.com designates 74.125.82.53 as permitted sender) client-ip=74.125.82.53; Received: by wwb22 with SMTP id 22so48434wwb.26 for ; Thu, 08 Apr 2010 04:23:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.51.139 with HTTP; Thu, 8 Apr 2010 04:23:06 -0700 (PDT) In-Reply-To: <525E49F0-5E42-4040-8743-98D29A2DF781@gmail.com> References: <87hbnwr4pu.fsf@gmail.com> <20100401071650.GB30070@dcvr.yhbt.net> <35ED831D-F9B9-4D4C-A463-46CF62241EFE@gmail.com> <20100401211302.GA19563@dcvr.yhbt.net> <525E49F0-5E42-4040-8743-98D29A2DF781@gmail.com> From: Matt Todd Date: Thu, 8 Apr 2010 07:23:06 -0400 Received: by 10.216.187.211 with SMTP id y61mr1588wem.42.1270725806118; Thu, 08 Apr 2010 04:23:26 -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.53 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/85ef4e1aff880ff5 Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Oh man, you're right... how hadn't I seen that before? Anyways, that's interesting... not sure how I feel about it. Guess we can only carry a "pristine" idea so far before it gets cumbersome/difficult/bothersome. Matt On Thu, Apr 8, 2010 at 4:46 AM, James Tucker wrote: > > On 2 Apr 2010, at 05:03, Matt Todd wrote: > >> 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 wit= h >>>>> 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. =C2=A0Lint is special. =C2=A0It is important for development and s= hould be >>> easily toggleable between different environments. =C2=A0Heck, I wouldn'= t mind >>> a version that adds Lint between every part of the middleware stack, >>> even. =C2=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. =C2=A0I was not ha= ppy >>> with Rails inventing their own middleware configuration, either. > > I must point you at the Handler implementations in core, most of which at= tach one or two middlewares to every app before attaching them to the serve= r... > >> >> 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. >> >> >> -- >> Matt Todd >> Highgroove Studios >> www.highgroove.com >> cell: 404-314-2612 >> blog: maraby.org >> >> Scout - Web Monitoring and Reporting Software >> www.scoutapp.com >> >> >> -- >> To unsubscribe, reply using "remove me" as the subject. > > --=20 Matt Todd Highgroove Studios www.highgroove.com cell: 404-314-2612 blog: maraby.org Scout - Web Monitoring and Reporting Software www.scoutapp.com