parent
b910c1730c
commit
ab79758f72
1 changed files with 4 additions and 3 deletions
|
|
@ -7,9 +7,10 @@ unless defined?(Spring)
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler'
|
require 'bundler'
|
||||||
|
|
||||||
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||||
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
||||||
gem 'spring', match[1]
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
||||||
|
gem 'spring', spring.version
|
||||||
require 'spring/binstub'
|
require 'spring/binstub'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue