From 3affee9bc0d714c8d6c7bfe4f770cadd98d99876 Mon Sep 17 00:00:00 2001 From: Robert Kaplow Date: Tue, 2 Aug 2011 16:26:51 -0400 Subject: [PATCH] patch --- examples/prediction/prediction.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/prediction/prediction.rb b/examples/prediction/prediction.rb index 5520f6e66..7eebc295d 100644 --- a/examples/prediction/prediction.rb +++ b/examples/prediction/prediction.rb @@ -6,7 +6,7 @@ # Original Author:: Bob Aman, Winton Davies, Robert Kaplow # Maintainer:: Robert Kaplow (mailto:rkaplow@google.com) -$:.unshift('lib') +$LOAD_PATH:.unshift File.dirname('lib') require 'rubygems' require 'sinatra' require 'datamapper' @@ -61,7 +61,7 @@ before do @client.authorization.redirect_uri = to('/oauth2callback') # Workaround for now as expires_in may be nil, but when converted to int it becomes 0. - @client.authorization.expires_in = Time.now + 1800 if @client.authorization.expires_in.to_i == 0 + @client.authorization.expires_in = 1800 if @client.authorization.expires_in.to_i == 0 if session[:token_id] # Load the access token here if it's available