kumogata 0.4.16 → 0.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/kumogata/client.rb +8 -2
- data/lib/kumogata/version.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: d5f0d6857d6a041d6536eea743a194b8afdca4af
|
4
|
+
data.tar.gz: 6df7c7b58ea4c37a5c000ff702e3d4055ed74555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c117ae2daefe0e134745cd7d6e1a4f4ede6e3fb557c25407d5756f4383837596d5b67c96c57b88597579f94eadf31f58a105639771d3b6de5385d100beb0b2b
|
7
|
+
data.tar.gz: b3dff3cfdf600b6e0e76d4e153da977138acf0e0c05faf17e856e675e071a57d03efb121897e4bc3dff0dcbff9ce6eec2bded483e521fb1272cc87df7a4b4079
|
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
|
-
[](http://badge.fury.io/rb/kumogata)
|
9
|
+
[](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
@@ -36,7 +36,7 @@ class Kumogata::Client
|
|
36
36
|
output_format = @options.output_format
|
37
37
|
|
38
38
|
unless output_format
|
39
|
-
output_format = case guess_format(path_or_url)
|
39
|
+
output_format = case @options.format || guess_format(path_or_url)
|
40
40
|
when :ruby then :json
|
41
41
|
when :json then :ruby
|
42
42
|
when :yaml then :json
|
@@ -154,7 +154,7 @@ class Kumogata::Client
|
|
154
154
|
def open_template(path_or_url)
|
155
155
|
format = @options.format || guess_format(path_or_url)
|
156
156
|
|
157
|
-
|
157
|
+
block = proc do |f|
|
158
158
|
case format
|
159
159
|
when :ruby
|
160
160
|
evaluate_template(f, path_or_url)
|
@@ -167,6 +167,12 @@ class Kumogata::Client
|
|
167
167
|
raise "Unknown format: #{format}"
|
168
168
|
end
|
169
169
|
end
|
170
|
+
|
171
|
+
if path_or_url == '-'
|
172
|
+
block.call($stdin)
|
173
|
+
else
|
174
|
+
open(path_or_url, &block)
|
175
|
+
end
|
170
176
|
end
|
171
177
|
|
172
178
|
def guess_format(path_or_url)
|
data/lib/kumogata/version.rb
CHANGED