class Kuroko2::Workflow::Notifier::Concerns::ChatMessageBuilder

Public Class Methods

new(instance) click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 6
def initialize(instance)
  @instance   = instance
  @definition = instance.job_definition
end

Public Instance Methods

additional_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 39
def additional_text
  "Failed to execute '#{@definition.name}' #{@definition.hipchat_additional_text}"
end
back_to_normal_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 23
def back_to_normal_text
  "'#{@definition.name}' is back to normal"
end
failure_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 11
def failure_text
  "Failed to execute '#{@definition.name}'"
end
finished_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 15
def finished_text
  "Finished executing '#{@definition.name}'"
end
job_instance_path() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 43
def job_instance_path
  Kuroko2::Engine.routes.url_helpers.job_definition_job_instance_url(
    @definition,
    @instance,
    host: Kuroko2.config.url_host,
    protocol: Kuroko2.config.url_scheme,
  )
end
launched_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 19
def launched_text
  "Launched '#{@definition.name}'"
end
long_elapsed_time_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 35
def long_elapsed_time_text
  "The running time of '#{@definition.name}' is longer than expected."
end
retrying_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 27
def retrying_text
  "Retrying the current task in '#{@definition.name}'"
end
skipping_text() click to toggle source
# File lib/autoload/kuroko2/workflow/notifier/concerns/chat_message_builder.rb, line 31
def skipping_text
  "Skipping the current task in '#{@definition.name}'"
end