This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommandLineApp < BasicApp | |
def open_url(url) | |
if RUBY_PLATFORM =~ /darwin/ | |
`open #{url}` | |
elsif RUBY_PLATFORM =~ /linux/ && `which xdg-open` != "" | |
`xdg-open #{url}` | |
elsif RUBY_PLATFORM =~ /mswin|mingw|bccwin|wince|em/ | |
`start #{url}` | |
else | |
puts "Please open #{@authorize_url + request_token.token} in a web browser. " |
NewerOlder