提交 01e37ed2 编写于 作者: G Godfrey Chan

Implicitly skip spring for `rails new --dev`

Spring seems like an obvious foot gun for the `--dev` setup, presumably you are
about to make lots of changes to the codebase, so it should always reload the
framework.
上级 0cfc34ae
......@@ -336,7 +336,7 @@ def bundle_install?
end
def spring_install?
!options[:skip_spring] && Process.respond_to?(:fork) && !RUBY_PLATFORM.include?("cygwin")
!options[:skip_spring] && !options.dev? && Process.respond_to?(:fork) && !RUBY_PLATFORM.include?("cygwin")
end
def run_bundle
......
......@@ -560,6 +560,14 @@ def test_skip_spring
end
end
def test_spring_with_dev_option
run_generator [destination_root, "--dev"]
assert_file "Gemfile" do |content|
assert_no_match(/spring/, content)
end
end
def test_generator_if_skip_turbolinks_is_given
run_generator [destination_root, "--skip-turbolinks"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册