1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "Detect rbenv and update the shebang"

This reverts commit 7173c4f931.
This reverts commit a562f9fa09.
This commit is contained in:
Jeremy Kemper 2012-12-28 14:20:27 -07:00
parent 427544ed45
commit a79300a0d8
3 changed files with 1 additions and 18 deletions

View file

@ -261,14 +261,7 @@ module Rails
end
def run_bundle
command = "install --binstubs"
command << " --shebang ruby-local-exec" if detect_ruby_local_exec
bundle_command(command) unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]
end
def detect_ruby_local_exec
ENV["PATH"].split(":").find { |path| File.file?(File.join(path, "ruby-local-exec")) }
bundle_command('install --binstubs') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]
end
def empty_directory_with_keep_file(destination, config = {})

View file

@ -31,16 +31,6 @@ module SharedGeneratorTests
quietly { generator.invoke_all }
end
def test_generation_runs_bundle_install_with_shebang_if_needed
original_path = ENV["PATH"]
ENV["PATH"] = ENV["PATH"] + ":" + File.expand_path("../../fixtures/path", __FILE__)
generator([destination_root]).expects(:bundle_command).with('install --binstubs --shebang ruby-local-exec').once
quietly { generator.invoke_all }
ensure
ENV["PATH"] = original_path
end
def test_plugin_new_generate_pretend
run_generator ["testapp", "--pretend"]
default_files.each{ |path| assert_no_file File.join("testapp",path) }