lib/epub/constants.rb in epub-parser-0.2.0 vs lib/epub/constants.rb in epub-parser-0.2.1

- old
+ new

@@ -1,48 +1,42 @@ module EPUB - module Constants - NAMESPACES = { - 'dc' => 'http://purl.org/dc/elements/1.1/', - 'ocf' => 'urn:oasis:names:tc:opendocument:xmlns:container', - 'opf' => 'http://www.idpf.org/2007/opf', - 'xhtml' => 'http://www.w3.org/1999/xhtml', - 'epub' => 'http://www.idpf.org/2007/ops', - 'm' => 'http://www.w3.org/1998/Math/MathML', - 'svg' => 'http://www.w3.org/2000/svg', - 'smil' => 'http://www.w3.org/ns/SMIL' - } + NAMESPACES = { + 'dc' => 'http://purl.org/dc/elements/1.1/', + 'ocf' => 'urn:oasis:names:tc:opendocument:xmlns:container', + 'opf' => 'http://www.idpf.org/2007/opf', + 'xhtml' => 'http://www.w3.org/1999/xhtml', + 'epub' => 'http://www.idpf.org/2007/ops', + 'm' => 'http://www.w3.org/1998/Math/MathML', + 'svg' => 'http://www.w3.org/2000/svg', + 'smil' => 'http://www.w3.org/ns/SMIL' + } - module MediaType - # @deprecated Use {UnsupportedMediaType} instead - class UnsupportedError < StandardError; end - class UnsupportedMediaType < StandardError; end + module MediaType + class UnsupportedMediaType < StandardError; end - EPUB = 'application/epub+zip' - ROOTFILE = 'application/oebps-package+xml' - IMAGE = %w[ - image/gif - image/jpeg - image/png - image/svg+xml - ] - APPLICATION = %w[ - application/xhtml+xml - application/x-dtbncx+xml - application/vnd.ms-opentype - application/font-woff - application/smil+xml - application/pls+xml - ] - AUDIO = %w[ - audio/mpeg - audio/mp4 - ] - TEXT = %w[ - text/css - text/javascript - ] - CORE = IMAGE + APPLICATION + AUDIO + TEXT - end + EPUB = 'application/epub+zip' + ROOTFILE = 'application/oebps-package+xml' + IMAGE = %w[ + image/gif + image/jpeg + image/png + image/svg+xml + ] + APPLICATION = %w[ + application/xhtml+xml + application/x-dtbncx+xml + application/vnd.ms-opentype + application/font-woff + application/smil+xml + application/pls+xml + ] + AUDIO = %w[ + audio/mpeg + audio/mp4 + ] + TEXT = %w[ + text/css + text/javascript + ] + CORE = IMAGE + APPLICATION + AUDIO + TEXT end - - include Constants end