]> git.openstreetmap.org Git - rails.git/blobdiff - lib/gpx.rb
Switch GPX MIME type detection to use marcel
[rails.git] / lib / gpx.rb
index 86cf2f49dab377fcaccde84920866430af8ffbc2..71b2823b85c16a38689987de8fd01a2c97533b1f 100644 (file)
@@ -50,7 +50,7 @@ module GPX
       rescue Archive::Error
         io = ::File.open(@file)
 
-        case MimeMagic.by_magic(io)&.type
+        case Marcel::MimeType.for(io)
         when "application/gzip" then io = Zlib::GzipReader.open(@file)
         when "application/x-bzip" then io = Bzip2::FFI::Reader.open(@file)
         end