lib/rails/generators/app_base.rb in railties-4.2.6 vs lib/rails/generators/app_base.rb in railties-4.2.7.rc1
- old
+ new
@@ -109,10 +109,11 @@
assets_gemfile_entry,
javascript_gemfile_entry,
jbuilder_gemfile_entry,
sdoc_gemfile_entry,
psych_gemfile_entry,
+ mime_type_gemfile_entry,
@extra_entries].flatten.find_all(&@gem_filter)
end
def add_gem_entry_filter
@gem_filter = lambda { |next_filter, entry|
@@ -306,9 +307,15 @@
return [] unless defined?(Rubinius)
comment = 'Use Psych as the YAML engine, instead of Syck, so serialized ' \
'data can be read safely from different rubies (see http://git.io/uuLVag)'
GemfileEntry.new('psych', '~> 2.0', comment, platforms: :rbx)
+ end
+
+ def mime_type_gemfile_entry
+ return [] unless RUBY_VERSION < '2'
+
+ GemfileEntry.new('mime-types', '< 3', nil, require: false)
end
def bundle_command(command)
say_status :run, "bundle #{command}"