exe/conoha in conoha-0.0.11 vs exe/conoha in conoha-0.1.0

- old
+ new

@@ -29,10 +29,12 @@ x[1] end end case subcommand +when 'version', '--version', '-v' + puts ConohaVersion::ITSELF when 'authenticate' Conoha.authenticate! puts 'Succeeded!' when 'vpslist' pp Conoha.vps_list @@ -58,13 +60,13 @@ puts Conoha.create_image server_id(ARGV[0]), name when 'imagedelete' exit 1 if ARGV.size != 1 image_ref = image_ref_or_name ARGV.first puts Conoha.delete_image image_ref -when 'createfromimage' - exit 1 if ARGV.size != 2 +when 'createfromimage', 'restore' + exit 1 if ARGV.size < 1 image_ref = image_ref_or_name ARGV[0] - ram = ARGV[1] + ram = ARGV[1] || 'g-1gb' puts Conoha.create_from_image image_ref, ram when 'ssh' exit 1 if ARGV.size < 1 || 2 < ARGV.size ipaddress = ipv4(Conoha.ip_address_of(server_id(ARGV.first))) user = ARGV[1].nil? ? '' : "#{ARGV[1]}@"