Class: Jirawatch::CLI::Login
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Jirawatch::CLI::Login
show all
- Includes:
- Jira::Provisioning
- Defined in:
- lib/jirawatch/cli/login.rb
Instance Method Summary
collapse
#login, #save_credentials
Instance Method Details
#call ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/jirawatch/cli/login.rb', line 8
def call(*)
puts "Enter your Jira URL (eg. https://veryimportantcompany.atlassian.net)"
site = STDIN.gets.chomp
puts "Enter your jira email/username: "
name = STDIN.gets.chomp
puts "Enter your API auth token: "
token = STDIN.gets.chomp
unless login name, token, site
puts "Login failed, no credentials have been saved"
return
end
save_credentials name, token, site
puts "Login successful, credentials have been saved"
end
|