Helpers to define OS based gems

This commit is contained in:
Andrew Tomaka 2013-08-25 22:19:39 -04:00
parent a8e4aa77c8
commit 3bb93cc6f6

10
Gemfile
View file

@ -1,5 +1,13 @@
source 'https://rubygems.org' source 'https://rubygems.org'
def darwin_only(require_as)
RbConfig::CONFIG['host_os'] =~ /darwin/ && require_as
end
def linux_only(require_as)
RbConfig::CONFIG['host_os'] =~ /linux/ && require_as
end
gem 'rails', '4.0.0' gem 'rails', '4.0.0'
gem 'sqlite3' gem 'sqlite3'
gem 'sass-rails', '~> 4.0.0' gem 'sass-rails', '~> 4.0.0'
@ -21,7 +29,7 @@ group :test, :development do
gem 'capybara' gem 'capybara'
gem 'capybara-webkit' gem 'capybara-webkit'
gem 'guard-rspec' gem 'guard-rspec'
gem 'libnotify' gem 'libnotify', :require => linux_only('libnotify')
gem 'rb-fsevent' gem 'rb-fsevent'
gem 'database_cleaner', '1.0.1' gem 'database_cleaner', '1.0.1'
gem 'coveralls', require: false gem 'coveralls', require: false