guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

Require rb-fsevent when needed, in _configure method #419

Closed jirutka closed 7 years ago

jirutka commented 7 years ago

This fixes an error I’ve introduced in #417, sorry for that.

The problem is: when the OS version is >= 13, then it early returns from the usable? function and does not require rb-fsevent.

      def self.usable?
        version = RbConfig::CONFIG['target_os'][OS_REGEXP, :major_version]
        return false unless version
        return true if version.to_i >= 13
        # ^--- HERE

        require 'rb-fsevent'
        ...
coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.5%) to 98.154% when pulling 37e9536f048237a66d2ab4a1f57a1ab0d3d057e0 on jirutka:fix-rb-fsevent-2 into b65306087d03d8301d7ca30238965f4497be1ae5 on guard:master.

rymai commented 7 years ago

Thanks @jirutka!