Skip to content

Instantly share code, notes, and snippets.

@andrey-kazakov
Created January 29, 2013 20:04
Show Gist options
  • Save andrey-kazakov/4667281 to your computer and use it in GitHub Desktop.
Save andrey-kazakov/4667281 to your computer and use it in GitHub Desktop.
My solution for platform-independent testing with guard gem on Mac/Linux. This code installs both rb-fsevent/rb-inotify gems on all platforms (and this way it won't cause platform conflicts with Gemfile.lock), but really requires only needed one.
group :test do
gem 'guard'
###
gem 'rb-fsevent', '~> 0.9.1', require: (RUBY_PLATFORM.downcase.include?("darwin") && 'rb-fsevent')
gem 'rb-inotify', '~> 0.8.8', require: (RUBY_PLATFORM.downcase.include?("linux") && 'rb-inotify')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment