Method: Client#authorize
- Defined in:
- lib/gripst/client.rb
#authorize ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/gripst/client.rb', line 40 def begin auth_token = client. :scopes => ['gists'], :note => 'gripst' rescue Octokit::OneTimePasswordRequired otp = get_otp auth_token = otp rescue Octokit:: puts '---' puts '---' puts '---' puts 'Username or password was incorrect' exit end write_auth_token auth_token auth_token end |