Spring updated
This commit is contained in:
parent
464fc0de95
commit
43c52d77ab
3 changed files with 14 additions and 10 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
load File.expand_path("../spring", __FILE__)
|
load File.expand_path('../spring', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError => e
|
||||||
|
raise unless e.message.include?('spring')
|
||||||
end
|
end
|
||||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
|
|
|
||||||
5
bin/rake
5
bin/rake
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
begin
|
||||||
load File.expand_path("../spring", __FILE__)
|
load File.expand_path('../spring', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError => e
|
||||||
|
raise unless e.message.include?('spring')
|
||||||
end
|
end
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
require 'rake'
|
require 'rake'
|
||||||
|
|
|
||||||
14
bin/spring
14
bin/spring
|
|
@ -4,12 +4,14 @@
|
||||||
# It gets overwritten when you run the `spring binstub` command.
|
# It gets overwritten when you run the `spring binstub` command.
|
||||||
|
|
||||||
unless defined?(Spring)
|
unless defined?(Spring)
|
||||||
require "rubygems"
|
require 'rubygems'
|
||||||
require "bundler"
|
require 'bundler'
|
||||||
|
|
||||||
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||||
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
||||||
gem "spring", match[1]
|
if spring
|
||||||
require "spring/binstub"
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
||||||
|
gem 'spring', spring.version
|
||||||
|
require 'spring/binstub'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue