bora 0.9.4 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
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