spec/app.rb in warden-github-0.11.0 vs spec/app.rb in warden-github-0.12.0
- old
+ new
@@ -11,11 +11,11 @@
manager.failure_app = BadAuthentication
manager[:github_client_id] = ENV['GITHUB_CLIENT_ID'] || 'ee9aa24b64d82c21535a'
manager[:github_secret] = ENV['GITHUB_CLIENT_SECRET'] || 'ed8ff0c54067aefb808dab1ca265865405d08d6f'
- manager[:github_scopes] = ''
+ manager[:github_scopes] = 'repo'
manager[:github_oauth_domain] = ENV['GITHUB_OAUTH_DOMAIN'] || 'https://github.com'
manager[:github_callback_url] = '/auth/github/callback'
end
helpers do
@@ -32,12 +32,12 @@
get '/' do
ensure_authenticated
<<-EOS
<h2>Hello There, #{user.name}!</h2>
- <h3>Rails Org Member: #{user.organization_member?('rails')}.</h3>
- <h3>Publicized Rails Org Member: #{user.publicized_organization_member?('rails')}.</h3>
- <h3>Rails Committer Team Member: #{user.team_member?(632)}.</h3>
+ <h3>Rails Org Member: #{user.organization_member?('github')}.</h3>
+ <h3>Publicized Rails Org Member: #{user.publicized_organization_member?('github')}.</h3>
+ <h3>Rails Committer Team Member: #{user.team_member?(135235)}.</h3>
EOS
end
get '/redirect_to' do
ensure_authenticated