From b7f1f8afd4f79f6548d50e0aa49c339bceb612e1 Mon Sep 17 00:00:00 2001 From: mattjbones Date: Sat, 20 Oct 2018 09:10:54 +0100 Subject: [PATCH] Updating oauth_client.rb to allow username supplied by -u flag --- lib/twurl/oauth_client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/twurl/oauth_client.rb b/lib/twurl/oauth_client.rb index 773e333..1a3f803 100644 --- a/lib/twurl/oauth_client.rb +++ b/lib/twurl/oauth_client.rb @@ -11,7 +11,9 @@ def rcfile(reload = false) def load_from_options(options) if rcfile.has_oauth_profile_for_username_with_consumer_key?(options.username, options.consumer_key) load_client_for_username_and_consumer_key(options.username, options.consumer_key) - elsif options.username || (options.command == 'authorize') + elsif options.username + load_client_for_username(options.username) + elsif (options.command == 'authorize') load_new_client_from_options(options) else load_default_client