Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix some typos #4

Merged
merged 1 commit into from

2 participants

@badboy

Read through the source and found some typos.

@atmos atmos merged commit 9c46c77 into atmos:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 22, 2011
  1. @badboy

    fix some typos

    badboy authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/sinatra/auth/github.rb
View
6 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)
Something went wrong with that request. Please try again.