Fix interacting with tools like ruby-debug. #137

Merged
merged 2 commits into from Sep 20, 2011

2 participants

@hron

It seems like the new interactor eats input from $stdin even while it is locked. This disallow using tools like 'ruby-debug' or 'pry' in specs or cucumber.

The fix just kills the interactor when it is locked and runs it again when ulocked.

@hron hron Fix interacting with tools like ruby-debug.
  It seems like the new interactor eats input from $stdin even while it locked.
  This disallow using tools like 'ruby-debug' or 'pry' in specs or cucumber.

  The fix just kills the interactor when it is locked and runs it again when
  ulocked.
443f57e
@hron

I've just realized that the interactor and listener does not work after my fix at all. ;) I will work further on this fix tomorrow.

@hron hron Change Guard::Interactor#lock and #unlock methods so they will lock i…
…nteractor

in the right thread and free $stdin [closes #137].
8c6a307
@hron

It works good for me now. Could someone take a look on this patch and apply it?

Thanks in advance!

@netzpirat netzpirat merged commit 8c6a307 into guard:master Sep 20, 2011
@netzpirat

There were two specs failing, but I fixed them and merged your pull request. You may want to consider to check the specs after changing some code. There's a Rake task that tests the codebase on all major Rubies:

rake spec:portability

The only dependency is to have RVM installed and Bundler in each Ruby.

But anyway, thanks for code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment