Sha256: 47e11d3dfbce3bc8964d94392e4b3f15bc0dc28a5befbd2987fd01c31546e827
Contents?: true
Size: 982 Bytes
Versions: 20
Compression:
Stored size: 982 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require "poolparty" require "poolparty/installer" require 'git-style-binary/command' GitStyleBinary.command do banner <<-EOS Usage: #{$0} #{all_options_string} Sets up a basic clouds.rb file and carries through the steps to bootstrap a new cloud EOS short_desc "Setup a new clouds.rb file" providers = {} PoolParty::Installer.all.each_with_index do |installer,idx| providers.merge!(idx+1 => installer) end str = ["The cloud_provider you'd like to set your clouds.rb for. The available clouds include:"] PoolParty::Installer.all.each do |provider| str << "\t\t\t\t\t\t\t\t#{provider.name} - #{provider.description}" end opt :type, str.join("\n"), :type => :string, :default => "ec2" run do |command| klass = PoolParty::Installer.find_by_name(command[:type]) puts "Great, we'll be using #{klass}" inst = klass.send :new inst.run end end
Version data entries
20 entries across 20 versions & 3 rubygems