summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-09-20 13:59:13 +0200
committergit <svn-admin@ruby-lang.org>2024-09-20 15:57:41 +0000
commit9bf3210adba9129f429ddf2489515f67a43c640d (patch)
tree93d2c05b8f12de96b89832d82034c57235e26535
parentc262861e5c999e080eba29a12b789724db178303 (diff)
[rubygems/rubygems] Fix RubyGems warnings about missing shebang
https://github.com/rubygems/rubygems/commit/362c960497
-rw-r--r--spec/bundler/commands/binstubs_spec.rb3
-rw-r--r--spec/bundler/support/builders.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb
index 74582226f8..87a68a9cf1 100644
--- a/spec/bundler/commands/binstubs_spec.rb
+++ b/spec/bundler/commands/binstubs_spec.rb
@@ -115,7 +115,8 @@ RSpec.describe "bundle binstubs <gem>" do
build_gem "prints_loaded_gems", "1.0" do |s|
s.executables = "print_loaded_gems"
s.bindir = "exe"
- s.write "exe/print_loaded_gems", <<-R
+ s.write "exe/print_loaded_gems", <<~R
+ #!/usr/bin/env ruby
specs = Gem.loaded_specs.values.reject {|s| s.default_gem? }
puts specs.map(&:full_name).sort.inspect
R
diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb
index 18cd6fe1ef..d71ac5190d 100644
--- a/spec/bundler/support/builders.rb
+++ b/spec/bundler/support/builders.rb
@@ -153,7 +153,7 @@ module Spec
build_gem "bundler", "0.9" do |s|
s.executables = "bundle"
- s.write "bin/bundle", "puts 'FAIL'"
+ s.write "bin/bundle", "#!/usr/bin/env ruby\nputs 'FAIL'"
end
# The bundler 0.8 gem has a rubygems plugin that always loads :(