bin/spring
#!/usr/bin/env ruby
# frozen_string_literal: true
unless defined?(Spring)
require 'rubygems'
require 'bundler'
match = Bundler.default_lockfile.read.match(
/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m
)
if match
Gem.paths = {
'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(
Gem.path_separator
)
}
gem 'spring', match[1]
require 'spring/binstub'
end
end