bora 0.9.4 → 1.0.0.beta1

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.
data/lib/bora/status.rb DELETED
@@ -1,41 +0,0 @@
1
- require 'colorize'
2
-
3
- module Bora
4
- class Status
5
- def initialize(status)
6
- @status = status
7
- end
8
-
9
- def success?
10
- @status.end_with?("_COMPLETE") && !@status.include?("ROLLBACK")
11
- end
12
-
13
- def failure?
14
- @status.end_with?("_FAILED") || @status.include?("ROLLBACK")
15
- end
16
-
17
- def deleted?
18
- @status == "DELETE_COMPLETE"
19
- end
20
-
21
- def complete?
22
- success? || failure?
23
- end
24
-
25
- def to_s
26
- @status.colorize(color)
27
- end
28
-
29
-
30
- private
31
-
32
- def color
33
- case
34
- when success?; :green
35
- when failure?; :red
36
- else; :yellow;
37
- end
38
- end
39
-
40
- end
41
- end