spring 510B

12345678910111213141516171819
  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. ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
  9. ENV["GEM_HOME"] = ""
  10. Gem.paths = ENV
  11. gem "spring", match[1]
  12. require "spring/binstub"
  13. end
  14. end