Sha256: c2805803d71dc48be5250279769cbc688befeb63810e349f4b13e22a9ea61cf9
Contents?: true
Size: 848 Bytes
Versions: 4
Compression:
Stored size: 848 Bytes
Contents
command :list do |c| c.summary = 'List all droplet creation parameters' c.syntax = 'ops list' c.description = "This shows a list in the format '- [id] => [description]'. Use [id] values to create your host file in #{Ops::DIR}/hosts/[dns_name].yml " c.action do |args, options| cli = DigitalOcean::client say "\nDESCRIPTION: #{c.description}\n" say "\nSizes:" cli.sizes.all.each do |i| say " - #{i.slug.ljust(6)} => $#{i.price_monthly}/mo" end say "\nRegions:" cli.regions.all.each do |i| say " - #{i.slug.ljust(6)} => #{i.name}" end say "\nImages:" cli.images.all.each do |i| say " - #{i.slug.ljust(20)} => #{i.distribution} #{i.name}" end say "\nSSH Keys:" cli.ssh_keys.all.each do |i| say " - #{i.fingerprint} => #{i.name}" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
prun-ops-0.0.5 | lib/prun-ops/commands/list.rb |
prun-ops-0.0.4 | lib/prun-ops/commands/list.rb |
prun-ops-0.0.3 | lib/prun-ops/commands/list.rb |
prun-ops-0.0.2 | lib/prun-ops/commands/list.rb |