kumogata 0.2.15 → 0.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmI3MThkOWFjMTgxNDA2YzI3ZjQ5NzU1NjZkMmUyNmFjOWI3MWMyOQ==
4
+ MDQ0MTViMDk1ZDc4Y2ZjODcxOTEwYzk3MWNjYmY2MjFiN2JkODFjMA==
5
5
  data.tar.gz: !binary |-
6
- NTNhYjcwN2YxYzUzNzM1OWVlYzBlOWM3NjUxOThkNzg0M2I5ZTMwZg==
6
+ ZjVkMDk2NThiY2RmNzRiYWNmZjY4MGExMzA1MWUzZGQ5YTA2YWE3Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjIyZTkwYmNhZDFhMDJhYTdiMmIxMjIwZjcwYzZmYzgxYmE2NWYxYmE2NmYy
10
- YmExNmRjMWE1NjhiMzEwNjFlOTU4MjQ5OTJkN2NkNTE4ZmJjNjI5N2FkM2Yx
11
- MjFjZDRiNWRjNDhlNTZhZGE3YzRiMTdkODdmNTM4ODhiZDEzNWM=
9
+ NzRkMmMyNmE3MTg5M2Y3NTg4MzdlYmI2M2M2YmM2NmRhOGJjYTA1ZTEwMzk5
10
+ MmM5MDFiM2IwZGY4ODJkM2E0MTYxNzZjMzUwOWEwMmJhN2U1YTU1NTU3YzNk
11
+ NjU1ZjMzOTI2MjQ5MDA5OTcwMzA2MmZkZmNlZDM1OWJkMjRhZTc=
12
12
  data.tar.gz: !binary |-
13
- YmQwMTlmNGU5YjAwNGI1ZWJiNGIzZjgyMWNlOWViMTgzMmRhZDY1NjNmYjVj
14
- ZjdiN2Q5NGY3ODMzYTMxYjEwMGU4M2Y4ZWM0MDYwMzNmNWVmN2Q4MjMwZWQx
15
- NzQwYmE1NWJhNmVmYzgxOWI2MDZjYWQ4MzI2Y2NlYjdhZGMwOGE=
13
+ ZjdhM2E2OGVlOTg0NWFlYTY5ZTM1OGJiM2Q1YzMzNzllM2JiYTE1Mzg5NWRj
14
+ YTQxMTI4OGZkMWU1ZjZkMjAxNzI3NmMyYzRjODQwMjk3ZmQwNmMxZjdkNGRm
15
+ MmY0MDZiNzJkNGUyNDdlNzZiYzY1ZjllODE0NjMxYmU0YjJmMmY=
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?201403072151)](http://badge.fury.io/rb/kumogata)
9
- [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403072151)](https://drone.io/github.com/winebarrel/kumogata/latest)
8
+ [![Gem Version](https://badge.fury.io/rb/kumogata.png?201403072229)](http://badge.fury.io/rb/kumogata)
9
+ [![Build Status](https://drone.io/github.com/winebarrel/kumogata/status.png?201403072229)](https://drone.io/github.com/winebarrel/kumogata/latest)
10
10
 
11
11
  It can define a template in Ruby DSL, such as:
12
12
 
@@ -120,9 +120,7 @@ class Kumogata::ArgumentParser
120
120
  yield(opt, command, arguments, options)
121
121
  end
122
122
 
123
- if options.parameters?
124
- update_parameters(options)
125
- end
123
+ update_parameters(options)
126
124
  rescue => e
127
125
  $stderr.puts("#{e.message}")
128
126
  raise e if options[:debug]
@@ -183,7 +181,7 @@ class Kumogata::ArgumentParser
183
181
  passwd = options.encryption_password || Kumogata::Crypt.mkpasswd(16)
184
182
  enc_params = options.encrypt_parameters
185
183
 
186
- options.parameters.each do |i|
184
+ (options.parameters || []).each do |i|
187
185
  key, value = i.split('=', 2)
188
186
 
189
187
  if enc_params and (enc_params.include?('*') or enc_params.include?(key))
@@ -194,6 +192,7 @@ class Kumogata::ArgumentParser
194
192
  end
195
193
 
196
194
  options.parameters = parameters
195
+ $parameters = options.parameters
197
196
 
198
197
  if options.encrypt_parameters? and not options.skip_send_password?
199
198
  options.parameters[Kumogata::ENCRYPTION_PASSWORD] = passwd.encode64
@@ -343,7 +343,7 @@ class Kumogata::Client
343
343
  end
344
344
 
345
345
  def add_parameters(hash)
346
- if @options.parameters?
346
+ if @options.parameters? and not @options.parameters.empty?
347
347
  parameters = {}
348
348
 
349
349
  @options.parameters.each do |key, value|
@@ -1,3 +1,3 @@
1
1
  module Kumogata
2
- VERSION = '0.2.15'
2
+ VERSION = '0.2.16'
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.2.15
4
+ version: 0.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara