stacker 0.2.1 → 0.3.0

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: c46dfb1b9a534269e863ebed6351f19c8acea3c4
4
- data.tar.gz: da313cc80ee96db3d628b9bd2f528bf895f0c77f
3
+ metadata.gz: 76f9e76e49b480965ff69fa07689161abc4be04f
4
+ data.tar.gz: 9a91baabe807c3e55689f451447778a7d3fa7af9
5
5
  SHA512:
6
- metadata.gz: 48c52c3ccdb1592b408b8e2f0f4e5e360291c020095fd92ae88b9e12671628981cafee53d7ec859d86a85f0aa40fe45f0c3be8d2eeacc4137c759cc1b927ebae
7
- data.tar.gz: 2dd69f12ed361b1418a35211c7aee171490aa1fd5f47de78e2a9483ff54930c7a087a63b8dc603f5dcf28649ef14064aad669ddd0c7297f10d83cc9d82d0fcbf
6
+ metadata.gz: babc9a4789859db1f41cdd3a7666df97317d09d830db53f386e56db23805a9c55e0c8bca715c901458679ca0817c0ade8cc330b1387f658ae692fb6c71a9895f
7
+ data.tar.gz: f740e27101174b002061d2b9071b937ec5a6880f22f3ff5acb6607f15446e47b7d3ae28a5e347cf20c25de8bd9020680c5c84e5125980e764c2e80eb87592ee8
@@ -8,22 +8,32 @@ module Stacker
8
8
  end
9
9
 
10
10
  def dependencies
11
- @dependencies ||= parameters.select { |_, value|
11
+ @dependencies ||= parameters.values.flatten.select { |value|
12
12
  value.is_a?(Hash)
13
- }.map { |_, value|
14
- "#{value.fetch('Stack')}.#{value.fetch('Output')}"
13
+ }.map { |ref|
14
+ "#{ref.fetch('Stack')}.#{ref.fetch('Output')}"
15
15
  }
16
16
  end
17
17
 
18
18
  def resolved
19
19
  @resolved ||= Hash[parameters.map do |name, value|
20
20
  if value.is_a? Hash
21
- stack = region.stack value.fetch('Stack')
22
- value = stack.outputs.fetch value.fetch('Output')
21
+ value = resolve_reference(value)
22
+ elsif value.is_a? Array
23
+ value = value.map do |ref|
24
+ ref.is_a?(Hash) ? resolve_reference(ref) : ref
25
+ end.join ','
23
26
  end
24
27
  [ name, value ]
25
28
  end]
26
29
  end
27
30
 
31
+ private
32
+
33
+ def resolve_reference(ref)
34
+ stack = region.stack ref.fetch('Stack')
35
+ stack.outputs.fetch ref.fetch('Output')
36
+ end
37
+
28
38
  end
29
39
  end
@@ -1,3 +1,3 @@
1
1
  module Stacker
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,155 +1,155 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cotap, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.25'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.25'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coderay
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: diffy
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: indentation
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: memoist
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0.9'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.9'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rainbow
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.1'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: thor
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0.18'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.18'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '='
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
- version: 10.1.0
131
+ version: '10.4'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '='
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
- version: 10.1.0
138
+ version: '10.4'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '='
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
- version: 2.14.1
145
+ version: '2.99'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '='
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: 2.14.1
152
+ version: '2.99'
153
153
  description: Stacker helps you assemple and manage CloudFormation stacks and dependencies.
154
154
  email:
155
155
  - martin@cotap.com
@@ -182,12 +182,12 @@ require_paths:
182
182
  - lib
183
183
  required_ruby_version: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - '>='
186
186
  - !ruby/object:Gem::Version
187
187
  version: 1.9.3
188
188
  required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  requirements:
190
- - - ">="
190
+ - - '>='
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
193
  requirements: []
@@ -197,3 +197,4 @@ signing_key:
197
197
  specification_version: 4
198
198
  summary: Easily assemble CloudFormation stacks.
199
199
  test_files: []
200
+ has_rdoc: false