Files

16 lines
463 B
Ruby
Raw Permalink Normal View History

2015-10-02 21:05:03 +02:00
#!/usr/bin/env ruby
# This file loads spring without using Bundler, in order to be fast.
# It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring)
2015-10-02 21:19:37 +02:00
require 'rubygems'
require 'bundler'
2015-10-02 21:05:03 +02:00
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
2015-10-02 21:19:37 +02:00
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
gem 'spring', match[1]
require 'spring/binstub'
2015-10-02 21:05:03 +02:00
end
end