class Sem::CLI

Public Instance Methods

login() click to toggle source
# File lib/sem/cli.rb, line 26
def login
  auth_token = options["auth-token"]

  if Sem::Configuration.valid_auth_token?(auth_token)
    Sem::Configuration.export_auth_token(auth_token)

    puts "Your credentials have been saved to #{Sem::Configuration::CREDENTIALS_PATH}."
  else
    abort "[ERROR] Token is invalid!"
  end
end
logout() click to toggle source
# File lib/sem/cli.rb, line 45
def logout
  Sem::Configuration.delete_auth_token

  puts "Logged out."
end
version() click to toggle source
# File lib/sem/cli.rb, line 11
def version
  puts Sem::VERSION
end