Skip to content
This repository was archived by the owner on Jan 20, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ GEM
remote: http://rubygems.org/
specs:
mocha (0.9.9)
rake
rake (0.8.7)
rake (0.9.2.2)
rcov (0.9.9)
test-spec (0.10.0)
test-unit (2.1.2)
xml-simple (1.0.12)
yard (0.6.2)
yard (0.8.2.1)

PLATFORMS
ruby

DEPENDENCIES
amazon-ec2!
mocha (>= 0.9.9)
rake (>= 0.8.7)
rcov (>= 0.9.9)
test-spec (>= 0.10.0)
test-unit (>= 2.1.2)
Expand Down
1 change: 1 addition & 0 deletions amazon-ec2.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('test-unit', '>= 2.1.2')
s.add_development_dependency('test-spec', '>= 0.10.0')
s.add_development_dependency('rcov', '>= 0.9.9')
s.add_development_dependency('rake', '>= 0.8.7')
# s.add_development_dependency('perftools.rb', '>= 0.5.4')
s.add_development_dependency('yard', '>= 0.6.2')

Expand Down
2 changes: 1 addition & 1 deletion lib/AWS/EC2/instances.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def run_instances( options = {} )
raise ArgumentError, ":image_id must be provided" if options[:image_id].nil? || options[:image_id].empty?
raise ArgumentError, ":min_count is not valid" unless options[:min_count].to_i > 0
raise ArgumentError, ":max_count is not valid or must be >= :min_count" unless options[:max_count].to_i > 0 && options[:max_count].to_i >= options[:min_count].to_i
raise ArgumentError, ":instance_type must specify a valid instance type" unless options[:instance_type].nil? || ["t1.micro", "m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge", "cc1.4xlarge"].include?(options[:instance_type])
raise ArgumentError, ":instance_type must specify a valid instance type" unless options[:instance_type].nil? || ["t1.micro", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m2.xlarge", "c1.medium", "c1.xlarge", "m2.2xlarge", "m2.4xlarge", "cc1.4xlarge"].include?(options[:instance_type])
raise ArgumentError, ":monitoring_enabled must be 'true' or 'false'" unless options[:monitoring_enabled].nil? || [true, false].include?(options[:monitoring_enabled])
raise ArgumentError, ":disable_api_termination must be 'true' or 'false'" unless options[:disable_api_termination].nil? || [true, false].include?(options[:disable_api_termination])
raise ArgumentError, ":instance_initiated_shutdown_behavior must be 'stop' or 'terminate'" unless options[:instance_initiated_shutdown_behavior].nil? || ["stop", "terminate"].include?(options[:instance_initiated_shutdown_behavior])
Expand Down