From: Kendall Gifford <zettabyte@gmail.com>
To: rack-devel@googlegroups.com
Subject: Rack::Utils::Context Question
Date: Fri, 15 Jun 2012 16:13:32 -0700 (PDT) [thread overview]
Message-ID: <acab38a1-a78a-4db7-976d-db86a9285028@googlegroups.com> (raw)
[-- 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
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.
[-- Attachment #2: Type: text/html, Size: 1639 bytes --]
reply other threads:[~2012-06-15 23:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acab38a1-a78a-4db7-976d-db86a9285028@googlegroups.com \
--to=rack-devel@googlegroups.com \
/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.
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).