Skip to content
Browse files

fixup token access

  • Loading branch information...
1 parent 30bb045 commit e240811524a6e80dc35758e6eb037ae1dce41b40 @atmos committed
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/warden-github/user.rb
  2. +1 −1 lib/warden-github/version.rb
View
6 lib/warden-github/user.rb
@@ -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
@@ -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
@@ -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
View
2 lib/warden-github/version.rb
@@ -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.
Something went wrong with that request. Please try again.