Sha256: 2940b6d9ae6489d2b028612e3daca25bff736f6c1876a1e6db24b413f6dc2dcb
Contents?: true
Size: 866 Bytes
Versions: 2
Compression:
Stored size: 866 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::HOSTS_DIR}[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}" unless i.slug.nil? end say "\nSSH Keys:" cli.ssh_keys.all.each do |i| say " - #{i.fingerprint} => #{i.name}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
open-dock-0.0.12 | lib/open-dock/commands/list.rb |
open-dock-0.0.11 | lib/open-dock/commands/list.rb |