Skip to content

Commit

Permalink
Merge pull request rails#3926 from guilleiguaran/skip-assets-group-if…
Browse files Browse the repository at this point in the history
…-sprockets-skipped

Skip assets groups if --skip-sprockets option is given
  • Loading branch information
wycats committed Dec 10, 2011
2 parents 3e55928 + b12a176 commit 7fc0964
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions railties/lib/rails/generators/app_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def ruby_debugger_gemfile_entry
end

def assets_gemfile_entry
return if options[:skip_sprockets]
<<-GEMFILE.strip_heredoc
# Gems used only for assets and not required
# in production environments by default.
Expand Down
5 changes: 5 additions & 0 deletions railties/test/generators/app_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ def test_generator_if_skip_sprockets_is_given
assert_match(/#\s+require\s+["']sprockets\/railtie["']/, content)
assert_no_match(/config\.assets\.enabled = true/, content)
end
assert_file "Gemfile" do |content|
assert_no_match(/sass-rails/, content)
assert_no_match(/coffee-rails/, content)
assert_no_match(/uglifier/, content)
end
assert_file "test/performance/browsing_test.rb"
end

Expand Down

0 comments on commit 7fc0964

Please sign in to comment.