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
- #abort!(text) ⇒ Object
- #colorize_for_status(status, message) ⇒ Object
- #print_message(message) ⇒ Object
- #status_statement(message) ⇒ Object
Instance Method Details
#abort!(text) ⇒ Object
20 21 22 |
# File 'lib/fastlane/plugin/github_status/ui.rb', line 20 def abort!(text) FastlaneUI.user_error!(text) end |
#colorize_for_status(status, message) ⇒ Object
29 30 31 32 |
# File 'lib/fastlane/plugin/github_status/ui.rb', line 29 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(message)}" FastlaneUI. "Last updated: #{message.created_on}" FastlaneUI. '🐙 🐱' end |
#status_statement(message) ⇒ Object
24 25 26 27 |
# File 'lib/fastlane/plugin/github_status/ui.rb', line 24 def status_statement() status = .status colorize_for_status(status, "#{status.upcase} - #{message.body}") end |