Skip to content

Commit 0b604b6

Browse files
committed
Regenerate binstubs
1 parent 55b68cc commit 0b604b6

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

bin/rake

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
3+
34
#
45
# This file was generated by Bundler.
56
#
67
# The application 'rake' is installed as part of a gem, and
78
# this file is here to facilitate running it.
89
#
910

10-
require "pathname"
11-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12-
Pathname.new(__FILE__).realpath)
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
1323

1424
require "rubygems"
1525
require "bundler/setup"

bin/rspec

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
3+
34
#
45
# This file was generated by Bundler.
56
#
67
# The application 'rspec' is installed as part of a gem, and
78
# this file is here to facilitate running it.
89
#
910

10-
require "pathname"
11-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12-
Pathname.new(__FILE__).realpath)
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
1323

1424
require "rubygems"
1525
require "bundler/setup"

bin/yard

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
3+
34
#
45
# This file was generated by Bundler.
56
#
67
# The application 'yard' is installed as part of a gem, and
78
# this file is here to facilitate running it.
89
#
910

10-
require "pathname"
11-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12-
Pathname.new(__FILE__).realpath)
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
1323

1424
require "rubygems"
1525
require "bundler/setup"

0 commit comments

Comments
 (0)