fix rails 4 Gemfile.lock under bundler 1.7

bundler 1.7 @sources no longer responds to include?. Conveniently,
the method we're overriding no longer calls include?

Change-Id: I5362b28a6819a4de9bc1e5de25b4753a8d77d9e1
Reviewed-on: https://gerrit.instructure.com/41510
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2014-09-22 10:16:41 -06:00
parent ac3be7b625
commit cab6f70fb2
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ unless CANVAS_RAILS3
Bundler::Dsl.class_eval do
def to_definition(lockfile, unlock)
@sources << @rubygems_source unless @sources.include?(@rubygems_source)
@sources << @rubygems_source if @sources.respond_to?(:include?) && !@sources.include?(@rubygems_source)
Definition.new(Bundler.default_lockfile, @dependencies, @sources, unlock, @ruby_version)
end
end