Skip to content

Commit

Permalink
Revert "Detect rbenv and update the shebang"
Browse files Browse the repository at this point in the history
This reverts commit 7173c4f.
This reverts commit a562f9f.
  • Loading branch information
jeremy committed Dec 28, 2012
1 parent 427544e commit a79300a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
9 changes: 1 addition & 8 deletions railties/lib/rails/generators/app_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,7 @@ def bundle_command(command)
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 = {})
Expand Down
Empty file.
10 changes: 0 additions & 10 deletions railties/test/generators/shared_generator_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ def test_generation_runs_bundle_install
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) }
Expand Down

0 comments on commit a79300a

Please sign in to comment.