Disable jbuilder for Rails API apps, meanwhile it doesn't play nicely

This commit is contained in:
Santiago Pastorino 2015-04-20 20:12:43 -04:00
parent 7d17269be3
commit 3d3730040d
2 changed files with 3 additions and 0 deletions

@ -266,6 +266,8 @@ def assets_gemfile_entry
end
def jbuilder_gemfile_entry
return [] if options[:api]
comment = 'Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder'
GemfileEntry.version('jbuilder', '~> 2.0', comment)
end

@ -37,6 +37,7 @@ def test_api_modified_files
assert_no_match(/gem 'coffee-rails'/, content)
assert_no_match(/gem 'jquery-rails'/, content)
assert_no_match(/gem 'sass-rails'/, content)
assert_no_match(/gem 'jbuilder'/, content)
end
assert_file "config/application.rb" do |content|