From f24030b51f1fb6b877f749f7d3ce06314a06f641 Mon Sep 17 00:00:00 2001 From: Jeremy Cook Date: Sun, 19 Mar 2017 15:57:22 -0400 Subject: [PATCH] Updates to Gemfile to clean it up. --- Gemfile | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index d6ff3cc..64d982b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,32 +1,36 @@ -require 'rbconfig' source 'https://rubygems.org' +this_ruby = Gem::Version.new(RUBY_VERSION) +ruby_230 = Gem::Version.new('2.3.0') + # Add dependencies required to use your gem here. -gem "thor", ">= 0.14.0" +gem 'thor', '>= 0.14.0' # Add dependencies to develop your gem here. # Include everything needed to run rake, tests, features, etc. group :development do - gem "rake", ">= 0.8.7" - gem "rspec", "~> 3.5.0" - gem "guard" - gem "guard-rspec" - gem "rb-readline", "~> 0.5.0" - gem "test_construct" - gem "capture-output", "~> 1.0.0" - if RbConfig::CONFIG['host_os'] =~ /linux|freebsd|openbsd|sunos|solaris/ + gem 'capture-output', '~> 1.0.0' + gem 'coveralls', require: false + gem 'guard' + gem 'guard-rspec' + gem 'jeweler', '>= 1.6.2', '< 2.2' if this_ruby < ruby_230 + gem 'jeweler', '>= 1.6.2' if this_ruby >= ruby_230 + gem 'rake', '>= 0.8.7' + gem 'rb-readline', '~> 0.5.0' + gem 'rspec', '~> 3.5.0' + gem 'rubocop' + gem 'test_construct' + + install_if -> { RUBY_PLATFORM =~ /linux|freebsd|openbsd|sunos|solaris/ } do gem 'libnotify' end - if RbConfig::CONFIG['host_os'] =~ /darwin|mac os/ + + install_if -> { RUBY_PLATFORM =~ /darwin/ } do gem 'terminal-notifier-guard', '~> 1.7.0' end - gem "coveralls", require: false - gem "rubocop" - if RUBY_VERSION < '2.3.0' - gem "rack", "< 2" - gem "listen", "< 3" - gem "jeweler", ">= 1.6.2", "< 2.2" - else - gem "jeweler", ">= 1.6.2" + + install_if -> { this_ruby < ruby_230 } do + gem 'listen', '< 3' + gem 'rack', '< 2' end end