class RkRspec::Messages
Public Class Methods
console_message(text)
click to toggle source
# File lib/results_keeper_rspec/messages.rb, line 39 def console_message(text) private puts " Results Keeper: #{text}".blue unless ENV['HIDE_RK_MESSAGES'] == 'true' end
console_warning_message(text)
click to toggle source
# File lib/results_keeper_rspec/messages.rb, line 44 def console_warning_message(text) private puts " Results Keeper: #{text}".yellow unless ENV['HIDE_RK_MESSAGES'] == 'true' end
error_not_sent_scenario(amount)
click to toggle source
# File lib/results_keeper_rspec/messages.rb, line 17 def error_not_sent_scenario(amount) console_warning_message("Not sent scenarios amount: #{amount}") end
error_send_screenshot()
click to toggle source
# File lib/results_keeper_rspec/messages.rb, line 13 def error_send_screenshot console_warning_message("Could not send screenshot, there seems to be a problem with #{RkRspec::Config.config[:report_server_host]}:#{RkRspec::Config.config[:report_server_port]}") end
info_message_to_client(response, message_to_client=nil)
click to toggle source
# File lib/results_keeper_rspec/messages.rb, line 30 def info_message_to_client(response, message_to_client=nil) message_to_client ? console_message("#{message_to_client} - #{response.code} - #{response.message}") : console_message("#{response.code} - #{response.message}") end
info_trying_resend(scenario_name)
click to toggle source
INFO
# File lib/results_keeper_rspec/messages.rb, line 26 def info_trying_resend(scenario_name) console_message("Trying to re-send '#{scenario_name}' once more") end
no_secret_key()
click to toggle source
# File lib/results_keeper_rspec/messages.rb, line 21 def no_secret_key 'RK_SECRET_KEY env var not found. Please use export RK_SECRET_KEY=<your secret key> to set it.' end
take_screenshot_error()
click to toggle source
ERROR
# File lib/results_keeper_rspec/messages.rb, line 9 def take_screenshot_error console_warning_message('Could not take a screenshot :(') end
warn_problem_with_rk()
click to toggle source
WARN
# File lib/results_keeper_rspec/messages.rb, line 35 def warn_problem_with_rk console_warning_message("There seems to be a problem with #{RkRspec::Config.config[:report_server_host]}:#{RkRspec::Config.config[:report_server_port]}, make sure your RK_SECRET_KEY is correct and server is up.") end