Permalink
Browse files

Merge pull request #4 from badboy/patch-1

fix some typos
  • Loading branch information...
2 parents 10628d7 + f005121 commit 9c46c776e0f3374e0630b434eed6bc4ce396362b @atmos committed Oct 4, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/sinatra/auth/github.rb
@@ -79,7 +79,7 @@ def github_raw_request(path)
# Returns a parsed JSON response
#
# Examples
- # github_raw_request("/user")
+ # github_request("/user")
# # => { 'login' => 'atmos', ... }
def github_request(path)
JSON.parse(github_raw_request(path))
@@ -101,7 +101,7 @@ def github_public_organization_access?(name)
#
# name - the organization name
#
- # Returns: true if the uesr has access, false otherwise
+ # Returns: true if the user has access, false otherwise
def github_organization_access?(name)
orgs = github_request("orgs/#{name}/members")
orgs.map { |org| org["login"] }.include?(github_user.login)
@@ -113,7 +113,7 @@ def github_organization_access?(name)
#
# team_id - the team's id
#
- # Returns: true if the uesr has access, false otherwise
+ # Returns: true if the user has access, false otherwise
def github_team_access?(team_id)
members = github_request("teams/#{team_id}/members")
members.map { |user| user["login"] }.include?(github_user.login)

0 comments on commit 9c46c77

Please sign in to comment.