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