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 +8 -8
- data/README.md +6 -4
- data/lib/kumogata/client.rb +10 -0
- data/lib/kumogata/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTRiNjQ5NzgzNjlhMDIzZDI2NzE4NTA0OWE2NjU4MjdlODBhNDkxMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWM4Y2MxOWU0ZjMxMDkzMTQ3OGY2MTcyNmRkNzJjODA5MDgzYjNiYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTdkNmUzNGIxNzBiNDA0N2NjZDcxODkzY2I0NzZmYWQ1NmM2Zjc2MTUzN2Uy
|
10
|
+
ZWEwMzA0NjFjODg3MzdmZjc0ZWYyYTFjNDUzNWM4NjAxYzE3ZTU2YTc2MzBl
|
11
|
+
MTYwOTg1NTUxZjdmMjQ1ZTE2YWI5Y2IyZThhYTc1Y2MzZGM1Y2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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?
|
9
|
-
[![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?
|
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
|
-
|
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
|
data/lib/kumogata/client.rb
CHANGED
@@ -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
|
|
data/lib/kumogata/version.rb
CHANGED