lib/pdd/sources.rb in pdd-0.2.1 vs lib/pdd/sources.rb in pdd-0.2.2
- old
+ new
@@ -34,11 +34,12 @@
@magic = FileMagic.new(FileMagic::MAGIC_MIME)
end
# Fetch all sources.
def fetch
+ types = [/^text\//, /application\/xml/]
Dir.glob(@dir + '/**/*')
- .select { |f| @magic.file(f) =~ /^text\// }
+ .select { |f| types.index { |re| @magic.file(f) =~ re } }
.map do |file|
Source.new(file, file[@dir.length + 1, file.length])
end
end
end