cloudformula 1.1.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.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +206 -0
- data/Rakefile +1 -0
- data/bin/cloudformula +12 -0
- data/cloudformula.gemspec +26 -0
- data/integration_tests/.ruby-gemset +1 -0
- data/integration_tests/.ruby-version +1 -0
- data/integration_tests/Gemfile +3 -0
- data/integration_tests/README.md +33 -0
- data/integration_tests/fixtures/minimal_cf_template.json +30 -0
- data/integration_tests/fixtures/minimal_cf_template_update.json +54 -0
- data/integration_tests/stack_create_update.rb +26 -0
- data/lib/cloudformula/cli.rb +113 -0
- data/lib/cloudformula/cloud_formation.rb +54 -0
- data/lib/cloudformula/help/create.txt +12 -0
- data/lib/cloudformula/help/generate.txt +10 -0
- data/lib/cloudformula/help/top.txt +20 -0
- data/lib/cloudformula/help/update.txt +12 -0
- data/lib/cloudformula/json_erb.rb +42 -0
- data/lib/cloudformula/string.rb +11 -0
- data/lib/cloudformula/template.rb +99 -0
- data/lib/cloudformula/validator.rb +172 -0
- data/lib/cloudformula/version.rb +3 -0
- data/lib/cloudformula.rb +23 -0
- data/spec/cloud_formula_spec.rb +18 -0
- data/spec/cloudformula/cloud_formation_spec.rb +55 -0
- data/spec/cloudformula/template_spec.rb +303 -0
- data/spec/fixtures/_partial.json.erb +1 -0
- data/spec/fixtures/with_custom_erb_validations.erb +4 -0
- data/spec/fixtures/with_erb_parameters.erb +3 -0
- data/spec/fixtures/with_erb_parameters.json.erb +4 -0
- data/spec/fixtures/with_erb_parameters_and_stack_options.json.erb +5 -0
- data/spec/fixtures/with_erb_parameters_answer.json +4 -0
- data/spec/fixtures/with_erb_parameters_answer.txt +3 -0
- data/spec/fixtures/with_erb_parameters_escaped_answer.json +4 -0
- data/spec/fixtures/with_erb_validations.json.erb +53 -0
- data/spec/fixtures/with_partial.json.erb +5 -0
- data/spec/fixtures/with_partial_answer.json +5 -0
- data/spec/fixtures/with_raw.json.erb +3 -0
- data/spec/fixtures/with_raw_answer.json +3 -0
- data/spec/fixtures/with_stack_options.json.erb +4 -0
- data/spec/fixtures/without_erb_parameters.erb +1 -0
- data/spec/fixtures/without_erb_parameters.json.erb +3 -0
- data/spec/spec_helper.rb +11 -0
- metadata +185 -0
@@ -0,0 +1,303 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module CloudFormula
|
4
|
+
describe Template do
|
5
|
+
describe 'source attribute' do
|
6
|
+
it 'should exist' do
|
7
|
+
template = CloudFormula::Template.new
|
8
|
+
expect(template).to respond_to(:source)
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should be set properly upon initialization with a value' do
|
12
|
+
template = CloudFormula::Template.new('source_file.json.erb', { :param1 => 'value1' })
|
13
|
+
expect(template.source).to eq('source_file.json.erb')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should be set properly upon initialization with no value' do
|
17
|
+
template = CloudFormula::Template.new
|
18
|
+
expect(template.source).to eq('')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe 'parameters attribute' do
|
23
|
+
it 'should exist' do
|
24
|
+
template = CloudFormula::Template.new
|
25
|
+
expect(template).to respond_to(:parameters)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should be set properly upon initialization with a value' do
|
29
|
+
template = CloudFormula::Template.new('source_file.json.erb', { :param1 => 'value1' })
|
30
|
+
expect(template.parameters).to eq({ :param1 => 'value1' })
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should be set properly upon initialization with no value' do
|
34
|
+
template = CloudFormula::Template.new()
|
35
|
+
expect(template.parameters).to eq({})
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe 'stack_options method' do
|
40
|
+
it 'should return an empty hash if no options are set in the template' do
|
41
|
+
template_path = File.expand_path('../fixtures/without_erb_parameters.erb', File.dirname(__FILE__))
|
42
|
+
template = CloudFormula::Template.new(template_path)
|
43
|
+
expect(template.stack_options).to eq({})
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'should return an options hash if one is provided in the template' do
|
47
|
+
template_path = File.expand_path('../fixtures/with_stack_options.json.erb', File.dirname(__FILE__))
|
48
|
+
template = CloudFormula::Template.new(template_path)
|
49
|
+
expect(template.stack_options).to eq({ :disable_rollback => true })
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'generate method' do
|
54
|
+
it 'should exist' do
|
55
|
+
template = CloudFormula::Template.new
|
56
|
+
expect(template).to respond_to(:generate)
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'should return the template contents as-is when there are no parameters' do
|
60
|
+
template_path = File.expand_path('../fixtures/without_erb_parameters.erb', File.dirname(__FILE__))
|
61
|
+
template = CloudFormula::Template.new(template_path)
|
62
|
+
expect(template.generate).to eq(File.read(template_path))
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'should return the modified template contents when there are parameters' do
|
66
|
+
template_path = File.expand_path('../fixtures/with_erb_parameters.erb', File.dirname(__FILE__))
|
67
|
+
answer_path = File.expand_path('../fixtures/with_erb_parameters_answer.txt', File.dirname(__FILE__))
|
68
|
+
template = CloudFormula::Template.new(template_path, { :param1 => 'value1', :param2 => 'value2' })
|
69
|
+
expect(template.generate).to eq(File.read(answer_path))
|
70
|
+
end
|
71
|
+
|
72
|
+
describe 'should raise an error when' do
|
73
|
+
it 'the source is empty' do
|
74
|
+
template = CloudFormula::Template.new
|
75
|
+
expect { template.generate }.to raise_error
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'the source file does not exist or cannot be read' do
|
79
|
+
template = CloudFormula::Template.new('does_not_exist')
|
80
|
+
expect { template.generate }.to raise_error
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'with partial should return the modified template and partial contents when there are parameters' do
|
85
|
+
template_path = File.expand_path('../fixtures/with_partial.json.erb', File.dirname(__FILE__))
|
86
|
+
answer_path = File.expand_path('../fixtures/with_partial_answer.json', File.dirname(__FILE__))
|
87
|
+
template = CloudFormula::Template.new(template_path, { :param1 => 'value1', :param2 => 'value2', :param3 => 'value3' })
|
88
|
+
expect(template.generate).to eq(File.read(answer_path))
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'with raw helper should not escape parameter content' do
|
92
|
+
template_path = File.expand_path('../fixtures/with_raw.json.erb', File.dirname(__FILE__))
|
93
|
+
answer_path = File.expand_path('../fixtures/with_raw_answer.json', File.dirname(__FILE__))
|
94
|
+
template = CloudFormula::Template.new(template_path, { :param1 => 'value1' })
|
95
|
+
expect(template.generate).to eq(File.read(answer_path))
|
96
|
+
end
|
97
|
+
|
98
|
+
describe 'with template validations' do
|
99
|
+
good_params = { :presence_param => 'value1', :length_param => 'value2', :nclusion_param => 'foo', :format_param => 'abc' }
|
100
|
+
|
101
|
+
describe 'valid? method' do
|
102
|
+
it 'should return false when invalid' do
|
103
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
104
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :presence_param => '' }))
|
105
|
+
expect(template.valid?).to be_false
|
106
|
+
end
|
107
|
+
|
108
|
+
it 'should return true when valid' do
|
109
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
110
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
111
|
+
expect(template.valid?).to be_true
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe 'invalid? method' do
|
116
|
+
it 'should return true when invalid' do
|
117
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
118
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :presence_param => '' }))
|
119
|
+
expect(template.invalid?).to be_true
|
120
|
+
end
|
121
|
+
|
122
|
+
it 'should return false when valid' do
|
123
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
124
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
125
|
+
expect(template.invalid?).to be_false
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
describe 'generation' do
|
130
|
+
it 'should raise an error when invalid' do
|
131
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
132
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :presence_param => '' }))
|
133
|
+
expect { template.generate }.to raise_error
|
134
|
+
|
135
|
+
template_path = File.expand_path('../fixtures/with_custom_erb_validations.erb', File.dirname(__FILE__))
|
136
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :presence_param => '' }))
|
137
|
+
expect { template.generate }.to raise_error
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'should be successful when valid' do
|
141
|
+
template_path = File.expand_path('../fixtures/with_custom_erb_validations.erb', File.dirname(__FILE__))
|
142
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
143
|
+
expect { template.generate }.to_not raise_error
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
describe 'exclusion helper' do
|
148
|
+
it 'should include a value in errors[] when invalid' do
|
149
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
150
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :nclusion_param => 'baz' }))
|
151
|
+
expect(template.errors.length).to be > 0
|
152
|
+
end
|
153
|
+
|
154
|
+
it 'should not include a value in errors[] when valid' do
|
155
|
+
template_path = File.expand_path('../fixtures/with_custom_erb_validations.erb', File.dirname(__FILE__))
|
156
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
157
|
+
expect(template.errors.length).to eq(0)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
describe 'inclusion helper' do
|
162
|
+
it 'should include a value in errors[] when invalid' do
|
163
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
164
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :nclusion_param => 'bad' }))
|
165
|
+
expect(template.errors.length).to be > 0
|
166
|
+
end
|
167
|
+
|
168
|
+
it 'should not include a value in errors[] when valid' do
|
169
|
+
template_path = File.expand_path('../fixtures/with_custom_erb_validations.erb', File.dirname(__FILE__))
|
170
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
171
|
+
expect(template.errors.length).to eq(0)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
describe 'length helper' do
|
176
|
+
it 'should include a value in errors[] when invalid' do
|
177
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
178
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :length_param => 'short' }))
|
179
|
+
expect(template.errors.length).to be > 0
|
180
|
+
end
|
181
|
+
|
182
|
+
it 'should not include a value in errors[] when valid' do
|
183
|
+
template_path = File.expand_path('../fixtures/with_custom_erb_validations.erb', File.dirname(__FILE__))
|
184
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
185
|
+
expect(template.errors.length).to eq(0)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
describe 'numericality helper' do
|
190
|
+
it 'should include a value in errors[] when invalid' do
|
191
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
192
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :numericality_param_1 => '1' }))
|
193
|
+
expect(template.errors.length).to be > 0
|
194
|
+
end
|
195
|
+
|
196
|
+
it 'should not include a value in errors[] when valid' do
|
197
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
198
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :numericality_param_1 => '2' }))
|
199
|
+
expect(template.errors.length).to eq(0)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
describe 'format helper' do
|
204
|
+
it 'should include a value in errors[] when invalid' do
|
205
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
206
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :format_param => '123' }))
|
207
|
+
expect(template.errors.length).to be > 0
|
208
|
+
end
|
209
|
+
|
210
|
+
it 'should not include a value in errors[] when valid' do
|
211
|
+
template_path = File.expand_path('../fixtures/with_custom_erb_validations.erb', File.dirname(__FILE__))
|
212
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
213
|
+
expect(template.errors.length).to eq(0)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
describe 'presence helper' do
|
218
|
+
it 'should include a value in errors[] when invalid' do
|
219
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
220
|
+
template = CloudFormula::Template.new(template_path, good_params.merge({ :presence_param => '' }))
|
221
|
+
expect(template.errors.length).to be > 0
|
222
|
+
end
|
223
|
+
|
224
|
+
it 'should not include a value in errors[] when valid' do
|
225
|
+
template_path = File.expand_path('../fixtures/with_custom_erb_validations.erb', File.dirname(__FILE__))
|
226
|
+
template = CloudFormula::Template.new(template_path, good_params)
|
227
|
+
expect(template.errors.length).to eq(0)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
describe 'multiple rules' do
|
232
|
+
it 'should include a value in errors[] for each rule failure' do
|
233
|
+
template_path = File.expand_path('../fixtures/with_erb_validations.json.erb', File.dirname(__FILE__))
|
234
|
+
template = CloudFormula::Template.new(template_path, {})
|
235
|
+
expect(template.errors.length).to be > 1
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
describe 'generate_hash method' do
|
242
|
+
it 'should exist' do
|
243
|
+
template = CloudFormula::Template.new
|
244
|
+
expect(template).to respond_to(:generate_hash)
|
245
|
+
end
|
246
|
+
|
247
|
+
it 'should raise an error if the template is not valid JSON' do
|
248
|
+
template_path = File.expand_path('../fixtures/without_erb_parameters.erb', File.dirname(__FILE__))
|
249
|
+
template = CloudFormula::Template.new(template_path)
|
250
|
+
expect { template.generate_hash }.to raise_error
|
251
|
+
end
|
252
|
+
|
253
|
+
it 'should return the template contents as a Hash with valid JSON and no parameters' do
|
254
|
+
template_path = File.expand_path('../fixtures/without_erb_parameters.json.erb', File.dirname(__FILE__))
|
255
|
+
template = CloudFormula::Template.new(template_path)
|
256
|
+
expect(template.generate_hash).to eq(JSON.parse(File.read(template_path)))
|
257
|
+
end
|
258
|
+
|
259
|
+
it 'should return the modified template contents when there are parameters' do
|
260
|
+
template_path = File.expand_path('../fixtures/with_erb_parameters.json.erb', File.dirname(__FILE__))
|
261
|
+
answer_path = File.expand_path('../fixtures/with_erb_parameters_answer.json', File.dirname(__FILE__))
|
262
|
+
template = CloudFormula::Template.new(template_path, { :param1 => 'value1', :param2 => 'value2' })
|
263
|
+
expect(template.generate_hash).to eq(JSON.parse(File.read(answer_path)))
|
264
|
+
end
|
265
|
+
|
266
|
+
it 'should escape parameter values properly' do
|
267
|
+
template_path = File.expand_path('../fixtures/with_erb_parameters.json.erb', File.dirname(__FILE__))
|
268
|
+
answer_path = File.expand_path('../fixtures/with_erb_parameters_escaped_answer.json', File.dirname(__FILE__))
|
269
|
+
template = CloudFormula::Template.new(template_path, { :param1 => '"value1"', :param2 => '"value2"' })
|
270
|
+
expect(template.generate_hash).to eq(JSON.parse(File.read(answer_path)))
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
describe 'aws_options method' do
|
275
|
+
it 'should exist' do
|
276
|
+
template = CloudFormula::Template.new
|
277
|
+
expect(template).to respond_to(:aws_options)
|
278
|
+
end
|
279
|
+
|
280
|
+
it 'should return a properly merged Hash object' do
|
281
|
+
template_path = File.expand_path('../fixtures/with_erb_parameters_and_stack_options.json.erb', File.dirname(__FILE__))
|
282
|
+
template = CloudFormula::Template.new(template_path)
|
283
|
+
override_options = {
|
284
|
+
:timeout => 180
|
285
|
+
}
|
286
|
+
parameters = {
|
287
|
+
:param1 => 'value1',
|
288
|
+
:param2 => 'value2'
|
289
|
+
}
|
290
|
+
answer = {
|
291
|
+
:disable_rollback => true,
|
292
|
+
:timeout => 180,
|
293
|
+
:parameters => {
|
294
|
+
:param1 => 'value1',
|
295
|
+
:param2 => 'value2'
|
296
|
+
}
|
297
|
+
}
|
298
|
+
expect(template.aws_options(override_options, parameters)).to eql(answer)
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
end
|
303
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
"param3" : <%= @param3 %>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<%
|
2
|
+
@validations = {
|
3
|
+
:presence_param => { :presence => true },
|
4
|
+
:length_param => {
|
5
|
+
:presence => true,
|
6
|
+
:length => {
|
7
|
+
:minimum => 6,
|
8
|
+
:maximum => 6,
|
9
|
+
:in => 6..6,
|
10
|
+
:is => 6
|
11
|
+
}
|
12
|
+
},
|
13
|
+
:nclusion_param => {
|
14
|
+
:exclusion => ['baz'],
|
15
|
+
:inclusion => ['foo', 'bar']
|
16
|
+
},
|
17
|
+
:format_param => {
|
18
|
+
:format => /^[a-z]+$/
|
19
|
+
},
|
20
|
+
:numericality_param_1 => {
|
21
|
+
:numericality => {
|
22
|
+
:only_integer => true,
|
23
|
+
:equal_to => 2,
|
24
|
+
:greater_than => 1,
|
25
|
+
:greater_than_or_equal_to => 2,
|
26
|
+
:less_than => 3,
|
27
|
+
:less_than_or_equal_to => 2,
|
28
|
+
:even => true,
|
29
|
+
:odd => false
|
30
|
+
}
|
31
|
+
},
|
32
|
+
:numericality_param_2 => {
|
33
|
+
:numericality => {
|
34
|
+
:odd => true
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
%>
|
39
|
+
{
|
40
|
+
"AWSTemplateFormatVersion" : "2010-09-09",
|
41
|
+
"Parameters" : {
|
42
|
+
"Param1" : {
|
43
|
+
"Description" : "Test param 1",
|
44
|
+
"Type" : "String",
|
45
|
+
"Default" : "foo"
|
46
|
+
},
|
47
|
+
"Param2" : {
|
48
|
+
"Description" : "Test param 2",
|
49
|
+
"Type" : "String",
|
50
|
+
"Default" : "bar"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
This file simply has no parameters. Format doesn't matter.
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'cloudformula'
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.expect_with :rspec do |c|
|
5
|
+
|
6
|
+
# `.should` is being deprecated. Let's disable it.
|
7
|
+
# https://github.com/rspec/rspec-expectations/blob/master/Should.md
|
8
|
+
c.syntax = :expect # disables `should`
|
9
|
+
|
10
|
+
end
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cloudformula
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kabam
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-11-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.21.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.21.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: trollop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.14'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.14'
|
83
|
+
description: CloudFormula is a tool which generates and uploads CloudFormation templates
|
84
|
+
from ERB templates.
|
85
|
+
email:
|
86
|
+
executables:
|
87
|
+
- cloudformula
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- .gitignore
|
92
|
+
- .rspec
|
93
|
+
- .ruby-gemset
|
94
|
+
- .ruby-version
|
95
|
+
- Gemfile
|
96
|
+
- LICENSE.txt
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- bin/cloudformula
|
100
|
+
- cloudformula.gemspec
|
101
|
+
- integration_tests/.ruby-gemset
|
102
|
+
- integration_tests/.ruby-version
|
103
|
+
- integration_tests/Gemfile
|
104
|
+
- integration_tests/README.md
|
105
|
+
- integration_tests/fixtures/minimal_cf_template.json
|
106
|
+
- integration_tests/fixtures/minimal_cf_template_update.json
|
107
|
+
- integration_tests/stack_create_update.rb
|
108
|
+
- lib/cloudformula.rb
|
109
|
+
- lib/cloudformula/cli.rb
|
110
|
+
- lib/cloudformula/cloud_formation.rb
|
111
|
+
- lib/cloudformula/help/create.txt
|
112
|
+
- lib/cloudformula/help/generate.txt
|
113
|
+
- lib/cloudformula/help/top.txt
|
114
|
+
- lib/cloudformula/help/update.txt
|
115
|
+
- lib/cloudformula/json_erb.rb
|
116
|
+
- lib/cloudformula/string.rb
|
117
|
+
- lib/cloudformula/template.rb
|
118
|
+
- lib/cloudformula/validator.rb
|
119
|
+
- lib/cloudformula/version.rb
|
120
|
+
- spec/cloud_formula_spec.rb
|
121
|
+
- spec/cloudformula/cloud_formation_spec.rb
|
122
|
+
- spec/cloudformula/template_spec.rb
|
123
|
+
- spec/fixtures/_partial.json.erb
|
124
|
+
- spec/fixtures/with_custom_erb_validations.erb
|
125
|
+
- spec/fixtures/with_erb_parameters.erb
|
126
|
+
- spec/fixtures/with_erb_parameters.json.erb
|
127
|
+
- spec/fixtures/with_erb_parameters_and_stack_options.json.erb
|
128
|
+
- spec/fixtures/with_erb_parameters_answer.json
|
129
|
+
- spec/fixtures/with_erb_parameters_answer.txt
|
130
|
+
- spec/fixtures/with_erb_parameters_escaped_answer.json
|
131
|
+
- spec/fixtures/with_erb_validations.json.erb
|
132
|
+
- spec/fixtures/with_partial.json.erb
|
133
|
+
- spec/fixtures/with_partial_answer.json
|
134
|
+
- spec/fixtures/with_raw.json.erb
|
135
|
+
- spec/fixtures/with_raw_answer.json
|
136
|
+
- spec/fixtures/with_stack_options.json.erb
|
137
|
+
- spec/fixtures/without_erb_parameters.erb
|
138
|
+
- spec/fixtures/without_erb_parameters.json.erb
|
139
|
+
- spec/spec_helper.rb
|
140
|
+
homepage: https://github.com/Kabam/cloudformula
|
141
|
+
licenses:
|
142
|
+
- MIT
|
143
|
+
metadata: {}
|
144
|
+
post_install_message:
|
145
|
+
rdoc_options: []
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
requirements: []
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 2.0.3
|
161
|
+
signing_key:
|
162
|
+
specification_version: 4
|
163
|
+
summary: CloudFormula is a tool which generates and uploads CloudFormation templates
|
164
|
+
from ERB templates.
|
165
|
+
test_files:
|
166
|
+
- spec/cloud_formula_spec.rb
|
167
|
+
- spec/cloudformula/cloud_formation_spec.rb
|
168
|
+
- spec/cloudformula/template_spec.rb
|
169
|
+
- spec/fixtures/_partial.json.erb
|
170
|
+
- spec/fixtures/with_custom_erb_validations.erb
|
171
|
+
- spec/fixtures/with_erb_parameters.erb
|
172
|
+
- spec/fixtures/with_erb_parameters.json.erb
|
173
|
+
- spec/fixtures/with_erb_parameters_and_stack_options.json.erb
|
174
|
+
- spec/fixtures/with_erb_parameters_answer.json
|
175
|
+
- spec/fixtures/with_erb_parameters_answer.txt
|
176
|
+
- spec/fixtures/with_erb_parameters_escaped_answer.json
|
177
|
+
- spec/fixtures/with_erb_validations.json.erb
|
178
|
+
- spec/fixtures/with_partial.json.erb
|
179
|
+
- spec/fixtures/with_partial_answer.json
|
180
|
+
- spec/fixtures/with_raw.json.erb
|
181
|
+
- spec/fixtures/with_raw_answer.json
|
182
|
+
- spec/fixtures/with_stack_options.json.erb
|
183
|
+
- spec/fixtures/without_erb_parameters.erb
|
184
|
+
- spec/fixtures/without_erb_parameters.json.erb
|
185
|
+
- spec/spec_helper.rb
|