Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise an error when path is specified with :moved_from or :moved_to #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kenhys
Copy link

@kenhys kenhys commented Nov 26, 2020

If same path is specified with :moved_from or :moved_to
additionally, :modify is not fired expectedly.

  require "rb-inotify"
  notifier = INotify::Notifier.new
  notifier.watch("test.log", :modify) do |event|
    puts "#{event} is modified"
  end
  notifier.watch("test.log", :moved_from) do |event|
    puts "#{event} is moved_from"
  end

Above sample code does not work as expected.
So, raise an error immediately.

If same path is specified with :moved_from or :moved_to
additionally, :modify is not fired expectedly.

  require "rb-inotify"
  notifier = INotify::Notifier.new
  notifier.watch("test.log", :modify) do |event|
    puts "#{event} is modified"
  end
  notifier.watch("test.log", :moved_from) do |event|
    puts "#{event} is moved_from"
  end

Above sample code does not work as expected.
So, raise an error immediately.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 80.556% when pulling bf2fc88 on kenhys:error-moved-to-file into 010f140 on guard:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants