6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/package_cloud/cli/distro.rb', line 6
def list(package_type)
distros = client.distributions[package_type]
if distros
puts "Listing distributions for #{package_type}:"
distros.each do |distro|
puts "\n #{distro["display_name"]} (#{distro["index_name"]}):\n\n"
distro["versions"].each do |ver|
puts " #{ver["display_name"]} (#{ver["index_name"]})"
end
end
puts "\nIf you don't see your distribution or version here, email us at [email protected]."
else
puts "No distributions exist for #{package_type}.".red
puts "That either means that we don't support #{package_type} or that it doesn't require a distribution/version."
exit(1)
end
end
|