Sha256: 0145ba3fffee13d3478235abb871d805ccf1fcb819343b06f75b223a71e282cb
Contents?: true
Size: 725 Bytes
Versions: 5
Compression:
Stored size: 725 Bytes
Contents
#!/usr/bin/env ruby # encoding: utf-8 class AyaDN def ayadnAuthorize(action) $files.makedir($tools.ayadn_configuration[:authorization_path]) if action == "reset" $files.reset_credentials end auth_token = $files.auth_read if auth_token == nil url = @api.makeAuthorizeURL case $tools.ayadn_configuration[:platform] when $tools.winplatforms puts $status.launchAuthorization("win") when /linux/ puts $status.launchAuthorization("linux") else puts $status.launchAuthorization("osx") $tools.startBrowser(url) end auth_token = STDIN.gets.chomp() $files.auth_write(auth_token) puts $status.authorized sleep 3 puts $tools.helpScreen puts "Enjoy!\n".cyan end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ayadn-0.6.4 | lib/ayadn/authorize.rb |
ayadn-0.6.3 | lib/ayadn/authorize.rb |
ayadn-0.6.2 | lib/ayadn/authorize.rb |
ayadn-0.6.1 | lib/ayadn/authorize.rb |
ayadn-0.6.0 | lib/ayadn/authorize.rb |