Module: FunCi::Tui::AnimationFrames
- Defined in:
- lib/fun_ci/tui/animation_frames.rb
Constant Summary collapse
Class Method Summary collapse
- .failure_footer(stage_name, width) ⇒ Object
- .failure_header(width) ⇒ Object
- .failure_particles ⇒ Object
- .stage_pass_colors ⇒ Object
- .success_footer(width) ⇒ Object
- .success_header(width) ⇒ Object
- .timeout_colors ⇒ Object
- .timeout_header(width) ⇒ Object
Class Method Details
.failure_footer(stage_name, width) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 36 def self.(stage_name, width) up = stage_name.upcase down = stage_name.downcase hold [ nil, center("\e[1;31m>>> #{up} FAILED <<<#{RESET}", ">>> #{up} FAILED <<<", width), center("\e[31m>> #{down} failed <<#{RESET}", ">> #{down} failed <<", width), center("\e[2;31m> #{down} failed <#{RESET}", "> #{down} failed <", width), nil ] end |
.failure_header(width) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 23 def self.failure_header(width) boom = "BOOM" [ nil, (boom, width, "\e[48;5;124m", particles: "* "), (boom, width, "\e[48;5;166m", particles: "* * "), (boom, width, "\e[48;5;52m", particles: ". * * "), (boom, width, "\e[48;5;236m", particles: "' . * "), (boom, width, "\e[48;5;236m", particles: ". "), nil ] end |
.failure_particles ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 11 def self.failure_particles [ { chars: "*", color: "\e[1;31m" }, { chars: ".*", color: "\e[1;31m" }, { chars: ".+*.", color: "\e[38;5;208m" }, { chars: "*.+'", color: "\e[38;5;208m" }, { chars: "' .", color: "\e[38;5;52m" }, { chars: ".", color: "\e[38;5;52m" }, { chars: "", color: "" } ] end |
.stage_pass_colors ⇒ Object
81 82 83 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 81 def self.stage_pass_colors ["\e[1;33m", "\e[1;32m", "\e[32m"] end |
.success_footer(width) ⇒ Object
62 63 64 65 66 67 68 69 70 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 62 def self.(width) hold [ nil, center("\e[1;32m* * * NICE! * * *#{RESET}", "* * * NICE! * * *", width), center("\e[32m. + . * NICE! * . + .#{RESET}", ". + . * NICE! * . + .", width), center("\e[2;32m' . + . nice . + . '#{RESET}", "' . + . nice . + . '", width), nil ] end |
.success_header(width) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 48 def self.success_header(width) text = "ALL PASSED" [ nil, (text, width, "\e[48;5;22m", particles: ""), (text, width, "\e[48;5;22m", particles: "* * "), (text, width, "\e[48;5;22m", particles: "* . . "), (text, width, "\e[48;5;58m", particles: ". ' ' "), (text, width, "\e[48;5;22m", particles: "' "), (text, width, "\e[48;5;22m", particles: ""), nil ] end |
.timeout_colors ⇒ Object
85 86 87 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 85 def self.timeout_colors ["\e[1;33m", "\e[33m", "\e[1;33m", "\e[33m"] end |
.timeout_header(width) ⇒ Object
72 73 74 75 76 77 78 79 |
# File 'lib/fun_ci/tui/animation_frames.rb', line 72 def self.timeout_header(width) [ nil, ("TIMED OUT", width, "\e[48;5;58m", particles: ""), ("timed out", width, "\e[48;5;58m", particles: ""), nil ] end |