5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/tane/commands/signup.rb', line 5
def process(args)
warn_if_credentials
email, password = prompt_for_credentials
auth_token, errors = Tane::Helpers::Cloudfuji.signup(email, password)
if auth_token.nil?
term.say "Couldn't signup - "
errors.each do |field|
term.say "\n"
field.last.each do |error|
term.say " #{field.first} #{error} \n"
end
end
exit
else
term.say "Ok, you're signed up as #{email}!"
end
term.say "Done!"
term.say "Saving credentials"
save_credentials(email, auth_token)
end
|