未验证 提交 2c667814 编写于 作者: B bogdanvlviv

`bundle binstubs bundler` should be executed after `bundle install`

Fixes:

`bundle binstubs bundler` doesn't generate `bin/bundle` for newly
generated Rails app.

```
...
(snip)
run  bundle binstubs bundler
The git source https://github.com/rails/web-console.git is not yet checked out.
Please run `bundle install` before trying to start your application
run  bundle install
Fetching https://github.com/rails/web-console.git
(snip)
...
```

Related to #33202
上级 09e1452e
...@@ -298,8 +298,6 @@ def create_bin_files ...@@ -298,8 +298,6 @@ def create_bin_files
build(:bin) build(:bin)
end end
public_task :generate_bundler_binstub
def update_bin_files def update_bin_files
build(:bin_when_updating) build(:bin_when_updating)
end end
...@@ -471,7 +469,8 @@ def finish_template ...@@ -471,7 +469,8 @@ def finish_template
end end
public_task :apply_rails_template, :run_bundle public_task :apply_rails_template, :run_bundle
public_task :run_webpack, :generate_spring_binstubs public_task :generate_bundler_binstub, :generate_spring_binstubs
public_task :run_webpack
def run_after_bundle_callbacks def run_after_bundle_callbacks
@after_bundle_callbacks.each(&:call) @after_bundle_callbacks.each(&:call)
......
...@@ -972,7 +972,7 @@ def test_after_bundle_callback ...@@ -972,7 +972,7 @@ def test_after_bundle_callback
template template
end end
sequence = ["git init", "binstubs bundler", "install", "exec spring binstub --all", "echo ran after_bundle"] sequence = ["git init", "install", "binstubs bundler", "exec spring binstub --all", "echo ran after_bundle"]
@sequence_step ||= 0 @sequence_step ||= 0
ensure_bundler_first = -> command, options = nil do ensure_bundler_first = -> command, options = nil do
assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}" assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册