spring 559 B

1234567891011121314151617181920
  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. case lockfile = Bundler.default_lockfile.read
  8. when /^GEM$.*?^ spring \((.*?)\)$.*?^$/m
  9. version = $1
  10. ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
  11. ENV["GEM_HOME"] = "" unless /^GIT$/ === lockfile
  12. Gem.paths = ENV
  13. gem "spring", version
  14. require "spring/binstub"
  15. end
  16. end