kumogata 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/kumogata/client.rb +4 -8
- data/lib/kumogata/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5248581d482c4b7cc0e5212ca1c10a6d4c9ddc99
|
4
|
+
data.tar.gz: 711312de91978fa07374b52999efe9a8f99bf35b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5fe11bedcbecc70503a7dab6e4427f41efa7599d2fa7ec6198c833c95afff7d7ad04ae4c2e63ed97f722af30b2a7ef64f2740634ef1077e742e8d6e56a4145e
|
7
|
+
data.tar.gz: 2811cfdd90af667f1245961e9182d770c38490063a28d18724d15bbdeaa5a2bc5cca0699915f3702a984690f958b1b9e1861a49dd6101a4b3a517b2a0ddd1396
|
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?201403122354)](http://badge.fury.io/rb/kumogata)
|
9
|
+
[![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403122354)](https://drone.io/github.com/winebarrel/kumogata/latest)
|
10
10
|
|
11
11
|
It can define a template in Ruby DSL, such as:
|
12
12
|
|
data/lib/kumogata/client.rb
CHANGED
@@ -39,11 +39,7 @@ class Kumogata::Client
|
|
39
39
|
|
40
40
|
def update(path_or_url, stack_name)
|
41
41
|
validate_stack_name(stack_name)
|
42
|
-
|
43
|
-
template = open(path_or_url) do |f|
|
44
|
-
evaluate_template(f)
|
45
|
-
end
|
46
|
-
|
42
|
+
template = open_template(path_or_url)
|
47
43
|
add_encryption_password(template)
|
48
44
|
|
49
45
|
outputs = update_stack(template, stack_name)
|
@@ -119,7 +115,7 @@ class Kumogata::Client
|
|
119
115
|
open(path_or_url) do |f|
|
120
116
|
case format
|
121
117
|
when :ruby
|
122
|
-
evaluate_template(f)
|
118
|
+
evaluate_template(f, path_or_url)
|
123
119
|
when :json
|
124
120
|
JSON.parse(f.read)
|
125
121
|
else
|
@@ -132,7 +128,7 @@ class Kumogata::Client
|
|
132
128
|
File.extname(path_or_url) == '.rb'
|
133
129
|
end
|
134
130
|
|
135
|
-
def evaluate_template(template)
|
131
|
+
def evaluate_template(template, path_or_url)
|
136
132
|
key_converter = proc do |key|
|
137
133
|
key = key.to_s
|
138
134
|
key.gsub!('__', '::') if @options.replace_underscore?
|
@@ -154,7 +150,7 @@ class Kumogata::Client
|
|
154
150
|
:scope_hook => proc {|scope|
|
155
151
|
define_template_func(scope, template.path)
|
156
152
|
},
|
157
|
-
:filename =>
|
153
|
+
:filename => path_or_url,
|
158
154
|
})
|
159
155
|
|
160
156
|
@post_processing.fetch!(template)
|
data/lib/kumogata/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -61,7 +61,7 @@ def eval_template(template, options = {})
|
|
61
61
|
template_ext = options[:template_ext] || '.rb'
|
62
62
|
|
63
63
|
template = tempfile(template, template_ext) do |f|
|
64
|
-
Kumogata::Client.new(kumogata_options).send(:evaluate_template, f)
|
64
|
+
Kumogata::Client.new(kumogata_options).send(:evaluate_template, f, f.path)
|
65
65
|
end
|
66
66
|
|
67
67
|
if options[:update_deletion_policy]
|