From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.81.66 with SMTP id w2csp40070qck; Fri, 15 Jun 2012 16:22:54 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCIrVqYqRGxDNh-_-BBoExcWDGQ@googlegroups.com designates 10.50.182.134 as permitted sender) client-ip=10.50.182.134; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCIrVqYqRGxDNh-_-BBoExcWDGQ@googlegroups.com designates 10.50.182.134 as permitted sender) smtp.mail=rack-devel+bncCIrVqYqRGxDNh-_-BBoExcWDGQ@googlegroups.com; dkim=pass header.i=rack-devel+bncCIrVqYqRGxDNh-_-BBoExcWDGQ@googlegroups.com Received: from mr.google.com ([10.50.182.134]) by 10.50.182.134 with SMTP id ee6mr953630igc.5.1339802573664 (num_hops = 1); Fri, 15 Jun 2012 16:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=b+PECAPi/i1uS6qwMaEZ929SBqctMtkyAYU6/i0LRpo=; b=06OkP1nPdXkxlU4ED1xuqyhHuoR3ZZz8ABtcQbH0fstQT0+32LwEP+SEchQEZKJe9w kzSjxbidlXmceXscBqekYzt6CCD6qRQVR/5llOqDiH3W2ckPy6/lwjCU50K6HLFLYty7 NSyCvKzdNjPmnMuhcIZIqmNilh/VyZry9MaJ0= Received: by 10.50.182.134 with SMTP id ee6mr169020igc.5.1339802573574; Fri, 15 Jun 2012 16:22:53 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.50.42.165 with SMTP id p5ls1168525igl.1.canary; Fri, 15 Jun 2012 16:22:52 -0700 (PDT) Received: by 10.50.158.230 with SMTP id wx6mr3444981igb.0.1339802572893; Fri, 15 Jun 2012 16:22:52 -0700 (PDT) Received: by 10.50.82.3 with SMTP id e3msigy; Fri, 15 Jun 2012 16:13:34 -0700 (PDT) Received: by 10.68.216.163 with SMTP id or3mr233339pbc.1.1339802013752; Fri, 15 Jun 2012 16:13:33 -0700 (PDT) Date: Fri, 15 Jun 2012 16:13:32 -0700 (PDT) From: Kendall Gifford To: rack-devel@googlegroups.com Message-Id: Subject: Rack::Utils::Context Question MIME-Version: 1.0 X-Original-Sender: zettabyte@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: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: multipart/alternative; boundary="----=_Part_2710_6907170.1339802012589" ------=_Part_2710_6907170.1339802012589 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello, I know this list is geared toward rack development, but I couldn't see any kind of non "devel" rack mailing list referenced anywhere. So, I'm reading the rack source and I'm really trying to understand the purpose of the Rack::Utils::Context class/protocol? I notice that some classes (i.e. Rack::Session::Abstract::ID) claim to be "Rack::Utils::Context" compatible, this meaning they define a #context method according to the protocol: method takes an "env" parameter and an "app" parameter (though the Rack::Session::Abstract::ID#context's app parameter is optional, defaulting to the middleware's already-referenced app). So, reading the code I get a sense of what you might be able to do with a Rack::Utils::Context located in a stack, but I'm specifically wondering what the design goals are and what the official purposes and use-cases of this class are. Is there anyone willing to give me a brief description and possibly a brief pseudo-code example? I'm specifically curious if there's any intent for other users to inherit from Rack::Utils::Context (becoming "Rack::Utils::Context" compatible) or if the intent is for the Context to simply be used directly in a middleware stack, referencing the "compatible" middleware (@for) and application (@app)? Is it solely to facilitate testing (I noticed it looks like it's used heavily in some of the tests), or is/was there intent it'd be used as part of a production rack app's stack? I'd sure appreciate any explanations or help. Sorry if this isn't the proper place to ask this kind of question (let me know if this is the case). Thanks. ------=_Part_2710_6907170.1339802012589 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I know this list is geared toward rack development, but I couldn't s= ee any kind of non "devel" rack mailing list referenced anywhere.

So= , I'm reading the rack source and I'm really trying to understand the purpo= se of the Rack::Utils::Context class/protocol?

I notice that some cl= asses (i.e. Rack::Session::Abstract::ID) claim to be "Rack::Utils::Context"= compatible, this meaning they define a #context method according to the pr= otocol: method takes an "env" parameter and an "app" parameter (though the = Rack::Session::Abstract::ID#context's app parameter is optional, defaulting= to the middleware's already-referenced app).

So, reading the code I= get a sense of what you might be able to do with a Rack::Utils::Context lo= cated in a stack, but I'm specifically wondering what the design goals are = and what the official purposes and use-cases of this class are. Is there an= yone willing to give me a brief description and possibly a brief pseudo-cod= e example? I'm specifically curious if there's any intent for other users t= o inherit from Rack::Utils::Context (becoming "Rack::Utils::Context" compat= ible) or if the intent is for the Context to simply be used directly in a m= iddleware stack, referencing the "compatible" middleware (@for) and applica= tion (@app)? Is it solely to facilitate testing (I noticed it looks like it= 's used heavily in some of the tests), or is/was there intent it'd be used = as part of a production rack app's stack?

I'd sure appreciate any ex= planations or help. Sorry if this isn't the proper place to ask this kind o= f question (let me know if this is the case).

Thanks.
------=_Part_2710_6907170.1339802012589--