lib/ami_spec.rb in ami_spec-1.1.0 vs lib/ami_spec.rb in ami_spec-1.2.0

- old
+ new

@@ -2,11 +2,11 @@ require 'ami_spec/aws_instance_options' require 'ami_spec/server_spec' require 'ami_spec/server_spec_options' require 'ami_spec/wait_for_ssh' require 'ami_spec/wait_for_rc' -require 'trollop' +require 'optimist' module AmiSpec class InstanceConnectionTimeout < StandardError; end # == Parameters: # amis:: @@ -81,11 +81,11 @@ end private_class_method :stop_instances def self.invoke - options = Trollop::options do + options = Optimist::options do opt :role, "The role to test, this should map to a directory in the spec folder", type: :string opt :ami, "The ami ID to run tests against", type: :string opt :role_ami_file, "A file containing comma separated roles and amis. i.e.\nweb_server,ami-id.", type: :string opt :specs, "The directory to find ServerSpecs", type: :string, required: true @@ -94,10 +94,10 @@ opt :key_file, "The SSH private key file associated to the key_name", type: :string, required: true opt :ssh_user, "The user to ssh to the instance as", type: :string, required: true opt :aws_region, "The AWS region, defaults to AWS_DEFAULT_REGION environment variable", type: :string opt :aws_instance_type, "The ec2 instance type, defaults to t2.micro", type: :string, default: 't2.micro' opt :aws_security_groups, "Security groups to associate to the launched instances. May be specified multiple times", - type: :strings, default: nil + type: :string, default: nil, multi: true opt :aws_public_ip, "Launch instances with a public IP" opt :ssh_retries, "The number of times we should try sshing to the ec2 instance before giving up. Defaults to 30", type: :int, default: 30 opt :tags, "Additional tags to add to launched instances in the form of comma separated key=value pairs. i.e. Name=AmiSpec", type: :string, default: "" opt :debug, "Don't terminate instances on exit"