From 510c42069c06cc3e253505711ab312fb343d503b Mon Sep 17 00:00:00 2001 From: "Michael E. Gruen" Date: Thu, 15 Sep 2011 01:04:13 -0400 Subject: [PATCH] fixed method header --- oa-oauth/lib/omniauth/strategies/oauth/goodreads.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oa-oauth/lib/omniauth/strategies/oauth/goodreads.rb b/oa-oauth/lib/omniauth/strategies/oauth/goodreads.rb index 651faed..db689d9 100644 --- a/oa-oauth/lib/omniauth/strategies/oauth/goodreads.rb +++ b/oa-oauth/lib/omniauth/strategies/oauth/goodreads.rb @@ -13,7 +13,7 @@ module OmniAuth end def auth_hash - hash = user_info + hash = user_info(@access_token) OmniAuth::Utils.deep_merge( super, { @@ -23,10 +23,10 @@ module OmniAuth ) end - def user_info - authenticated_user = MultiXml.parse(@access_token.get('/api/auth_user').body) + def user_info(access_token) + authenticated_user = MultiXml.parse(access_token.get('/api/auth_user').body) id = authenticated_user['GoodreadsResponse']['user']['id'].to_i - response_doc = MultiXml.parse(@access_token.get("/user/show/#{id}.xml?key=#{@consumer_key}").body) + response_doc = MultiXml.parse(access_token.get("/user/show/#{id}.xml?key=#{@consumer_key}").body) user = response_doc['GoodreadsResponse']['user'] hash = {