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