cfnpp 0.3.10 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/cfnpp +18 -13
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1849881fcdeade8b6d991264ad57f525a9f5148
4
- data.tar.gz: 544c5e51a1f12d2d13394049cc143aac24b8fdf4
3
+ metadata.gz: 3227584ca669cfd86d82826c6076d97568072e0b
4
+ data.tar.gz: 30c93a47542e4cf47a6f8cbd9be75b5284389759
5
5
  SHA512:
6
- metadata.gz: 39496951e33f2d3a3fdafb4f00bc2403542b66dda85a0d9909209616b3f96fcd8785395d52410a7856b1cc250947c6ed62a5fdfb2b7bb7799bbac3b468dc1f29
7
- data.tar.gz: bb9462117164f3810685d7ddc95b361814b83572f8927b43b121657857185712df560014d58da284bd10788b9e96fc5ed9018a3b121d92e2500cf8ca3225181e
6
+ metadata.gz: cbf84adbba4c63182a32232473aac8c9eca565432d33640f7a9dd26b5b2836c22d746cc9361bdba583661cae2b4b74018747a5b3b8cce0599bbbac8c1322fa2e
7
+ data.tar.gz: 8a6c0ee958d52cb26a8e527c6a20ce43847c899a055f9e2ed318110ea56c046fb87175eaf796aa0b44cf3bbf796a013ea03623d45e1a63720ddfcf6b952f1e62
data/bin/cfnpp CHANGED
@@ -52,6 +52,9 @@ eot
52
52
  opts.on('-c', '--conf PATH', 'use PATH instead of $basepath/conf/$environment_type for conf file') do |confpath|
53
53
  cli_opts[:confpath] = confpath
54
54
  end
55
+ opts.on('-w', '--watch', 'after update, print stack events every 10 seconds') do |watch|
56
+ cli_opts[:watch] = watch
57
+ end
55
58
  opts.on('--git-revision-check', "skip update when the stack's current revision matches the new revision") do |revision|
56
59
  cli_opts[:git_revision_check] = revision
57
60
  end
@@ -241,7 +244,7 @@ eot
241
244
  :capabilities => ['CAPABILITY_IAM'])
242
245
  end
243
246
 
244
- after_update(stack, timestamp)
247
+ after_update(stack, timestamp, cli_opts)
245
248
  end
246
249
 
247
250
  def do_upload(uploader, template_result, opts)
@@ -273,23 +276,25 @@ def do_upload(uploader, template_result, opts)
273
276
 
274
277
  end
275
278
 
276
- def after_update(stack, timestamp)
279
+ def after_update(stack, timestamp, cli_opts)
277
280
  #cmd = "watch -n 10 cfn-describe-stack-events #{stack_name}"
278
281
  #cmd = "watch -n 10 bin/get_stack_events.rb #{stack_name}"
279
282
  #puts cmd
280
- if STDIN.tty? && STDOUT.tty?
281
- puts "STDIN and STDOUT are ttys!"
282
- stuff = CfnTools.new( stack.name)
283
- while true
284
- begin
285
- stuff.display_stack_events
286
- sleep 10
287
- rescue SystemExit, Interrupt
288
- exit 0
283
+ if cli_opts[:watch]
284
+ if STDIN.tty? && STDOUT.tty?
285
+ puts "STDIN and STDOUT are ttys!"
286
+ stuff = CfnTools.new( stack.name)
287
+ while true
288
+ begin
289
+ stuff.display_stack_events
290
+ sleep 10
291
+ rescue SystemExit, Interrupt
292
+ exit 0
293
+ end
289
294
  end
295
+ else
296
+ puts "done updating"
290
297
  end
291
- else
292
- puts "done updating"
293
298
  end
294
299
 
295
300
  # This is all working, tested code, just not sure it belongs here. --stsmith
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfnpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bruce