kumogata 0.4.16 → 0.4.17

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: 16f21794bd4f613c8c5f3133c79d6e67cebb080a
4
- data.tar.gz: d95ccdfa1ff170a28a1adb035813fb653bd5af44
3
+ metadata.gz: d5f0d6857d6a041d6536eea743a194b8afdca4af
4
+ data.tar.gz: 6df7c7b58ea4c37a5c000ff702e3d4055ed74555
5
5
  SHA512:
6
- metadata.gz: 6acff55885a8c9a9628e843a35d7aae4454e6cc21323b23e2f772c277c879f1f699ebb9f31f58d9d5ae6ee2b0647ca97cc344a532c66e5a9d5ed699bf990101f
7
- data.tar.gz: 9bb83190ca997c3f8498b76edc2bf374b6a327b9000be5023dfbcd71c7b2c5d11610da53e899b1f7d4453ba26f74ec6de6e463802a2813812e83626223638c1d
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
- [![Gem Version](https://badge.fury.io/rb/kumogata.png?201406151300)](http://badge.fury.io/rb/kumogata)
9
- [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201406151300)](https://drone.io/github.com/winebarrel/kumogata/latest)
8
+ [![Gem Version](https://badge.fury.io/rb/kumogata.png?201406152020)](http://badge.fury.io/rb/kumogata)
9
+ [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201406152020)](https://drone.io/github.com/winebarrel/kumogata/latest)
10
10
 
11
11
  It can define a template in Ruby DSL, such as:
12
12
 
@@ -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
- open(path_or_url) do |f|
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)
@@ -1,3 +1,3 @@
1
1
  module Kumogata
2
- VERSION = '0.4.16'
2
+ VERSION = '0.4.17'
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.4.16
4
+ version: 0.4.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara