Skip to content

Commit fbd6b61

Browse files
committed
Update binstubs
With this script: rm bin/* bundle exec rake rails:update:bin bundle binstubs rspec-core spring binstub --all
1 parent eebee78 commit fbd6b61

File tree

4 files changed

+31
-15
lines changed

4 files changed

+31
-15
lines changed

Diff for: bin/rails

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env ruby
22
begin
3-
load File.expand_path("../spring", __FILE__)
4-
rescue LoadError
3+
load File.expand_path('../spring', __FILE__)
4+
rescue LoadError => e
5+
raise unless e.message.include?('spring')
56
end
6-
APP_PATH = File.expand_path('../../config/application', __FILE__)
7+
APP_PATH = File.expand_path('../../config/application', __FILE__)
78
require_relative '../config/boot'
89
require 'rails/commands'

Diff for: bin/rake

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env ruby
22
begin
3-
load File.expand_path("../spring", __FILE__)
4-
rescue LoadError
3+
load File.expand_path('../spring', __FILE__)
4+
rescue LoadError => e
5+
raise unless e.message.include?('spring')
56
end
67
require_relative '../config/boot'
78
require 'rake'

Diff for: bin/rspec

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
#!/usr/bin/env ruby
22
begin
3-
load File.expand_path("../spring", __FILE__)
4-
rescue LoadError
3+
load File.expand_path('../spring', __FILE__)
4+
rescue LoadError => e
5+
raise unless e.message.include?('spring')
56
end
6-
require 'bundler/setup'
7-
load Gem.bin_path('rspec-core', 'rspec')
7+
#
8+
# This file was generated by Bundler.
9+
#
10+
# The application 'rspec' is installed as part of a gem, and
11+
# this file is here to facilitate running it.
12+
#
13+
14+
require "pathname"
15+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
16+
Pathname.new(__FILE__).realpath)
17+
18+
require "rubygems"
19+
require "bundler/setup"
20+
21+
load Gem.bin_path("rspec-core", "rspec")

Diff for: bin/spring

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# It gets overwritten when you run the `spring binstub` command.
55

66
unless defined?(Spring)
7-
require "rubygems"
8-
require "bundler"
7+
require 'rubygems'
8+
require 'bundler'
99

10-
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11-
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12-
gem "spring", match[1]
13-
require "spring/binstub"
10+
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
11+
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
12+
gem 'spring', match[1]
13+
require 'spring/binstub'
1414
end
1515
end

0 commit comments

Comments
 (0)