提交 c074343c 编写于 作者: V Vipul A M

- app generate option --skip-sprockets leaves jquery-rails gem, which relies...

- app generate option --skip-sprockets leaves jquery-rails gem, which relies on sprockets environment
- Remove jquery-rails if --skip-sprockets is true

Fixes #23431
上级 ec1b249c
......@@ -317,7 +317,7 @@ def coffee_gemfile_entry
end
def javascript_gemfile_entry
if options[:skip_javascript]
if options[:skip_javascript] || options[:skip_sprockets]
[]
else
gems = [coffee_gemfile_entry, javascript_runtime_gemfile_entry]
......
......@@ -385,9 +385,10 @@ def test_generator_if_skip_sprockets_is_given
assert_match(/#\s+require\s+["']sprockets\/railtie["']/, content)
end
assert_file "Gemfile" do |content|
assert_no_match(/jquery-rails/, content)
assert_no_match(/sass-rails/, content)
assert_no_match(/uglifier/, content)
assert_match(/coffee-rails/, content)
assert_no_match(/coffee-rails/, content)
end
assert_file "config/environments/development.rb" do |content|
assert_no_match(/config\.assets\.debug = true/, content)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册