class FlowdockBuildNotifier::NotificationMessage
Attributes
build[R]
Public Class Methods
new(build)
click to toggle source
# File lib/flowdock_build_notifier/notification_message.rb, line 4 def initialize(build) @build = build end
Public Instance Methods
branch()
click to toggle source
# File lib/flowdock_build_notifier/notification_message.rb, line 12 def branch " for branch #{build.branch}" if build.branch end
pass_status()
click to toggle source
# File lib/flowdock_build_notifier/notification_message.rb, line 24 def pass_status case build.name when /deploy/i "🚀 DEPLOYED" when /smoke/i "🚬 SMOKED" else "✅ PASSED" end end
status()
click to toggle source
# File lib/flowdock_build_notifier/notification_message.rb, line 16 def status { "SUCCESS" => "#{pass_status}", "FAILURE" => "❌ FAILED", "UNKNOWN" => "🚧 CANCELED", }[build.status] end
to_s()
click to toggle source
# File lib/flowdock_build_notifier/notification_message.rb, line 8 def to_s "#{status}: \"#{build.name}\" build#{branch} - #{build.url}" end