2017-10-16 08:37:53 +00:00
|
|
|
require 'io/console'
|
|
|
|
|
|
|
|
module LiveDebugger
|
|
|
|
def live_debug
|
2017-10-17 15:42:21 +00:00
|
|
|
puts "\nCurrent example is paused for live debugging."
|
|
|
|
puts "Opening #{current_url} in your default browser..."
|
2017-10-16 08:37:53 +00:00
|
|
|
puts "The current user credentials are: #{@current_user.username} / 12345678" if @current_user
|
2017-10-26 16:03:33 +00:00
|
|
|
puts "Press any key to resume the execution of the example!!"
|
2017-10-16 08:37:53 +00:00
|
|
|
|
2017-10-17 15:42:21 +00:00
|
|
|
`open #{current_url}`
|
|
|
|
|
2017-10-26 16:03:33 +00:00
|
|
|
loop until $stdin.getch
|
2017-10-17 15:42:21 +00:00
|
|
|
|
2017-10-16 08:37:53 +00:00
|
|
|
puts "Back to the example!"
|
|
|
|
end
|
|
|
|
end
|