diff options
author | Dennis Schubert <mail@dennis-schubert.de> | 2015-12-31 18:17:35 +0300 |
---|---|---|
committer | Dennis Schubert <mail@dennis-schubert.de> | 2015-12-31 18:17:35 +0300 |
commit | 9dca1785c2276a82e78b5b0768ac2857bf05858b (patch) | |
tree | 2e3785b15b51f9816c9b5561184ae7ae46f73dc5 /bin | |
parent | 1ed904449d15235f9f99c69fd8599694ff16e857 (diff) | |
parent | b1f7a452f942935a4f6d5c04d5fe2b1743bf232a (diff) |
Merge branch 'stable' into develop
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cucumber | 5 | ||||
-rwxr-xr-x | bin/rails | 9 | ||||
-rwxr-xr-x | bin/rake | 5 | ||||
-rwxr-xr-x | bin/rspec | 5 | ||||
-rwxr-xr-x | bin/spring | 19 |
5 files changed, 23 insertions, 20 deletions
diff --git a/bin/cucumber b/bin/cucumber index 12971cdce..f135a7564 100755 --- a/bin/cucumber +++ b/bin/cucumber @@ -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 'bundler/setup' load Gem.bin_path('cucumber', 'cucumber') @@ -1,8 +1,11 @@ #!/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 +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + APP_PATH = File.expand_path('../../config/application', __FILE__) -require_relative '../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' @@ -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,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 'bundler/setup' load Gem.bin_path('rspec-core', 'rspec') diff --git a/bin/spring b/bin/spring index de6070b2a..62ec28f8c 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"] = nil - 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 } + gem 'spring', match[1] + require 'spring/binstub' end end |