Upgrade spring binstubs

I ran `bundle exec spring binstub --all` after reading about the update
in the changelog.
This commit is contained in:
Maikel Linke
2022-07-21 10:55:31 +10:00
parent 43b09640a9
commit 84fcc8f1ac
4 changed files with 9 additions and 24 deletions

View File

@@ -1,9 +1,5 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
load File.expand_path("spring", __dir__)
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'

View File

@@ -1,9 +1,5 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
load File.expand_path("spring", __dir__)
require_relative '../config/boot'
require 'rake'
Rake.application.run

View File

@@ -1,8 +1,4 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
load File.expand_path("spring", __dir__)
require 'bundler/setup'
load Gem.bin_path('rspec-core', 'rspec')

View File

@@ -1,17 +1,14 @@
#!/usr/bin/env ruby
# This file loads Spring without using Bundler, in order to be fast.
# This file loads Spring without using loading other gems in the Gemfile, in order to be fast.
# It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring)
require 'rubygems'
require 'bundler'
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
require "bundler"
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
if spring
Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
gem 'spring', spring.version
require 'spring/binstub'
gem "spring", spring.version
require "spring/binstub"
end
end