gitlab-org--gitlab-foss/bin/spring

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
573 B
Text
Raw Normal View History

#!/usr/bin/env ruby
# This file loads Spring without using Bundler, in order to be fast.
2015-05-20 18:39:33 -04:00
# It gets overwritten when you run the `spring binstub` command.
2016-06-17 10:40:28 -04:00
unless (defined?(Spring) || ENV['ENABLE_SPRING'] != '1') && File.basename($0) != 'spring'
require 'rubygems'
require 'bundler'
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'
end
end