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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f8f5c3adbd22698119c42ffcb9864f11d284ca8
4
- data.tar.gz: 170ec529a9b83979bed211fa9c56e7dfc640022c
3
+ metadata.gz: 5248581d482c4b7cc0e5212ca1c10a6d4c9ddc99
4
+ data.tar.gz: 711312de91978fa07374b52999efe9a8f99bf35b
5
5
  SHA512:
6
- metadata.gz: aa6a1443184c5f44b79b54213828a97b78f32d5a668337d1c0282e4bd18490b21b5a54d2843f93768a07840ec9506913dd2f9621a14ab4cfbb8fb2f171377515
7
- data.tar.gz: ecbfb98d07bd4b716fe1cba9b5697f0188c299c4233987bf9c033c01ebeb978258aff415e932dc2a9eea04b5314b19627d036cace2498c266c642b8a115c1e65
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?201403122152)](http://badge.fury.io/rb/kumogata)
9
- [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403122152)](https://drone.io/github.com/winebarrel/kumogata/latest)
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
 
@@ -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 => template.path,
153
+ :filename => path_or_url,
158
154
  })
159
155
 
160
156
  @post_processing.fetch!(template)
@@ -1,3 +1,3 @@
1
1
  module Kumogata
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
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]
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.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara