diff options
author | Heiko Bernlöhr <Heiko.Bernloehr@FreeIT.de> | 2018-01-12 10:11:14 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2018-01-12 11:53:15 +0100 |
commit | f05616f8a21ef703f0b568b7cd3019fb4bcb8b52 (patch) | |
tree | b06be9c48edaf376538a0b8397713b1a8f8eca9a | |
parent | 5d7dbda7a475fdbf0c091dc308384a32333b00e4 (diff) | |
download | ecs-f05616f8a21ef703f0b568b7cd3019fb4bcb8b52.tar.gz ecs-f05616f8a21ef703f0b568b7cd3019fb4bcb8b52.zip |
Update stubs.
-rwxr-xr-x | bin/rails | 5 | ||||
-rwxr-xr-x | bin/rake | 5 | ||||
-rwxr-xr-x | bin/spring | 19 |
3 files changed, 14 insertions, 15 deletions
@@ -1,7 +1,8 @@ #!/usr/bin/env ruby begin - load File.expand_path("../spring", __FILE__) -rescue LoadError + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') end APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' @@ -1,7 +1,8 @@ #!/usr/bin/env ruby begin - load File.expand_path("../spring", __FILE__) -rescue LoadError + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') end require_relative '../config/boot' require 'rake' @@ -1,18 +1,15 @@ #!/usr/bin/env ruby -# This file loads spring without using Bundler, in order to be fast -# It gets overwritten when you run the `spring binstub` command +# 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" + require 'rubygems' + require 'bundler' - if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m) - ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) - ENV["GEM_HOME"] = "" - Gem.paths = ENV - - gem "spring", match[1] - require "spring/binstub" + 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] + require 'spring/binstub' end end |