app: update code to Rails 6.1
This commit is contained in:
parent
de9fab701a
commit
5990439ab7
25 changed files with 310 additions and 87 deletions
21
bin/spring
21
bin/spring
|
@ -1,17 +1,14 @@
|
|||
#!/usr/bin/env ruby
|
||||
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
|
||||
gem "bundler"
|
||||
require "bundler"
|
||||
|
||||
# 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)
|
||||
require 'rubygems'
|
||||
require 'bundler'
|
||||
|
||||
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
||||
if spring
|
||||
# Load Spring without loading other gems in the Gemfile, for speed.
|
||||
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"
|
||||
rescue Gem::LoadError
|
||||
# Ignore when Spring is not installed.
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue