Skip to content

Commit afcf450

Browse files
committed
Upgrade spring to solve a deprecation warning
1 parent 7afad72 commit afcf450

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ GEM
555555
addressable (>= 2.3.3, < 3.0)
556556
capybara (>= 2.1, < 3.0)
557557
slop (3.6.0)
558-
spring (1.3.6)
558+
spring (2.0.2)
559+
activesupport (>= 4.2)
559560
spring-commands-rspec (1.0.4)
560561
spring (>= 0.9.1)
561562
sprockets (2.12.4)

bin/spring

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
# It gets overwritten when you run the `spring binstub` command.
55

66
unless defined?(Spring)
7-
require "rubygems"
8-
require "bundler"
7+
require 'rubygems'
8+
require 'bundler'
99

10-
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11-
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12-
gem "spring", match[1]
13-
require "spring/binstub"
10+
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11+
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12+
if spring
13+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14+
gem 'spring', spring.version
15+
require 'spring/binstub'
1416
end
1517
end

0 commit comments

Comments
 (0)