diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-09 06:09:23 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-09 06:09:23 +0000 |
commit | 4bfebcc481ca32ca0055e55cad509f400a2939ff (patch) | |
tree | ae2178cccb15c2c16a83865d496fd4a40f465dfb /bin | |
parent | 5d066c532d5fc4dc8a89be2068236b7058ddb645 (diff) | |
download | gitlab-ce-4bfebcc481ca32ca0055e55cad509f400a2939ff.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/spring | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/spring b/bin/spring index e0d140fe0c7..497ab099954 100755 --- a/bin/spring +++ b/bin/spring @@ -1,15 +1,17 @@ #!/usr/bin/env ruby -# This file loads spring without using Bundler, in order to be fast. +# 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) || ENV['ENABLE_SPRING'] != '1') && File.basename($0) != 'spring' 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.join(Gem.path_separator) } - gem 'spring', match[1] + 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 |