spring 488 B

123456789101112131415
  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. if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
  8. Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
  9. gem 'spring', match[1]
  10. require 'spring/binstub'
  11. end
  12. end