--- ./samizdat/lib/samizdat/models/content.rb.orig 2011-04-06 20:57:00.038133687 +0300 +++ ./samizdat/lib/samizdat/models/content.rb 2011-04-06 21:06:49.101013467 +0300 @@ -10,7 +10,7 @@ require 'samizdat/engine' require 'fileutils' -require 'mahoro' +require 'magic' class Content @@ -275,15 +275,14 @@ # detect and validate file format # def ContentFile.detect_format(file) - @@mahoro ||= Mahoro.new(Mahoro::MIME) format = if file.respond_to?(:path) and file.path - @@mahoro.file(file.path) + Magic.guess_file_mime_type(file.path) elsif file.kind_of?(StringIO) - @@mahoro.buffer(file.string) + Magic.guess_string_mime_type(file.string) elsif file.kind_of?(String) - @@mahoro.buffer(file) + Magic.guess_string_mime_type(file) end format.nil? and raise RuntimeError, --- ./samizdat/doc/install.txt.orig 2011-04-06 21:07:05.609094173 +0300 +++ ./samizdat/doc/install.txt 2011-04-06 21:07:52.417322976 +0300 @@ -46,7 +46,7 @@ http://rubyforge.org/projects/redcloth/ http://tidy.sf.net/ http://rubyforge.org/projects/tidy/ - http://rubyforge.org/projects/mahoro/ + http://jah.pl/projects/magic.html http://rubyforge.org/projects/rmagick/ http://rubyforge.org/projects/tzinfo/