diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-12-28 14:20:27 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-12-28 14:21:24 -0700 |
commit | a79300a0d80940b457a5065803486526d6bf89a1 (patch) | |
tree | 50069202daef83d271d144cddead3d3b865388c3 | |
parent | 427544ed45ff8dccc4c94065ce243806189b282e (diff) | |
download | rails-a79300a0d80940b457a5065803486526d6bf89a1.tar.gz rails-a79300a0d80940b457a5065803486526d6bf89a1.tar.bz2 rails-a79300a0d80940b457a5065803486526d6bf89a1.zip |
Revert "Detect rbenv and update the shebang"
This reverts commit 7173c4f931c9026bd3bc0b644d93dae744433f09.
This reverts commit a562f9fa09967eba26dff1c3bc8aa85b6f0a72ff.
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 9 | ||||
-rw-r--r-- | railties/test/fixtures/path/ruby-local-exec | 0 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 10 |
3 files changed, 1 insertions, 18 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 9b9ae72e18..9874fb462a 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -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 = {}) diff --git a/railties/test/fixtures/path/ruby-local-exec b/railties/test/fixtures/path/ruby-local-exec deleted file mode 100644 index e69de29bb2..0000000000 --- a/railties/test/fixtures/path/ruby-local-exec +++ /dev/null diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 85a90cd968..df34612574 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -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) } |