Autotest relies on filesystem polling to detect modifications in source code files. In other words: The filesytem is constantly being traversed which causes quite some load on both the CPU and the harddrive. This is not healthy for your Mac and if you are working on a portable computer, it will drain your battery.
Apple has introduced FSEvent with Mac OS X 10.5 which is a very efficient way to have the operating system monitor file alterations. This gem teaches autotest to use FSEvent and therefore be nice to your Mac.
- Homepage
- Author: Sven Schwyn - Bitcetera
Thank you for supporting free and open-source software by sponsoring on GitHub or on Donorbox. Any gesture is appreciated, from a single Euro for a βοΈ cup of coffee to πΉ early retirement.
This gem is cryptographically signed in order to assure it hasn't been tampered with. Unless already done, please add the author's public key as a trusted certificate now:
gem cert --add <(curl -Ls https://raw.github.com/svoop/autotest-fsevent/main/certs/svoop.pem)
In order to compile the fsevent binary at install time, Xcode (macOS development suite) must be installed. You can download it for free from:
You can use any ZenTest-compatible test suite with this gem such as:
Add this to your Gemfile
or gems.rb
:
gem autotest-fsevent, group: :development
And securely install the bundle:
bundle install --trust-policy MediumSecurity
Then add the following line after all other requires in your ~/.autotest
file:
require 'autotest/fsevent'
Make sure you have either the ZenTest gem or the autotest-standalone gem installed. This dependency has been dropped as of autotest-fsevent-0.2.3 in order to allow any compatible test suite.
Make sure you have Xcode (Mac OS X Development Suite) installed. You can download it for free from:
If you don't want to install Xcode, download the prebuilt fsevent_sleep binary, make the downloaded binary executable and install the gem as follows:
FSEVENT_SLEEP="/absolute/path/to/fsevent_sleep" gem install autotest-fsevent
To install the development dependencies:
bundle install
Please submit issues on:
https://github.com/svoop/autotest-fsevent/issues
To contribute code, fork the project on Github, add your code and submit a pull request:
https://help.github.com/articles/fork-a-repo
The gem is available as open source under the terms of the MIT License.