cucumber hating on our gigantic sessions

Il_430xn

so i'm working on retrofitting an older app with some tests, the authentication system is a piece of work with some users coming in from another site entirely.

and it works for the most part. but cucumber fucking hates it.

even though we are configured for storing our session data in the db we were getting errors like: CGI::Session::CookieStore::CookieOverflow (CGI::Session::CookieStore::CookieOverflow) 


for some reason story runner fails when more than 4k of session data is written by the controller. regardless of the chosen storage method.
http://rubyforge.org/pipermail/rspec-users/2008-October/009167.html

so i swallowed my pride, and in cucumber's env.rb file I patched CGI::Session thusly:



class CGI


  class Session


    def close


      begin


        @dbman.close


        @dbprot.clear


      rescue Exception => e


        puts e.inspect


      end


    end


  end


end


i would love suggestions on how else to tackle this, or at least where to report this as a bug, but I'm not even sure that the diagnosis is right in so far as blaming story runner.


but for the sake of getting on with things I need to keep this thing from barking at me. Everything appears to be working fine, data is coming back from the session. and jesus, is there plenty in there. but we ain't got time to fight that fight just now.

still stuck in my head, swallow_nil - @thoughtbot blog

I read this a week ago and it's stuck in my head, trying to balance upfront cost with fluid/emergent design.

Feels like a useful tool while hacking, that should be pulled out in a final round of refactoring.

I’ve been using this for about a year and a half.

Abomination or legitimate tool for the box?

Usage

two dots or more. nil anywhere in the chain is an acceptable response.

campaign = swallow_nil { supporter.politician.campaign }

Definition

def swallow_nil  yieldrescue NoMethodError  nilend

 

morality and religion as distinct processes

the stronger a person’s moral conviction, the less they trust the Supreme Court to make a judgment about [Assisted Suicide].  Conversely, the higher the degree of a person’s religiosity, the MORE they trust the Supreme Court to make a decision on this sensitive issue. 

Just to be clear about that — the results for moral conviction were exactly the opposite of those for religiosity.