rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* Rack::Utils::Context Question
@ 2012-06-15 23:13 Kendall Gifford
  0 siblings, 0 replies; only message in thread
From: Kendall Gifford @ 2012-06-15 23:13 UTC (permalink / raw)
  To: rack-devel

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

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 

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 

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).


[-- Attachment #2: Type: text/html, Size: 1639 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-15 23:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-15 23:13 Rack::Utils::Context Question Kendall Gifford

Code repositories for project(s) associated with this inbox:


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).