ey-provisioner 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ey-provisioner/request.rb +5 -0
- data/lib/ey-provisioner/version.rb +1 -1
- data/spec/request_spec.rb +1 -0
- metadata +1 -1
@@ -33,6 +33,11 @@ module Ey
|
|
33
33
|
@volume_size = arg.to_s
|
34
34
|
end
|
35
35
|
|
36
|
+
def instance_size=(size)
|
37
|
+
# Ensure symbols are converted to strings
|
38
|
+
@instance_size = size.to_s unless size.nil?
|
39
|
+
end
|
40
|
+
|
36
41
|
# A hash representation of the request
|
37
42
|
def to_hash
|
38
43
|
raise InvalidRequest.new(self) if !valid?
|
data/spec/request_spec.rb
CHANGED
@@ -10,6 +10,7 @@ describe Ey::Provisioner::Request do
|
|
10
10
|
Ey::Provisioner::Instance::TYPES.each do |instance_type|
|
11
11
|
it { should allow_value(instance_type).for(:instance_size) }
|
12
12
|
end
|
13
|
+
it { should allow_value(:medium_ram_64).for(:instance_size) }
|
13
14
|
it { should_not allow_value('another').for(:instance_size) }
|
14
15
|
it { should allow_value(nil).for(:instance_size) }
|
15
16
|
|