From c7c7937dcde9a94f2e5ee0549451b34e410803e0 Mon Sep 17 00:00:00 2001 From: marc Date: Fri, 3 Jul 2015 16:44:45 +0200 Subject: Validates whether an image is acceptable through mime type image/jpeg, image/png & image/gif are considered the allowed mime types for an image. mimemagic gem is added as dependency in order to do the checking. Added tests to check against three supported mime types. A fake jpg fixture (created with 'touch' command) has been added to test that extension is no longer used. --- axlsx.gemspec | 1 + 1 file changed, 1 insertion(+) (limited to 'axlsx.gemspec') diff --git a/axlsx.gemspec b/axlsx.gemspec index 9fc19285..8e3cd9ca 100644 --- a/axlsx.gemspec +++ b/axlsx.gemspec @@ -20,6 +20,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'nokogiri', '>= 1.4.1' s.add_runtime_dependency 'rubyzip', '~> 1.1.7' s.add_runtime_dependency "htmlentities", "~> 4.3.1" + s.add_runtime_dependency "mimemagic", "~> 0.3" s.add_development_dependency 'yard' s.add_development_dependency 'kramdown' -- cgit v1.2.3