Sha256: 34460f697d8027e52f73977869419dfdad6d6db8bd54ce3d69fc92d20e01cb85

Contents?: true

Size: 510 Bytes

Versions: 14

Compression:

Stored size: 510 Bytes

Contents

module LearnTest
  class UsernameParser
    def self.get_username
      parser = LearnTest::NetrcInteractor.new
      username = parser.username
      user_id = parser.user_id

      if !LearnTest::LearnOauthTokenParser.get_learn_oauth_token && (!username || user_id == 'none')
        print "Enter your github username: "
        username = gets.strip
        user_id = LearnTest::GithubInteractor.get_user_id_for(username)
        parser.write(username, user_id)
      end

      username
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
learn-test-2.6.1 lib/learn_test/username_parser.rb
learn-test-2.6.0 lib/learn_test/username_parser.rb
learn-test-2.5.6 lib/learn_test/username_parser.rb
learn-test-2.5.5 lib/learn_test/username_parser.rb
learn-test-2.5.4 lib/learn_test/username_parser.rb
learn-test-2.5.3 lib/learn_test/username_parser.rb
learn-test-2.5.2 lib/learn_test/username_parser.rb
learn-test-2.5.1 lib/learn_test/username_parser.rb
learn-test-2.5.0 lib/learn_test/username_parser.rb
learn-test-2.5.0.rc2 lib/learn_test/username_parser.rb
learn-test-2.5.0.rc1 lib/learn_test/username_parser.rb
learn-test-2.4.2 lib/learn_test/username_parser.rb
learn-test-2.4.1 lib/learn_test/username_parser.rb
learn-test-2.4.0 lib/learn_test/username_parser.rb