diff --git a/Gemfile.lock b/Gemfile.lock index 0f874e01..b399217c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,8 @@ PATH remote: . specs: - retest (1.12.0) - listen (~> 3.2) + retest (1.13.0) + listen (~> 3.9) string-similarity (~> 2.1) tty-option (~> 0.1) @@ -11,7 +11,7 @@ GEM specs: byebug (11.1.3) ffi (1.16.3) - listen (3.8.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) minitest (5.15.0) diff --git a/lib/config/listen.rb b/lib/config/listen.rb deleted file mode 100644 index 1f4d58fc..00000000 --- a/lib/config/listen.rb +++ /dev/null @@ -1,29 +0,0 @@ -# lib/config/listen.rb:4: warning: method redefined; discarding old _fail -# ~/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/listen-3.8.0/lib/listen/record/symlink_detector.rb:35: warning: previous definition of _fail was here - -# Runs a block of code without warnings. -def silence_warnings(&block) - warn_level = $VERBOSE - $VERBOSE = nil - result = block.call - $VERBOSE = warn_level - result -end - -silence_warnings do - - # TODO: Update monkey patch when decision is made about - # https://github.com/guard/listen/issues/572 - - module Listen - class Record - class SymlinkDetector - def _fail(symlinked, real_path) - Listen.logger.warn(format(SYMLINK_LOOP_ERROR, symlinked, real_path)) - raise Error, "Don't watch locally-symlinked directory twice" - end - end - end - end - -end diff --git a/lib/retest.rb b/lib/retest.rb index 83a20069..5045bac2 100644 --- a/lib/retest.rb +++ b/lib/retest.rb @@ -1,5 +1,4 @@ require 'listen' -require 'config/listen' require 'string/similarity' require 'observer' @@ -17,6 +16,8 @@ require "retest/prompt" require "retest/sounds" +Listen.adapter_warn_behavior = :log + module Retest class Error < StandardError; end diff --git a/retest.gemspec b/retest.gemspec index 3b0260b8..e73db7c2 100644 --- a/retest.gemspec +++ b/retest.gemspec @@ -26,6 +26,6 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_runtime_dependency "string-similarity", ["~> 2.1"] - spec.add_runtime_dependency "listen", ["~> 3.2"] + spec.add_runtime_dependency "listen", ["~> 3.9"] spec.add_runtime_dependency "tty-option", ["~> 0.1"] end