2019-10-09 22:25:20 -04:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
|
|
|
# This file loads Spring without using Bundler, in order to be fast.
|
|
|
|
# It gets overwritten when you run the `spring binstub` command.
|
|
|
|
|
|
|
|
unless defined?(Spring)
|
2020-02-19 07:52:46 -05:00
|
|
|
require "rubygems"
|
|
|
|
require "bundler"
|
2019-10-09 22:25:20 -04:00
|
|
|
|
|
|
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
2020-02-19 07:52:46 -05:00
|
|
|
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
2019-10-09 22:25:20 -04:00
|
|
|
if spring
|
|
|
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
2020-02-19 07:52:46 -05:00
|
|
|
gem "spring", spring.version
|
|
|
|
require "spring/binstub"
|
2019-10-09 22:25:20 -04:00
|
|
|
end
|
|
|
|
end
|