kumogata 0.2.13 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjUxM2NjNThmOTI1OTdlMmNlZTAyNjg5NzAwMjg4ZTViYzU5Mjk5NA==
4
+ NTRiNjQ5NzgzNjlhMDIzZDI2NzE4NTA0OWE2NjU4MjdlODBhNDkxMA==
5
5
  data.tar.gz: !binary |-
6
- ZmNlYWU3YTg2YjBkZDhkNzBkYTZmZTEyYzlhNzI2ZmJkMjU1NDQ0Zg==
6
+ ZWM4Y2MxOWU0ZjMxMDkzMTQ3OGY2MTcyNmRkNzJjODA5MDgzYjNiYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjcxOGQxMjBmYTc2MTEwYjk0ZDMxNjgwMmNhNGNlMjJkYWI1YzE5YzRjNzlm
10
- MDE1OTUwYTliZmM2NTcyNGMyYmM1MmExYjI2OTZkYzNiMThjYWRjMTMzMTNm
11
- YzNmMWQ4ODRiNTliMDI5ZDI4OTQzOTk0ZjFjZmYzZWJkYWU1MTQ=
9
+ NTdkNmUzNGIxNzBiNDA0N2NjZDcxODkzY2I0NzZmYWQ1NmM2Zjc2MTUzN2Uy
10
+ ZWEwMzA0NjFjODg3MzdmZjc0ZWYyYTFjNDUzNWM4NjAxYzE3ZTU2YTc2MzBl
11
+ MTYwOTg1NTUxZjdmMjQ1ZTE2YWI5Y2IyZThhYTc1Y2MzZGM1Y2I=
12
12
  data.tar.gz: !binary |-
13
- YmU1MzdmMGE3YTYyMzE3NzJhZjhjYjYwYzY0MGQzYjIzNjM0MzY4YTAxYzVj
14
- NjAzY2MwNDFhNGVlNGFjODY1YjQ0MzM2N2ZhMjAzMmFkMjNmY2I2YmJjZmY0
15
- Y2QzYjk0NzY1ZTBhYTM2ODY1ZTM3MzBiYjM2ZWZlNmYzZjQ3ZDk=
13
+ YzdjMGE2NDEwOThiYjA2MWZkMjJlMDkxNjNiYTQxYTcxY2QzYTBmNTk3Nzg4
14
+ MWRlZmE5MGQzYzFiMGQwOGRiNTBkNTU5ZGEyM2JiMjNmNGEzNDIxNDQ1MjY3
15
+ MzhjMTY3MmEwOWQ0NGM5MmI2ZWUwN2ZhYjFhODdlYzc1NjhjMjQ=
data/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
 
6
6
  Kumogata is a tool for [AWS CloudFormation](https://aws.amazon.com/cloudformation/).
7
7
 
8
- [![Gem Version](https://badge.fury.io/rb/kumogata.png?201403072000)](http://badge.fury.io/rb/kumogata)
9
- [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403072000)](https://drone.io/github.com/winebarrel/kumogata/latest)
8
+ [![Gem Version](https://badge.fury.io/rb/kumogata.png?201403072016)](http://badge.fury.io/rb/kumogata)
9
+ [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403072016)](https://drone.io/github.com/winebarrel/kumogata/latest)
10
10
 
11
11
  It can define a template in Ruby DSL, such as:
12
12
 
@@ -215,7 +215,9 @@ end
215
215
 
216
216
  * Command line
217
217
 
218
- $ kumogata create template.rb -e 'Password1,Password2' -p 'Param1=xxx,Param2=xxx,Password1=xxx,Password2=xxx'
218
+ ```
219
+ $ kumogata create template.rb -e 'Password1,Password2' -p 'Param1=xxx,Param2=xxx,Password1=xxx,Password2=xxx'
220
+ ```
219
221
 
220
222
  * Template
221
223
 
@@ -248,7 +250,7 @@ Resources do
248
250
  commands do
249
251
  any_command do
250
252
  command (<<-EOS).fn_join
251
- ENCRYPTION_PASSWORD="`echo <%= Ref Kumogata::ENCRYPTION_PASSWORD %> | base64 -d`"
253
+ ENCRYPTION_PASSWORD="`echo '<%= Ref Kumogata::ENCRYPTION_PASSWORD %>' | base64 -d`"
252
254
 
253
255
  # Decrypt Password1
254
256
  echo '<%= Ref "Password1" %>' | base64 -d | openssl enc -d -aes256 -pass pass:"$ENCRYPTION_PASSWORD" > password1
@@ -18,6 +18,7 @@ class Kumogata::Client
18
18
 
19
19
  def validate(path_or_url)
20
20
  template = open_template(path_or_url)
21
+ add_encryption_password_for_validation(template)
21
22
  validate_template(template)
22
23
  nil
23
24
  end
@@ -372,6 +373,15 @@ class Kumogata::Client
372
373
  end
373
374
  end
374
375
 
376
+ def add_encryption_password_for_validation(template)
377
+ template['Parameters'] ||= {}
378
+
379
+ template['Parameters'][Kumogata::ENCRYPTION_PASSWORD] ||= {
380
+ 'Type' => 'String',
381
+ 'Default' => "(#{Kumogata::ENCRYPTION_PASSWORD})",
382
+ }
383
+ end
384
+
375
385
  def validate_template(template)
376
386
  result = @cloud_formation.validate_template(template.to_json)
377
387
 
@@ -1,3 +1,3 @@
1
1
  module Kumogata
2
- VERSION = '0.2.13'
2
+ VERSION = '0.2.14'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara