summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernlöhr <Heiko.Bernloehr@FreeIT.de>2018-01-12 10:11:14 +0100
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2018-01-12 11:53:15 +0100
commitf05616f8a21ef703f0b568b7cd3019fb4bcb8b52 (patch)
treeb06be9c48edaf376538a0b8397713b1a8f8eca9a
parent5d7dbda7a475fdbf0c091dc308384a32333b00e4 (diff)
downloadecs-f05616f8a21ef703f0b568b7cd3019fb4bcb8b52.tar.gz
ecs-f05616f8a21ef703f0b568b7cd3019fb4bcb8b52.zip
Update stubs.
-rwxr-xr-xbin/rails5
-rwxr-xr-xbin/rake5
-rwxr-xr-xbin/spring19
3 files changed, 14 insertions, 15 deletions
diff --git a/bin/rails b/bin/rails
index 7feb6a3..f2b0313 100755
--- a/bin/rails
+++ b/bin/rails
@@ -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'
diff --git a/bin/rake b/bin/rake
index 8017a02..d87d5f5 100755
--- a/bin/rake
+++ b/bin/rake
@@ -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'
diff --git a/bin/spring b/bin/spring
index 253ec37..7fe232c 100755
--- a/bin/spring
+++ b/bin/spring
@@ -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