Class: Fastlane::Plugin::GitHubStatus::UI
- Inherits:
-
Object
- Object
- Fastlane::Plugin::GitHubStatus::UI
- Defined in:
- lib/fastlane/plugin/github_status/ui.rb
Constant Summary collapse
- FastlaneUI =
FastlaneCore::UI
- STATUS_TO_COLOR =
{ 'good' => :green, 'minor' => :yellow, 'major' => :red }.freeze
Instance Method Summary collapse
- #colorize_for_status(status, message) ⇒ Object
- #print_message(message) ⇒ Object
- #status_statement(message) ⇒ Object
Instance Method Details
#colorize_for_status(status, message) ⇒ Object
25 26 27 28 |
# File 'lib/fastlane/plugin/github_status/ui.rb', line 25 def colorize_for_status(status, ) color = STATUS_TO_COLOR[status] .send(color) if color end |
#print_message(message) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/fastlane/plugin/github_status/ui.rb', line 13 def () FastlaneUI. '🐙 🐱' FastlaneUI. "GitHub status is: #{status_statement()}" FastlaneUI. "Last updated: #{.created_on}" FastlaneUI. '🐙 🐱' end |
#status_statement(message) ⇒ Object
20 21 22 23 |
# File 'lib/fastlane/plugin/github_status/ui.rb', line 20 def status_statement() status = .status colorize_for_status(status, "#{status.upcase} - #{.body}") end |