mediapeers/authpet — pull request #2 by dbldots (2012-12-13 23:24:33+00:00)
Title: fix reset cache

resets Thread.current[:authpet_token] to `nil` instead of `false` because

cached? would return true if Thread.current[:authpet_token] was set to `false` before

see:

def self.cached?
Thread.current.keys.include?(:authpet_token)
end

BTW this problem wouldn't exist if you used

def self.cached?
Thread.current[:authpet_token]
end

instead..... ;)

P.S.

Thread.current.key?(:authpet_token) would be shorter :)