Is it possible to read session data from Camping::Session in a middleware?

2012-01-02 Thread Daniel Bryan
I'm trying to implement some simple middleware that will have behaviour based on session data. From looking at the source for Camping::Session and Rack::Session, I thought I'd just be able to put my own middleware between Camping::Session and my app. I tried doing it the same way that

Re: Is it possible to read session data from Camping::Session in a middleware?

2012-01-02 Thread Jenna Fox
If you look in to the Rack docs, you'll find more info on how to chain middleware together. Camping provides some friendly shortcuts to that, but 'including a module' is not how that's supposed to work, is my understanding. Essentially Rack middleware work by creating an object which responds

Re: Is it possible to read session data from Camping::Session in a middleware?

2012-01-02 Thread Daniel Bryan
Ah, thanks. I thought that the order of calling 'use' would explicitly describe the order. This was my main problem - since Camping's doing a bit of a hack to neatly slot the middleware in without people needing a rackup file or whatever, it's a bit unclear on how to get stuff in the right