cfn-status 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/cfn_status/version.rb +1 -1
- data/lib/cfn_status.rb +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 975ea93b5a85d6e7bea9735b5bb8492bc309c396c3d01e2f47346dfd721db5b6
|
4
|
+
data.tar.gz: f99a9171471210c946a160e4913131f8f9e7ebca64b661d5447eec401b342a46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38d05b5f5f29311d8ac505be290a806709d18dd1c8e22a583520fd2c7625f4f5b4051528b836693d3201d4ffbc3d66ef7c8f8d47222d2e493c89dd36d774a102
|
7
|
+
data.tar.gz: '01169cdf8c3b40b2a3e435cefb64ad8a2bac2e418ad311b92b9ce7ccec82e1d110877fab3c45ed36aba4c6a5b8ca2ec318025a3d55aed5031f6e05d5dfaf66eb'
|
data/CHANGELOG.md
CHANGED
@@ -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.6.1] - 2024-04-27
|
7
|
+
- [#9](https://github.com/tongueroo/cfn-status/pull/9) quiet logging
|
8
|
+
|
6
9
|
## [0.6.0] - 2024-04-15
|
7
10
|
- [#8](https://github.com/tongueroo/cfn-status/pull/8) Fix success return
|
8
11
|
- fix success after delete
|
data/lib/cfn_status/version.rb
CHANGED
data/lib/cfn_status.rb
CHANGED
@@ -50,22 +50,22 @@ class CfnStatus
|
|
50
50
|
end
|
51
51
|
|
52
52
|
# check for /(_COMPLETE|_FAILED)$/ status
|
53
|
-
def wait
|
53
|
+
def wait(quiet: false)
|
54
54
|
# Check for in progress again in case .wait is called from other libraries like s3-antivirus
|
55
55
|
# Showing the event messages when will show old messages which can be confusing.
|
56
56
|
return success? unless in_progress?
|
57
57
|
|
58
|
-
puts "Waiting for stack to complete"
|
58
|
+
puts "Waiting for stack to complete" unless quiet
|
59
59
|
start_time = Time.now
|
60
60
|
|
61
61
|
refresh_events
|
62
62
|
until completed? || @stack_deletion_completed
|
63
|
-
show_events(final: false)
|
63
|
+
show_events(final: false, quiet: quiet)
|
64
64
|
end
|
65
|
-
show_events(final: true) # show the final event
|
65
|
+
show_events(final: true, quiet: quiet) # show the final event
|
66
66
|
|
67
67
|
if @stack_deletion_completed
|
68
|
-
puts "Stack #{@stack_name} deleted."
|
68
|
+
puts "Stack #{@stack_name} deleted." unless quiet
|
69
69
|
show_took(start_time)
|
70
70
|
# Cant use success? because the stack is deleted and the describe stack errors
|
71
71
|
# For deletion, always return true once describe_stack fails to return the stack
|
@@ -81,7 +81,7 @@ class CfnStatus
|
|
81
81
|
elsif /_ROLLBACK_/.match?(last_event_status)
|
82
82
|
puts "Stack rolled back: #{last_event_status}".color(:red)
|
83
83
|
else # success
|
84
|
-
puts "Stack success status: #{last_event_status}"
|
84
|
+
puts "Stack success status: #{last_event_status}" unless quiet
|
85
85
|
end
|
86
86
|
|
87
87
|
show_took(start_time)
|
@@ -107,14 +107,14 @@ class CfnStatus
|
|
107
107
|
end
|
108
108
|
|
109
109
|
# Only shows new events
|
110
|
-
def show_events(final: false)
|
110
|
+
def show_events(final: false, quiet: false)
|
111
111
|
if @last_shown_event_id.nil?
|
112
112
|
i = start_index
|
113
|
-
print_events(i)
|
113
|
+
print_events(i) unless quiet
|
114
114
|
else
|
115
115
|
i = last_shown_index
|
116
116
|
# puts "last_shown index #{i}"
|
117
|
-
print_events(i - 1) unless i == 0
|
117
|
+
print_events(i - 1) unless i == 0 || quiet
|
118
118
|
end
|
119
119
|
|
120
120
|
return if final
|
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.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-cloudformation
|