spring 507 B

123456789101112131415161718
  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. lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
  8. spring = lockfile.specs.detect { |spec| spec.name == "spring" }
  9. if spring
  10. Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
  11. gem 'spring', spring.version
  12. require 'spring/binstub'
  13. end
  14. end