Class: Sem::CLI
- Inherits:
-
Dracula
show all
- Defined in:
- lib/sem/cli.rb
Defined Under Namespace
Classes: Orgs, Projects, SharedConfigs, Teams
Instance Method Summary
collapse
Instance Method Details
#login ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/sem/cli.rb', line 25
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 ⇒ Object
44
45
46
47
48
|
# File 'lib/sem/cli.rb', line 44
def logout
Sem::Configuration.delete_auth_token
puts "Logged out."
end
|
#version ⇒ Object
11
12
13
|
# File 'lib/sem/cli.rb', line 11
def version
puts Sem::VERSION
end
|