northworld/google_calendar — pull request #6 by sbounmy (2011-11-10 20:04:22+00:00)
Title: Google::Calendar#reload to explicitly create new connection to google calendar

added #reload method to Google::Calendar.

class User
def calendar
@calendar ||= Google::Calendar.new :username => "foo@gmail.com", :password => "bar"
end
end

user = User.new
2.times { user.calendar } #only one HTTP authentication request to google
user.calendar.reload #new HTTP authentication request to google

removed trailing whitespace in test and fix test alignment