From d54c31905dfa13270afd1abde8f172e5f54d4b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 2 Sep 2015 14:34:59 +0200 Subject: [PATCH] Make bundler 1.10 optional groups optional Optional groups are only available with Bundler 1.10+ We still want older bundlers to parse the gemfile correctly, thus a workaround is needed. --- Gemfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ec6d4ec1f5..4a3faad157 100644 --- a/Gemfile +++ b/Gemfile @@ -181,7 +181,17 @@ group :ldap do gem "net-ldap", '~> 0.8.0' end -group :syck, optional: true do + + +# Optional groups are only available with Bundler 1.10+ +# We still want older bundlers to parse this gemfile correctly, +# thus this rather ugly workaround is needed for now. +# TODO: Remove this when 1.10+ is widespread. +if Gem::Version.new(Bundler::VERSION) >= Gem::Version.new('1.10.0') + group :syck, optional: true do + gem "syck", require: false + end +else gem "syck", require: false end