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
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/sem/cli.rb', line 20
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
33
34
35
36
37
|
# File 'lib/sem/cli.rb', line 33
def logout
Sem::Configuration.delete_auth_token
puts "Loged out."
end
|
#version ⇒ Object
11
12
13
|
# File 'lib/sem/cli.rb', line 11
def version
puts Sem::VERSION
end
|