lib/guard/interactor.rb
def start
      return if ENV["GUARD_ENV"] == 'test'

      Thread.new do
        loop do
          if (entry = $stdin.gets) && !@locked
            entry.gsub! /\n/, ''
            case entry
            when 'stop', 'quit', 'exit', 's', 'q', 'e'
              ::Guard.stop
            when 'reload', 'r', 'z'
              ::Guard.reload
            when 'pause', 'p'
              ::Guard.pause
            else
              ::Guard.run_all
            end
          end
        end
      end
    end
# Start the interactor in a own thread.
#
Start the interactor in a own thread.
Start the interactor in a own thread .
def start
      return if ENV["GUARD_ENV"] == 'test'
      Thread.new do
        loop do
          if (entry = $stdin.gets) && !@locked
            entry.gsub! /\n/, ''
            case entry
            when 'stop', 'quit', 'exit', 's', 'q', 'e'
              ::Guard.stop
            when 'reload', 'r', 'z'
              ::Guard.reload
            when 'pause', 'p'
              ::Guard.pause
            else
              ::Guard.run_all
            end
          end
        end
      end
    end
def start return if ENV [ "GUARD_ENV" ] == 'test' Thread . new do loop do if ( entry = $stdin . gets ) && ! @locked entry . gsub! / \n / , '' case entry when 'stop' , 'quit' , 'exit' , 's' , 'q' , 'e' :: Guard . stop when 'reload' , 'r' , 'z' :: Guard . reload when 'pause' , 'p' :: Guard . pause else :: Guard . run_all end end end end end
Start the interactor in a own thread.
Start the interactor in a own thread .