25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/cyclid/cli/user.rb', line 25
def show
user = client.user_get(client.config.username)
Formatter.colorize 'Username', user['username']
Formatter.colorize 'Name', (user['name'] || '')
Formatter.colorize 'Email', user['email']
Formatter.colorize 'Organizations'
if user['organizations'].any?
user['organizations'].each do |org|
Formatter.puts "\t#{org}"
end
else
Formatter.puts "\tNone"
end
rescue StandardError => ex
abort "Failed to get user: #{ex}"
end
|