stack_master 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0290ee1dd10780abd86abcd6818ff3e4ad913380
|
4
|
+
data.tar.gz: 57dd36502a7e98b1940336f9f3a8aa3364a2a6bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e1bec9d3deefa251ba550f75fb7c43013efedafd0c5e37ccccc3eb65c2d26e367b6386ad370d3b4bea584c5fef1ac04306e15ea901c4595883c0502b10b943
|
7
|
+
data.tar.gz: c4f02a55dbd4ed0b82747ff3172ba023f99aff8445dcfd085eb91d6498ce9b491e6b41ef6cc05266a4d0ecc5ac7e07e8b757453d13199243997bc94de556242f
|
@@ -43,6 +43,7 @@ module StackMaster
|
|
43
43
|
|
44
44
|
def resolve_parameter_value(key, parameter_value)
|
45
45
|
return parameter_value.to_s if Numeric === parameter_value
|
46
|
+
return parameter_value.join(',') if Array === parameter_value
|
46
47
|
return parameter_value unless Hash === parameter_value
|
47
48
|
validate_parameter_value!(key, parameter_value)
|
48
49
|
|
data/lib/stack_master/version.rb
CHANGED
@@ -34,6 +34,10 @@ RSpec.describe StackMaster::ParameterResolver do
|
|
34
34
|
expect(resolve(param1: 2)).to eq(param1: '2')
|
35
35
|
end
|
36
36
|
|
37
|
+
it 'joins arrays into comma separated strings' do
|
38
|
+
expect(resolve(param1: [1, 2])).to eq(param1: '1,2')
|
39
|
+
end
|
40
|
+
|
37
41
|
it 'it throws an error when the hash contains more than one key' do
|
38
42
|
expect {
|
39
43
|
resolve(param: { nested1: 'value1', nested2: 'value2' })
|
@@ -12,7 +12,7 @@ RSpec.describe StackMaster::ParameterResolvers::SecurityGroups do
|
|
12
12
|
|
13
13
|
context 'when given a single SG name' do
|
14
14
|
it "resolves the security group" do
|
15
|
-
expect(resolver.resolve(sg_name)).to eq
|
15
|
+
expect(resolver.resolve(sg_name)).to eq sg_id
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -25,7 +25,7 @@ RSpec.describe StackMaster::ParameterResolvers::SecurityGroups do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
it "resolves the security groups" do
|
28
|
-
expect(resolver.resolve([sg_name, sg_name2])).to eq
|
28
|
+
expect(resolver.resolve([sg_name, sg_name2])).to eq "#{sg_id},#{sg_id2}"
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_master
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Hodgkiss
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|