Attempting to fix some Windows issues and update deprecated library calls.
This commit is contained in:
parent
38e54b7d49
commit
55e101c365
|
@ -294,13 +294,12 @@ HTML
|
|||
exit(0)
|
||||
else
|
||||
$verifier = nil
|
||||
# TODO(bobaman): Cross-platform?
|
||||
logger = WEBrick::Log.new('/dev/null')
|
||||
server = WEBrick::HTTPServer.new(
|
||||
:Port => OAUTH_SERVER_PORT,
|
||||
:Logger => logger,
|
||||
:AccessLog => logger
|
||||
:Logger => WEBrick::Log.new,
|
||||
:AccessLog => WEBrick::Log.new
|
||||
)
|
||||
server.logger.level = 0
|
||||
trap("INT") { server.shutdown }
|
||||
|
||||
server.mount("/", OAuthVerifierServlet)
|
||||
|
@ -389,7 +388,7 @@ HTML
|
|||
)
|
||||
|
||||
# Launch browser
|
||||
Launchy::Browser.run(oauth_client.authorization_uri.to_s)
|
||||
Launchy.open(oauth_client.authorization_uri.to_s)
|
||||
|
||||
server.start
|
||||
oauth_client.code = $verifier
|
||||
|
|
|
@ -5,7 +5,7 @@ module Google
|
|||
# TODO(bobaman)
|
||||
# Confirm that all of these Windows environments actually have access
|
||||
# to the `ver` command.
|
||||
`ver`.sub(/\s*\[Version\s*/, '/').sub(']', '')
|
||||
`ver`.sub(/\s*\[Version\s*/, '/').sub(']', '').strip
|
||||
elsif RUBY_PLATFORM =~ /darwin/i
|
||||
"Mac OS X/#{`sw_vers -productVersion`}"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue