Update spring binstub

closes #7287
This commit is contained in:
Benjamin Neff 2017-01-20 00:18:28 +01:00 committed by Dennis Schubert
parent b910c1730c
commit ab79758f72
No known key found for this signature in database
GPG key ID: 5A0304BEA7966D7E

View file

@ -7,9 +7,10 @@ unless defined?(Spring)
require 'rubygems'
require 'bundler'
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
gem 'spring', match[1]
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
gem 'spring', spring.version
require 'spring/binstub'
end
end