Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Commit

Permalink
fixup token access
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Jun 4, 2012
1 parent 30bb045 commit e240811
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/warden-github/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get(path, params)
# params - extra params for calling the api
#
def post(path, params)
headers = {:Authorization => "token #{user.token}", :content_type => :json, :accept => :json}
headers = {:Authorization => "token #{token}", :content_type => :json, :accept => :json}
res = RestClient.post("#{github_api_uri}/#{path}", params.to_json, headers)
Yajl.load(res)
end
Expand All @@ -88,7 +88,7 @@ def post(path, params)
# params - extra params for calling the api
#
def put(path, params)
headers = {:Authorization => "token #{user.token}", :content_type => :json, :accept => :json}
headers = {:Authorization => "token #{token}", :content_type => :json, :accept => :json}
res = RestClient.put("#{github_api_uri}/#{path}", params.to_json, headers)
Yajl.load(res)
end
Expand All @@ -99,7 +99,7 @@ def put(path, params)
# params - extra params for calling the api
#
def delete(path, params)
headers = {:Authorization => "token #{user.token}", :content_type => :json, :accept => :json}
headers = {:Authorization => "token #{token}", :content_type => :json, :accept => :json}
res = RestClient.delete("#{github_api_uri}/#{path}", params.to_json, headers)
Yajl.load(res)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/warden-github/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Warden
module Github
VERSION = "0.6.0"
VERSION = "0.6.1"
end
end

0 comments on commit e240811

Please sign in to comment.