提交 74996cec 编写于 作者: C claudiob

Don't run rails active_storage:install in new apps

See #31315 for full discussion
上级 597b9419
......@@ -41,9 +41,6 @@ application to Rails 5.2, run `rails active_storage:install` to generate a
migration that creates these tables. Use `rails db:migrate` to run the
migration.
You need not run `rails active_storage:install` in a new Rails 5.2 application:
the migration is generated automatically.
Declare Active Storage services in `config/storage.yml`. For each service your
application uses, provide a name and the requisite configuration. The example
below declares three services named `local`, `test`, and `s3`:
......
......@@ -456,16 +456,6 @@ def generate_spring_binstubs
end
end
def run_active_storage
unless skip_active_storage?
if bundle_install?
rails_command "active_storage:install", capture: options[:quiet]
else
log("Active Storage installation was skipped. Please run `bin/rails active_storage:install` to install Active Storage files.")
end
end
end
def empty_directory_with_keep_file(destination, config = {})
empty_directory(destination, config)
keep_file(destination)
......
......@@ -463,7 +463,6 @@ def finish_template
public_task :apply_rails_template, :run_bundle
public_task :run_webpack, :generate_spring_binstubs
public_task :run_active_storage
def run_after_bundle_callbacks
@after_bundle_callbacks.each(&:call)
......
......@@ -854,7 +854,7 @@ def test_after_bundle_callback
template
end
sequence = ["git init", "install", "exec spring binstub --all", "active_storage:install", "echo ran after_bundle"]
sequence = ["git init", "install", "exec spring binstub --all", "echo ran after_bundle"]
@sequence_step ||= 0
ensure_bundler_first = -> command, options = nil do
assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}"
......@@ -871,7 +871,7 @@ def test_after_bundle_callback
end
end
assert_equal 5, @sequence_step
assert_equal 4, @sequence_step
end
def test_gitignore
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册