Skip to content

Commit

Permalink
Install binstubs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Dec 22, 2012
1 parent cba0588 commit f34c27a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/app_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def bundle_command(command)
end

def run_bundle
bundle_command('install') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]
bundle_command('install --binstubs') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]
end

def empty_directory_with_keep_file(destination, config = {})
Expand Down
6 changes: 3 additions & 3 deletions railties/test/generators/shared_generator_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_skeleton_is_created
end

def test_generation_runs_bundle_install
generator([destination_root]).expects(:bundle_command).with('install').once
generator([destination_root]).expects(:bundle_command).with('install --binstubs').once
quietly { generator.invoke_all }
end

Expand Down Expand Up @@ -101,14 +101,14 @@ def test_template_is_executed_when_supplied_an_https_path
end

def test_dev_option
generator([destination_root], dev: true).expects(:bundle_command).with('install').once
generator([destination_root], dev: true).expects(:bundle_command).with('install --binstubs').once
quietly { generator.invoke_all }
rails_path = File.expand_path('../../..', Rails.root)
assert_file 'Gemfile', /^gem\s+["']rails["'],\s+path:\s+["']#{Regexp.escape(rails_path)}["']$/
end

def test_edge_option
generator([destination_root], edge: true).expects(:bundle_command).with('install').once
generator([destination_root], edge: true).expects(:bundle_command).with('install --binstubs').once
quietly { generator.invoke_all }
assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["']$}
end
Expand Down

0 comments on commit f34c27a

Please sign in to comment.