kumogata 0.5.10 → 0.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/kumogata.gemspec +4 -3
- data/lib/kumogata/client.rb +8 -3
- data/lib/kumogata/version.rb +1 -1
- data/spec/kumogata_convert_spec.rb +2 -2
- data/spec/kumogata_create_spec.rb +35 -24
- data/spec/kumogata_crypt_spec.rb +6 -5
- data/spec/kumogata_update_spec.rb +29 -19
- metadata +70 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ce96db1cc561739fe3f99c95a486673ad8cd0a4
|
4
|
+
data.tar.gz: 8eb3fc06a4913faeaf3a365f0d302dc2a446d8b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92ffe0705a6fd0183933868e4c4cbf405dc3b704aea852bf0f138e60c2b39a26b7b3b89d8a31b8354ddf48aa2396a8267de53e7ebc10345e4467447effd7a106
|
7
|
+
data.tar.gz: b5a2ff2564480b69c6906342d190621943600fa21842814d183052b5a2f89b55f3b61ccf90d07b65c9d57e6a3b37d5aa0ecd8e7223addf176b04c1aa77d07cca
|
data/.gitignore
CHANGED
data/kumogata.gemspec
CHANGED
@@ -25,15 +25,16 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'dslh', '>= 0.2.7', '< 0.3'
|
26
26
|
spec.add_dependency 'hashie'
|
27
27
|
spec.add_dependency 'highline'
|
28
|
-
spec.add_dependency 'json'
|
28
|
+
spec.add_dependency 'json', '=1.8.3'
|
29
29
|
spec.add_dependency 'json5'
|
30
30
|
spec.add_dependency 'net-ssh'
|
31
|
+
spec.add_dependency 'nokogiri', '=1.6.7.2'
|
31
32
|
spec.add_dependency 'retryable', '~> 2.0.0'
|
32
33
|
spec.add_dependency 'term-ansicolor'
|
33
|
-
spec.add_dependency 'therubyracer'
|
34
|
+
spec.add_dependency 'therubyracer', '=0.12.2'
|
34
35
|
spec.add_dependency 'uuidtools'
|
35
36
|
spec.add_development_dependency 'bundler'
|
36
37
|
spec.add_development_dependency 'rake'
|
37
|
-
spec.add_development_dependency 'rspec', '>= 3.0.0'
|
38
|
+
spec.add_development_dependency 'rspec', '>= 3.0.0', '< 3.5'
|
38
39
|
spec.add_development_dependency 'timecop'
|
39
40
|
end
|
data/lib/kumogata/client.rb
CHANGED
@@ -223,7 +223,10 @@ class Kumogata::Client
|
|
223
223
|
def evaluate_template(template, path_or_url)
|
224
224
|
key_converter = proc do |key|
|
225
225
|
key = key.to_s
|
226
|
-
|
226
|
+
unless @options.skip_replace_underscore?
|
227
|
+
key.gsub!('_', ':')
|
228
|
+
key.gsub!('__', '::')
|
229
|
+
end
|
227
230
|
key
|
228
231
|
end
|
229
232
|
|
@@ -337,7 +340,9 @@ class Kumogata::Client
|
|
337
340
|
end
|
338
341
|
|
339
342
|
Kumogata.logger.info("Creating stack: #{stack_name}".cyan)
|
340
|
-
stack = @cloud_formation.stacks.create(stack_name,
|
343
|
+
stack = @cloud_formation.stacks.create(stack_name,
|
344
|
+
JSON.pretty_generate(template),
|
345
|
+
build_create_options)
|
341
346
|
|
342
347
|
return if @options.detach?
|
343
348
|
|
@@ -368,7 +373,7 @@ class Kumogata::Client
|
|
368
373
|
|
369
374
|
Kumogata.logger.info("Updating stack: #{stack_name}".green)
|
370
375
|
event_log = create_event_log(stack)
|
371
|
-
stack.update(build_update_options(template
|
376
|
+
stack.update(build_update_options(JSON.pretty_generate(template)))
|
372
377
|
|
373
378
|
return if @options.detach?
|
374
379
|
|
data/lib/kumogata/version.rb
CHANGED
@@ -614,7 +614,7 @@ end
|
|
614
614
|
}
|
615
615
|
},
|
616
616
|
"commands": {
|
617
|
-
"
|
617
|
+
"any:name": {
|
618
618
|
"command": {
|
619
619
|
"Fn::Join": [
|
620
620
|
"",
|
@@ -845,7 +845,7 @@ end
|
|
845
845
|
}
|
846
846
|
},
|
847
847
|
"commands": {
|
848
|
-
"
|
848
|
+
"any:name": {
|
849
849
|
"command": {
|
850
850
|
"Fn::Join": [
|
851
851
|
"",
|
@@ -21,7 +21,8 @@ end
|
|
21
21
|
EOS
|
22
22
|
|
23
23
|
run_client(:create, :template => template) do |client, cf|
|
24
|
-
|
24
|
+
template = eval_template(template, :update_deletion_policy => true)
|
25
|
+
json = JSON.pretty_generate(template)
|
25
26
|
expect(client).to receive(:print_event_log).twice
|
26
27
|
expect(client).to receive(:create_event_log).once
|
27
28
|
|
@@ -81,7 +82,8 @@ end
|
|
81
82
|
EOS
|
82
83
|
|
83
84
|
out = run_client(:create, :template => template, :options => {:detach => true}) do |client, cf|
|
84
|
-
|
85
|
+
template = eval_template(template, :update_deletion_policy => true)
|
86
|
+
json = JSON.pretty_generate(template)
|
85
87
|
expect(client).not_to receive(:print_event_log)
|
86
88
|
expect(client).not_to receive(:create_event_log)
|
87
89
|
|
@@ -147,7 +149,8 @@ end
|
|
147
149
|
TEMPLATE
|
148
150
|
|
149
151
|
run_client(:create, :template => template) do |client, cf|
|
150
|
-
|
152
|
+
template = eval_template(template, :update_deletion_policy => true)
|
153
|
+
json = JSON.pretty_generate(template)
|
151
154
|
expect(client).to receive(:print_event_log).twice
|
152
155
|
expect(client).to receive(:create_event_log).once
|
153
156
|
|
@@ -201,9 +204,9 @@ end
|
|
201
204
|
.and_return(["ap-northeast-1\nap-northeast-1b\n", "", process_status2])
|
202
205
|
|
203
206
|
expect(client.instance_variable_get(:@post_processing))
|
204
|
-
.to receive(:print_command).with('
|
207
|
+
.to receive(:print_command).with('command:a')
|
205
208
|
expect(client.instance_variable_get(:@post_processing))
|
206
|
-
.to receive(:print_command).with('
|
209
|
+
.to receive(:print_command).with('command:b')
|
207
210
|
|
208
211
|
expect(client.instance_variable_get(:@post_processing))
|
209
212
|
.to receive(:print_command_result)
|
@@ -214,8 +217,8 @@ end
|
|
214
217
|
|
215
218
|
expect(client.instance_variable_get(:@post_processing))
|
216
219
|
.to receive(:save_command_results)
|
217
|
-
.with([{'
|
218
|
-
{'
|
220
|
+
.with([{'command:a' => {'ExitStatus' => 0, 'StdOut' => "ap-northeast-1b\nap-northeast-1\n", 'StdErr' => ""}},
|
221
|
+
{'command:b' => {'ExitStatus' => 0, 'StdOut' => "ap-northeast-1\nap-northeast-1b\n", 'StdErr' => ""}}])
|
219
222
|
end
|
220
223
|
end
|
221
224
|
|
@@ -253,7 +256,8 @@ end
|
|
253
256
|
TEMPLATE
|
254
257
|
|
255
258
|
run_client(:create, :template => template) do |client, cf|
|
256
|
-
|
259
|
+
template = eval_template(template, :update_deletion_policy => true)
|
260
|
+
json = JSON.pretty_generate(template)
|
257
261
|
expect(client).to receive(:print_event_log).twice
|
258
262
|
expect(client).to receive(:create_event_log).once
|
259
263
|
|
@@ -295,7 +299,7 @@ end
|
|
295
299
|
.and_return(["file1\nfile2\n", "", 0])
|
296
300
|
|
297
301
|
expect(client.instance_variable_get(:@post_processing))
|
298
|
-
.to receive(:print_command).with('
|
302
|
+
.to receive(:print_command).with('ssh:command')
|
299
303
|
|
300
304
|
expect(client.instance_variable_get(:@post_processing))
|
301
305
|
.to receive(:print_command_result)
|
@@ -303,7 +307,7 @@ end
|
|
303
307
|
|
304
308
|
expect(client.instance_variable_get(:@post_processing))
|
305
309
|
.to receive(:save_command_results)
|
306
|
-
.with([{'
|
310
|
+
.with([{'ssh:command' => {'ExitStatus' => 0, 'StdOut' => "file1\nfile2\n", 'StdErr' => ""}}])
|
307
311
|
end
|
308
312
|
end
|
309
313
|
|
@@ -345,7 +349,8 @@ end
|
|
345
349
|
TEMPLATE
|
346
350
|
|
347
351
|
run_client(:create, :template => template) do |client, cf|
|
348
|
-
|
352
|
+
template = eval_template(template, :update_deletion_policy => true)
|
353
|
+
json = JSON.pretty_generate(template)
|
349
354
|
expect(client).to receive(:print_event_log).twice
|
350
355
|
expect(client).to receive(:create_event_log).once
|
351
356
|
|
@@ -387,7 +392,7 @@ end
|
|
387
392
|
.and_return(["file1\nfile2\n", "", 0])
|
388
393
|
|
389
394
|
expect(client.instance_variable_get(:@post_processing))
|
390
|
-
.to receive(:print_command).with('
|
395
|
+
.to receive(:print_command).with('ssh:command')
|
391
396
|
|
392
397
|
expect(client.instance_variable_get(:@post_processing))
|
393
398
|
.to receive(:print_command_result)
|
@@ -395,7 +400,7 @@ end
|
|
395
400
|
|
396
401
|
expect(client.instance_variable_get(:@post_processing))
|
397
402
|
.to receive(:save_command_results)
|
398
|
-
.with([{'
|
403
|
+
.with([{'ssh:command' => {'ExitStatus' => 0, 'StdOut' => "file1\nfile2\n", 'StdErr' => ""}}])
|
399
404
|
end
|
400
405
|
end
|
401
406
|
|
@@ -444,7 +449,8 @@ end
|
|
444
449
|
TEMPLATE
|
445
450
|
|
446
451
|
run_client(:create, :template => template) do |client, cf|
|
447
|
-
|
452
|
+
template = eval_template(template, :update_deletion_policy => true)
|
453
|
+
json = JSON.pretty_generate(template)
|
448
454
|
expect(client).to receive(:print_event_log).twice
|
449
455
|
expect(client).to receive(:create_event_log).once
|
450
456
|
|
@@ -498,9 +504,9 @@ end
|
|
498
504
|
.and_return(["ap-northeast-1\nap-northeast-1b\n", "", process_status2])
|
499
505
|
|
500
506
|
expect(client.instance_variable_get(:@post_processing))
|
501
|
-
.to receive(:print_command).with('
|
507
|
+
.to receive(:print_command).with('command:a')
|
502
508
|
expect(client.instance_variable_get(:@post_processing))
|
503
|
-
.to receive(:print_command).with('
|
509
|
+
.to receive(:print_command).with('command:b')
|
504
510
|
|
505
511
|
expect(client.instance_variable_get(:@post_processing))
|
506
512
|
.to receive(:print_command_result)
|
@@ -511,8 +517,8 @@ end
|
|
511
517
|
|
512
518
|
expect(client.instance_variable_get(:@post_processing))
|
513
519
|
.to receive(:save_command_results)
|
514
|
-
.with([{'
|
515
|
-
{'
|
520
|
+
.with([{'command:a' => {'ExitStatus' => 0, 'StdOut' => "ap-northeast-1b\nap-northeast-1\n", 'StdErr' => ""}},
|
521
|
+
{'command:b' => {'ExitStatus' => 0, 'StdOut' => "ap-northeast-1\nap-northeast-1b\n", 'StdErr' => ""}}])
|
516
522
|
end
|
517
523
|
end
|
518
524
|
|
@@ -561,7 +567,8 @@ end
|
|
561
567
|
TEMPLATE
|
562
568
|
|
563
569
|
run_client(:create, :template => template) do |client, cf|
|
564
|
-
|
570
|
+
template = eval_template(template, :update_deletion_policy => true)
|
571
|
+
json = JSON.pretty_generate(template)
|
565
572
|
expect(client).to receive(:print_event_log).twice
|
566
573
|
expect(client).to receive(:create_event_log).once
|
567
574
|
|
@@ -637,7 +644,7 @@ end
|
|
637
644
|
run_client(:create, :template => template) do |client, cf|
|
638
645
|
template = eval_template(template, :update_deletion_policy => true)
|
639
646
|
expect(template['Resources']['myEC2Instance']['DeletionPolicy']).to eq('Delete')
|
640
|
-
json = template
|
647
|
+
json = JSON.pretty_generate(template)
|
641
648
|
expect(client).to receive(:print_event_log).twice
|
642
649
|
expect(client).to receive(:create_event_log).once
|
643
650
|
|
@@ -705,7 +712,8 @@ end
|
|
705
712
|
EOS
|
706
713
|
|
707
714
|
run_client(:create, :template => template, :options => {:parameters => {'InstanceType'=>'m1.large'}}) do |client, cf|
|
708
|
-
|
715
|
+
template = eval_template(template, :update_deletion_policy => true)
|
716
|
+
json = JSON.pretty_generate(template)
|
709
717
|
expect(client).to receive(:print_event_log).twice
|
710
718
|
expect(client).to receive(:create_event_log).once
|
711
719
|
|
@@ -765,7 +773,8 @@ end
|
|
765
773
|
EOS
|
766
774
|
|
767
775
|
run_client(:create, :arguments => ['MyStack'], :template => template) do |client, cf|
|
768
|
-
|
776
|
+
template = eval_template(template)
|
777
|
+
json = JSON.pretty_generate(template)
|
769
778
|
expect(client).to receive(:print_event_log).once
|
770
779
|
|
771
780
|
output = make_double('output') do |obj|
|
@@ -821,7 +830,8 @@ end
|
|
821
830
|
EOS
|
822
831
|
|
823
832
|
run_client(:create, :arguments => ['MyStack'], :template => template, :options => {:deletion_policy_retain => true}) do |client, cf|
|
824
|
-
|
833
|
+
template = eval_template(template, :update_deletion_policy => true)
|
834
|
+
json = JSON.pretty_generate(template)
|
825
835
|
expect(client).to receive(:print_event_log).once
|
826
836
|
|
827
837
|
output = make_double('output') do |obj|
|
@@ -911,7 +921,8 @@ end
|
|
911
921
|
EOS
|
912
922
|
|
913
923
|
run_client(:create, :template => template, :options => {:parameters => {'InstanceType'=>'m1.large'}, :encrypt_parameters => ['Password']}) do |client, cf|
|
914
|
-
|
924
|
+
template = eval_template(template, :update_deletion_policy => true, :add_encryption_password => true)
|
925
|
+
json = JSON.pretty_generate(template)
|
915
926
|
expect(client).to receive(:print_event_log).twice
|
916
927
|
expect(client).to receive(:create_event_log).once
|
917
928
|
|
data/spec/kumogata_crypt_spec.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
describe Kumogata::Crypt do
|
2
2
|
it 'encrypt string' do
|
3
|
-
encrypted =
|
4
|
-
decrypted =
|
3
|
+
encrypted = Kumogata::Crypt.encrypt("my_password", "jugem jugem")
|
4
|
+
decrypted = Kumogata::Crypt.decrypt("my_password", encrypted)
|
5
5
|
expect(decrypted).to eq("jugem jugem")
|
6
6
|
end
|
7
7
|
|
8
8
|
it 'encrypt long string' do
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
len = (RUBY_PLATFORM =~ /darwin/) ? 1 : 10
|
10
|
+
encrypted = Kumogata::Crypt.encrypt("my_password", "jugem jugem" * 1024 * len)
|
11
|
+
decrypted = Kumogata::Crypt.decrypt("my_password", encrypted)
|
12
|
+
expect(decrypted).to eq("jugem jugem" * 1024 * len)
|
12
13
|
end
|
13
14
|
|
14
15
|
it 'make password' do
|
@@ -21,7 +21,8 @@ end
|
|
21
21
|
EOS
|
22
22
|
|
23
23
|
run_client(:update, :arguments => ['MyStack'], :template => template) do |client, cf|
|
24
|
-
|
24
|
+
template = eval_template(template)
|
25
|
+
json = JSON.pretty_generate(template)
|
25
26
|
expect(client).to receive(:print_event_log).once
|
26
27
|
expect(client).to receive(:create_event_log).once
|
27
28
|
|
@@ -78,7 +79,8 @@ end
|
|
78
79
|
EOS
|
79
80
|
|
80
81
|
run_client(:update, :arguments => ['MyStack'], :template => template, :options => {:capabilities => ['AWS::CloudFormation::Stack']}) do |client, cf|
|
81
|
-
|
82
|
+
template = eval_template(template)
|
83
|
+
json = JSON.pretty_generate(template)
|
82
84
|
expect(client).to receive(:print_event_log).once
|
83
85
|
expect(client).to receive(:create_event_log).once
|
84
86
|
|
@@ -135,7 +137,8 @@ end
|
|
135
137
|
EOS
|
136
138
|
|
137
139
|
out = run_client(:update, :arguments => ['MyStack'], :template => template, :options => {:detach => true}) do |client, cf|
|
138
|
-
|
140
|
+
template = eval_template(template)
|
141
|
+
json = JSON.pretty_generate(template)
|
139
142
|
expect(client).not_to receive(:print_event_log)
|
140
143
|
expect(client).to receive(:create_event_log).once
|
141
144
|
|
@@ -184,7 +187,7 @@ end
|
|
184
187
|
template["Resources"]["myEC2Instance"]["Metadata"] = {
|
185
188
|
"DeletionPolicyUpdateKeyForKumogata" => "DeletionPolicyUpdateValueForKumogata1388534400"
|
186
189
|
}
|
187
|
-
json = template
|
190
|
+
json = JSON.pretty_generate(template)
|
188
191
|
expect(client).to receive(:print_event_log).once
|
189
192
|
expect(client).to receive(:create_event_log).once
|
190
193
|
|
@@ -263,7 +266,8 @@ end
|
|
263
266
|
TEMPLATE
|
264
267
|
|
265
268
|
run_client(:update, :arguments => ['MyStack'], :template => template) do |client, cf|
|
266
|
-
|
269
|
+
template = eval_template(template)
|
270
|
+
json = JSON.pretty_generate(template)
|
267
271
|
expect(client).to receive(:print_event_log).once
|
268
272
|
expect(client).to receive(:create_event_log).once
|
269
273
|
|
@@ -349,7 +353,8 @@ end
|
|
349
353
|
TEMPLATE
|
350
354
|
|
351
355
|
run_client(:update, :arguments => ['MyStack'], :template => template) do |client, cf|
|
352
|
-
|
356
|
+
template = eval_template(template)
|
357
|
+
json = JSON.pretty_generate(template)
|
353
358
|
expect(client).to receive(:print_event_log).once
|
354
359
|
expect(client).to receive(:create_event_log).once
|
355
360
|
|
@@ -388,7 +393,7 @@ end
|
|
388
393
|
.and_return(["file1\nfile2\n", "", 0])
|
389
394
|
|
390
395
|
expect(client.instance_variable_get(:@post_processing))
|
391
|
-
.to receive(:print_command).with('
|
396
|
+
.to receive(:print_command).with('ssh:command')
|
392
397
|
|
393
398
|
expect(client.instance_variable_get(:@post_processing))
|
394
399
|
.to receive(:print_command_result)
|
@@ -396,7 +401,7 @@ end
|
|
396
401
|
|
397
402
|
expect(client.instance_variable_get(:@post_processing))
|
398
403
|
.to receive(:save_command_results)
|
399
|
-
.with([{'
|
404
|
+
.with([{'ssh:command' => {'ExitStatus' => 0, 'StdOut' => "file1\nfile2\n", 'StdErr' => ""}}])
|
400
405
|
end
|
401
406
|
end
|
402
407
|
|
@@ -439,7 +444,8 @@ end
|
|
439
444
|
TEMPLATE
|
440
445
|
|
441
446
|
run_client(:update, :arguments => ['MyStack'], :template => template) do |client, cf|
|
442
|
-
|
447
|
+
template = eval_template(template)
|
448
|
+
json = JSON.pretty_generate(template)
|
443
449
|
expect(client).to receive(:print_event_log).once
|
444
450
|
expect(client).to receive(:create_event_log).once
|
445
451
|
|
@@ -478,7 +484,7 @@ end
|
|
478
484
|
.and_return(["file1\nfile2\n", "", 0])
|
479
485
|
|
480
486
|
expect(client.instance_variable_get(:@post_processing))
|
481
|
-
.to receive(:print_command).with('
|
487
|
+
.to receive(:print_command).with('ssh:command')
|
482
488
|
|
483
489
|
expect(client.instance_variable_get(:@post_processing))
|
484
490
|
.to receive(:print_command_result)
|
@@ -486,7 +492,7 @@ end
|
|
486
492
|
|
487
493
|
expect(client.instance_variable_get(:@post_processing))
|
488
494
|
.to receive(:save_command_results)
|
489
|
-
.with([{'
|
495
|
+
.with([{'ssh:command' => {'ExitStatus' => 0, 'StdOut' => "file1\nfile2\n", 'StdErr' => ""}}])
|
490
496
|
end
|
491
497
|
end
|
492
498
|
|
@@ -535,7 +541,8 @@ end
|
|
535
541
|
TEMPLATE
|
536
542
|
|
537
543
|
run_client(:update, :arguments => ['MyStack'], :template => template) do |client, cf|
|
538
|
-
|
544
|
+
template = eval_template(template)
|
545
|
+
json = JSON.pretty_generate(template)
|
539
546
|
expect(client).to receive(:print_event_log).once
|
540
547
|
expect(client).to receive(:create_event_log).once
|
541
548
|
|
@@ -587,9 +594,9 @@ end
|
|
587
594
|
.and_return(["ap-northeast-1\nap-northeast-1b\n", "", process_status2])
|
588
595
|
|
589
596
|
expect(client.instance_variable_get(:@post_processing))
|
590
|
-
.to receive(:print_command).with('
|
597
|
+
.to receive(:print_command).with('command:a')
|
591
598
|
expect(client.instance_variable_get(:@post_processing))
|
592
|
-
.to receive(:print_command).with('
|
599
|
+
.to receive(:print_command).with('command:b')
|
593
600
|
|
594
601
|
expect(client.instance_variable_get(:@post_processing))
|
595
602
|
.to receive(:print_command_result)
|
@@ -600,8 +607,8 @@ end
|
|
600
607
|
|
601
608
|
expect(client.instance_variable_get(:@post_processing))
|
602
609
|
.to receive(:save_command_results)
|
603
|
-
.with([{'
|
604
|
-
{'
|
610
|
+
.with([{'command:a' => {'ExitStatus' => 0, 'StdOut' => "ap-northeast-1b\nap-northeast-1\n", 'StdErr' => ""}},
|
611
|
+
{'command:b' => {'ExitStatus' => 0, 'StdOut' => "ap-northeast-1\nap-northeast-1b\n", 'StdErr' => ""}}])
|
605
612
|
end
|
606
613
|
end
|
607
614
|
|
@@ -650,7 +657,8 @@ end
|
|
650
657
|
TEMPLATE
|
651
658
|
|
652
659
|
run_client(:update, :arguments => ['MyStack'], :template => template) do |client, cf|
|
653
|
-
|
660
|
+
template = eval_template(template)
|
661
|
+
json = JSON.pretty_generate(template)
|
654
662
|
expect(client).to receive(:print_event_log).once
|
655
663
|
expect(client).to receive(:create_event_log).once
|
656
664
|
|
@@ -731,7 +739,8 @@ end
|
|
731
739
|
EOS
|
732
740
|
|
733
741
|
run_client(:update, :arguments => ['MyStack'], :template => template, :options => {:parameters => {'InstanceType'=>'m1.large'}}) do |client, cf|
|
734
|
-
|
742
|
+
template = eval_template(template)
|
743
|
+
json = JSON.pretty_generate(template)
|
735
744
|
expect(client).to receive(:print_event_log).once
|
736
745
|
expect(client).to receive(:create_event_log).once
|
737
746
|
|
@@ -821,7 +830,8 @@ end
|
|
821
830
|
EOS
|
822
831
|
|
823
832
|
run_client(:update, :arguments => ['MyStack'], :template => template, :options => {:parameters => {'InstanceType'=>'m1.large'}, :encrypt_parameters => ['Password']}) do |client, cf|
|
824
|
-
|
833
|
+
template = eval_template(template, :add_encryption_password => true)
|
834
|
+
json = JSON.pretty_generate(template)
|
825
835
|
expect(client).to receive(:print_event_log).once
|
826
836
|
expect(client).to receive(:create_event_log).once
|
827
837
|
|
metadata
CHANGED
@@ -1,271 +1,291 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kumogata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-v1
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '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: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: coderay
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
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: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coffee-script
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
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: '0'
|
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: '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: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: dslh
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.2.7
|
76
|
-
- -
|
76
|
+
- - <
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0.3'
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: 0.2.7
|
86
|
-
- -
|
86
|
+
- - <
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0.3'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: hashie
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- -
|
93
|
+
- - '>='
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- -
|
100
|
+
- - '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: highline
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- -
|
114
|
+
- - '>='
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: json
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- -
|
121
|
+
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: 1.8.3
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- -
|
128
|
+
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
130
|
+
version: 1.8.3
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: json5
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- -
|
135
|
+
- - '>='
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
type: :runtime
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- -
|
142
|
+
- - '>='
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: net-ssh
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- -
|
149
|
+
- - '>='
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0'
|
152
152
|
type: :runtime
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- -
|
156
|
+
- - '>='
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: nokogiri
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - '='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 1.6.7.2
|
166
|
+
type: :runtime
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - '='
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: 1.6.7.2
|
159
173
|
- !ruby/object:Gem::Dependency
|
160
174
|
name: retryable
|
161
175
|
requirement: !ruby/object:Gem::Requirement
|
162
176
|
requirements:
|
163
|
-
- -
|
177
|
+
- - ~>
|
164
178
|
- !ruby/object:Gem::Version
|
165
179
|
version: 2.0.0
|
166
180
|
type: :runtime
|
167
181
|
prerelease: false
|
168
182
|
version_requirements: !ruby/object:Gem::Requirement
|
169
183
|
requirements:
|
170
|
-
- -
|
184
|
+
- - ~>
|
171
185
|
- !ruby/object:Gem::Version
|
172
186
|
version: 2.0.0
|
173
187
|
- !ruby/object:Gem::Dependency
|
174
188
|
name: term-ansicolor
|
175
189
|
requirement: !ruby/object:Gem::Requirement
|
176
190
|
requirements:
|
177
|
-
- -
|
191
|
+
- - '>='
|
178
192
|
- !ruby/object:Gem::Version
|
179
193
|
version: '0'
|
180
194
|
type: :runtime
|
181
195
|
prerelease: false
|
182
196
|
version_requirements: !ruby/object:Gem::Requirement
|
183
197
|
requirements:
|
184
|
-
- -
|
198
|
+
- - '>='
|
185
199
|
- !ruby/object:Gem::Version
|
186
200
|
version: '0'
|
187
201
|
- !ruby/object:Gem::Dependency
|
188
202
|
name: therubyracer
|
189
203
|
requirement: !ruby/object:Gem::Requirement
|
190
204
|
requirements:
|
191
|
-
- -
|
205
|
+
- - '='
|
192
206
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
207
|
+
version: 0.12.2
|
194
208
|
type: :runtime
|
195
209
|
prerelease: false
|
196
210
|
version_requirements: !ruby/object:Gem::Requirement
|
197
211
|
requirements:
|
198
|
-
- -
|
212
|
+
- - '='
|
199
213
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
214
|
+
version: 0.12.2
|
201
215
|
- !ruby/object:Gem::Dependency
|
202
216
|
name: uuidtools
|
203
217
|
requirement: !ruby/object:Gem::Requirement
|
204
218
|
requirements:
|
205
|
-
- -
|
219
|
+
- - '>='
|
206
220
|
- !ruby/object:Gem::Version
|
207
221
|
version: '0'
|
208
222
|
type: :runtime
|
209
223
|
prerelease: false
|
210
224
|
version_requirements: !ruby/object:Gem::Requirement
|
211
225
|
requirements:
|
212
|
-
- -
|
226
|
+
- - '>='
|
213
227
|
- !ruby/object:Gem::Version
|
214
228
|
version: '0'
|
215
229
|
- !ruby/object:Gem::Dependency
|
216
230
|
name: bundler
|
217
231
|
requirement: !ruby/object:Gem::Requirement
|
218
232
|
requirements:
|
219
|
-
- -
|
233
|
+
- - '>='
|
220
234
|
- !ruby/object:Gem::Version
|
221
235
|
version: '0'
|
222
236
|
type: :development
|
223
237
|
prerelease: false
|
224
238
|
version_requirements: !ruby/object:Gem::Requirement
|
225
239
|
requirements:
|
226
|
-
- -
|
240
|
+
- - '>='
|
227
241
|
- !ruby/object:Gem::Version
|
228
242
|
version: '0'
|
229
243
|
- !ruby/object:Gem::Dependency
|
230
244
|
name: rake
|
231
245
|
requirement: !ruby/object:Gem::Requirement
|
232
246
|
requirements:
|
233
|
-
- -
|
247
|
+
- - '>='
|
234
248
|
- !ruby/object:Gem::Version
|
235
249
|
version: '0'
|
236
250
|
type: :development
|
237
251
|
prerelease: false
|
238
252
|
version_requirements: !ruby/object:Gem::Requirement
|
239
253
|
requirements:
|
240
|
-
- -
|
254
|
+
- - '>='
|
241
255
|
- !ruby/object:Gem::Version
|
242
256
|
version: '0'
|
243
257
|
- !ruby/object:Gem::Dependency
|
244
258
|
name: rspec
|
245
259
|
requirement: !ruby/object:Gem::Requirement
|
246
260
|
requirements:
|
247
|
-
- -
|
261
|
+
- - '>='
|
248
262
|
- !ruby/object:Gem::Version
|
249
263
|
version: 3.0.0
|
264
|
+
- - <
|
265
|
+
- !ruby/object:Gem::Version
|
266
|
+
version: '3.5'
|
250
267
|
type: :development
|
251
268
|
prerelease: false
|
252
269
|
version_requirements: !ruby/object:Gem::Requirement
|
253
270
|
requirements:
|
254
|
-
- -
|
271
|
+
- - '>='
|
255
272
|
- !ruby/object:Gem::Version
|
256
273
|
version: 3.0.0
|
274
|
+
- - <
|
275
|
+
- !ruby/object:Gem::Version
|
276
|
+
version: '3.5'
|
257
277
|
- !ruby/object:Gem::Dependency
|
258
278
|
name: timecop
|
259
279
|
requirement: !ruby/object:Gem::Requirement
|
260
280
|
requirements:
|
261
|
-
- -
|
281
|
+
- - '>='
|
262
282
|
- !ruby/object:Gem::Version
|
263
283
|
version: '0'
|
264
284
|
type: :development
|
265
285
|
prerelease: false
|
266
286
|
version_requirements: !ruby/object:Gem::Requirement
|
267
287
|
requirements:
|
268
|
-
- -
|
288
|
+
- - '>='
|
269
289
|
- !ruby/object:Gem::Version
|
270
290
|
version: '0'
|
271
291
|
description: A tool for AWS CloudFormation. It can define a template in Ruby DSL.
|
@@ -276,9 +296,9 @@ executables:
|
|
276
296
|
extensions: []
|
277
297
|
extra_rdoc_files: []
|
278
298
|
files:
|
279
|
-
-
|
280
|
-
-
|
281
|
-
-
|
299
|
+
- .gitignore
|
300
|
+
- .rspec
|
301
|
+
- .travis.yml
|
282
302
|
- Gemfile
|
283
303
|
- LICENSE.txt
|
284
304
|
- README.md
|
@@ -331,17 +351,17 @@ require_paths:
|
|
331
351
|
- lib
|
332
352
|
required_ruby_version: !ruby/object:Gem::Requirement
|
333
353
|
requirements:
|
334
|
-
- -
|
354
|
+
- - '>='
|
335
355
|
- !ruby/object:Gem::Version
|
336
356
|
version: '0'
|
337
357
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
338
358
|
requirements:
|
339
|
-
- -
|
359
|
+
- - '>='
|
340
360
|
- !ruby/object:Gem::Version
|
341
361
|
version: '0'
|
342
362
|
requirements: []
|
343
363
|
rubyforge_project:
|
344
|
-
rubygems_version: 2.
|
364
|
+
rubygems_version: 2.0.14.1
|
345
365
|
signing_key:
|
346
366
|
specification_version: 4
|
347
367
|
summary: A tool for AWS CloudFormation.
|