cfn-status 0.4.1 → 0.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b5779a34350074951fd6e52df7e72dbd1d78a291bcd394ab04ef4e85101d4c2
4
- data.tar.gz: 104e5f8f7665e2f42c26c8f60d65ac2027022c883f622134abb815b59195c955
3
+ metadata.gz: 8cfa3f286eb58e4b6178a1e5b91ae3ad1377c938e431afec5c62604ade1ae690
4
+ data.tar.gz: 8726add33467c6fa4f27297579f59e1daa392ea39ebdeed2141bd457c3ea990b
5
5
  SHA512:
6
- metadata.gz: 76c29de282df67688889e29cec71240ae37fdbbd19cc581067761b0c8d73757f76929db1bc5900eee52cd844b72e5b44a1b4566d1584a2a802ed98bd9ca81151
7
- data.tar.gz: 65e8894d61f52ae4fd19ee1801301fbc8934f6cab0cd7c875b586693dda423a33b3f2447fa9813675fbc17511f544f78c73166f0655293b90a259056521e5f7a
6
+ metadata.gz: 9e320d27a72fb9c8b644443ae7774ea3c8d0c8862905a2ac75b405fc02e82c2d02c801c78b5602ce311bb8706ffc436f34a98fcdc7f445dc31c57edfc8649134
7
+ data.tar.gz: 25feec8075d4575ddec75f57531790a634b57e1bfce690e61cb24882505d390051a53f4304b19a0d7eb0096a975284c29aefa17bae41d62632e569de30ec9e5b
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely* adheres to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.4.2]
7
+ - #3 improve messaging when wait called directly. dont show old events.
8
+
6
9
  ## [0.4.1]
7
10
  - fix require cfn_status/rollback_stack
8
11
 
@@ -21,11 +21,8 @@ class CfnStatus
21
21
  return true
22
22
  end
23
23
 
24
- resp = cfn.describe_stacks(stack_name: @stack_name)
25
- stack = resp.stacks.first
26
-
27
24
  puts "The current status for the stack #{@stack_name.color(:green)} is #{stack.stack_status.color(:green)}"
28
- if stack.stack_status =~ /_IN_PROGRESS$/
25
+ if in_progress?
29
26
  puts "Stack events (tailing):"
30
27
  # tail all events until done
31
28
  @hide_time_took = true
@@ -39,6 +36,13 @@ class CfnStatus
39
36
  success?
40
37
  end
41
38
 
39
+ def in_progress?
40
+ resp = cfn.describe_stacks(stack_name: @stack_name)
41
+ stack = resp.stacks.first
42
+ in_progress = stack.stack_status =~ /_IN_PROGRESS$/
43
+ !!in_progress
44
+ end
45
+
42
46
  def reset
43
47
  @events = [] # constantly replaced with recent events
44
48
  @last_shown_event_id = nil
@@ -47,6 +51,10 @@ class CfnStatus
47
51
 
48
52
  # check for /(_COMPLETE|_FAILED)$/ status
49
53
  def wait
54
+ # Check for in progress again in case .wait is called from other libraries like s3-antivirus
55
+ # Showing the event messages when will show old messages which can be confusing.
56
+ return unless in_progress?
57
+
50
58
  puts "Waiting for stack to complete"
51
59
  start_time = Time.now
52
60
 
@@ -1,3 +1,3 @@
1
1
  class CfnStatus
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfn-status
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
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2020-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-cloudformation