Update spring binstubs
This commit is contained in:
parent
790808f412
commit
7fa38bffa3
3 changed files with 8 additions and 19 deletions
13
bin/rspec
13
bin/rspec
|
|
@ -1,21 +1,8 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
#
|
|
||||||
# This file was generated by Bundler.
|
|
||||||
#
|
|
||||||
# The application 'rspec' is installed as part of a gem, and
|
|
||||||
# this file is here to facilitate running it.
|
|
||||||
#
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
load File.expand_path('../spring', __FILE__)
|
load File.expand_path('../spring', __FILE__)
|
||||||
rescue LoadError => e
|
rescue LoadError => e
|
||||||
raise unless e.message.include?('spring')
|
raise unless e.message.include?('spring')
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'pathname'
|
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
|
||||||
Pathname.new(__FILE__).realpath)
|
|
||||||
|
|
||||||
require 'rubygems'
|
|
||||||
require 'bundler/setup'
|
require 'bundler/setup'
|
||||||
load Gem.bin_path('rspec-core', 'rspec')
|
load Gem.bin_path('rspec-core', 'rspec')
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,10 @@ unless defined?(Spring)
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler'
|
require 'bundler'
|
||||||
|
|
||||||
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||||
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
||||||
gem 'spring', match[1]
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
||||||
|
gem 'spring', spring.version
|
||||||
require 'spring/binstub'
|
require 'spring/binstub'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,10 @@ unless defined?(Spring)
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler'
|
require 'bundler'
|
||||||
|
|
||||||
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||||
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
||||||
gem 'spring', match[1]
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
||||||
|
gem 'spring', spring.version
|
||||||
require 'spring/binstub'
|
require 'spring/binstub'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue