1
0

spring 594 B

123456789101112131415161718192021
  1. #!/usr/bin/env ruby
  2. # This file loads Spring without using Bundler, in order to be fast.
  3. # It gets overwritten when you run the `spring binstub` command.
  4. unless defined?(Spring)
  5. require 'rubygems'
  6. require 'bundler'
  7. require_relative '../lib/gemfile_helper.rb'
  8. GemfileHelper.load_dotenv
  9. if ENV['SPRING']
  10. lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
  11. spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
  12. Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
  13. gem 'spring', spring.version
  14. require 'spring/binstub'
  15. end
  16. end