aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRobert2017-06-16 17:09:41 +0200
committerRobert2017-06-16 17:09:41 +0200
commit9ef3d205aa091d509455b3607d5ecc74431c6196 (patch)
treecffe367d2108ce9f367d2a282dd975eb1d6b7632 /bin
parent3fb578fb9ab68041d630db6294320fb7065a2966 (diff)
downloadchouette-core-9ef3d205aa091d509455b3607d5ecc74431c6196.tar.bz2
hotfix skip tests for eventual unauthorized reconnection; Refs: #3791
Diffstat (limited to 'bin')
-rwxr-xr-xbin/spring14
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/spring b/bin/spring
index 7b45d374f..fb2ec2ebb 100755
--- a/bin/spring
+++ b/bin/spring
@@ -4,12 +4,14 @@
# It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring)
- require "rubygems"
- require "bundler"
+ require 'rubygems'
+ require 'bundler'
- if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
- Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
- gem "spring", match[1]
- require "spring/binstub"
+ lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
+ spring = lockfile.specs.detect { |spec| spec.name == "spring" }
+ if spring
+ Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
+ gem 'spring', spring.version
+ require 'spring/binstub'
end
end