From 9247d229dc94b52ffd0270e6f0f61a9727b64829 Mon Sep 17 00:00:00 2001 From: wills blake Date: Tue, 17 Aug 2021 15:44:33 -0700 Subject: [PATCH] Fixed location of OAuth link. Removed instance member github_username from CLI, no longer needed. --- lib/learn_config/cli.rb | 7 +------ lib/learn_config/setup.rb | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/learn_config/cli.rb b/lib/learn_config/cli.rb index e6a706d..cbed59a 100644 --- a/lib/learn_config/cli.rb +++ b/lib/learn_config/cli.rb @@ -1,18 +1,13 @@ module LearnConfig class CLI - attr_reader :github_username attr_accessor :token - def initialize(github_username) - @github_username = github_username - end - def ask_for_oauth_token(short_text: false, retries_remaining: 5) if !short_text puts <<-LONG To connect with the Learn web application, you will need to configure the Learn gem with an OAuth token. You can find yours at the bottom of your profile -page at: https://learn.co/#{github_username ? github_username : 'your-github-username'}. +page at: https://base.flatironschool.com/account/manage. LONG diff --git a/lib/learn_config/setup.rb b/lib/learn_config/setup.rb index c461058..8c4b731 100644 --- a/lib/learn_config/setup.rb +++ b/lib/learn_config/setup.rb @@ -217,8 +217,7 @@ def setup_learn_config_machine login, password = netrc.read if (!login || !password) || !LearnWeb::Client.new(token: password, silent_output: true).valid_token? - github_username, _uid = netrc.read(machine: 'flatiron-push') - oauth_token = LearnConfig::CLI.new(github_username).ask_for_oauth_token + oauth_token = LearnConfig::CLI.new.ask_for_oauth_token netrc.write(new_login: 'learn', new_password: oauth_token) end end