6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/package_cloud/cli/master_token.rb', line 6
def list(repo_name)
print "Looking for repository at #{repo_name}... "
repo = client.repository(repo_name)
print "success!\n"
tokens = repo.master_tokens
puts "Tokens for #{repo_name}:"
puts ""
tokens.each_with_index do |token, i|
puts " #{token.name} (#{token.value})"
puts " read tokens:"
token.read_tokens.each do |read_token|
puts " { id: #{read_token.id}, name: #{read_token.name}, value: #{read_token.value} }"
puts
end
puts "" unless i == tokens.length - 1
end
end
|