sixarm_ruby_magic_number_type 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +2 -0
- data/LICENSE.txt +12 -0
- data/README.rdoc +30 -0
- data/lib/sixarm_ruby_magic_number_type.rb +144 -0
- data/test/sixarm_ruby_magic_number_type/sample.fit +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.gif +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.jpg +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.png +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.ps +348 -0
- data/test/sixarm_ruby_magic_number_type/sample.ras +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.sgi +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.tiff +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.xcf.bz2 +0 -0
- data/test/sixarm_ruby_magic_number_type/sample.xcf.gz +0 -0
- metadata +88 -0
- metadata.gz.sig +2 -0
    
        data.tar.gz.sig
    ADDED
    
    
    
        data/LICENSE.txt
    ADDED
    
    | @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            LICENSE
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            You may choose any of these licenses:
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              - CreativeCommons License, Non-commercial Share Alike
         | 
| 6 | 
            +
              - LGPL, GNU Lesser General Public License
         | 
| 7 | 
            +
              - MIT License
         | 
| 8 | 
            +
              - Ruby License
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
         | 
| 11 | 
            +
            IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
         | 
| 12 | 
            +
            WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
         | 
    
        data/README.rdoc
    ADDED
    
    | @@ -0,0 +1,30 @@ | |
| 1 | 
            +
             | 
| 2 | 
            +
            = SixArm.com » Ruby » MagicNumberType
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
         | 
| 5 | 
            +
            Copyright:: Copyright (c) 2010 Joel Parker Henderson
         | 
| 6 | 
            +
            License:: See LICENSE.txt file
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            MagicNumberType infers the mime type of data from the leading bits.
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            It infers based on widespread programming conventions for data file formats.
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            Magic numbers are the first bits of a file or data stream
         | 
| 13 | 
            +
            which uniquely identify the type of file or data stream.
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            For example when the first bits are "BM",
         | 
| 16 | 
            +
            this identifies the file as a bitmap image file.
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            These magic numbers are by convention and we are using this guide:
         | 
| 19 | 
            +
            http://www.astro.keele.ac.uk/oldusers/rno/Computing/File_magic.html
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            Typical uses of magic numbers:
         | 
| 22 | 
            +
              - to quickly identify a file's data type
         | 
| 23 | 
            +
              - to check if data matches the file's MIME type or extension
         | 
| 24 | 
            +
              - to check if a web form file upload matches its HTTP content type
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            Compare:
         | 
| 27 | 
            +
              - MIME::Types ruby library 
         | 
| 28 | 
            +
              - Unix magic() command for testing files on disk
         | 
| 29 | 
            +
              - http://shared-mime.rubyforge.org/
         | 
| 30 | 
            +
             | 
| @@ -0,0 +1,144 @@ | |
| 1 | 
            +
            # -*- coding: utf-8 -*-
         | 
| 2 | 
            +
            =begin rdoc
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            = SixArm.com » Ruby » MagicNumberType
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
         | 
| 7 | 
            +
            Copyright:: Copyright (c) 2010 Joel Parker Henderson
         | 
| 8 | 
            +
            License:: See LICENSE.txt file
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            MagicNumberType infers a data type from the data's leading bytes.
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            It infers based on widespread programming conventions for data file formats.
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            Magic numbers are the first bits of a file or data stream
         | 
| 15 | 
            +
            which uniquely identify the type of file or data stream.
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            For example when the first bits are "BM",
         | 
| 18 | 
            +
            this identifies the file as a bitmap image file.
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            These magic numbers are by convention and we are using this guide:
         | 
| 21 | 
            +
            http://www.astro.keele.ac.uk/oldusers/rno/Computing/File_magic.html
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            Typical uses of magic numbers:
         | 
| 24 | 
            +
              - to quickly identify a file's data type
         | 
| 25 | 
            +
              - to check if data matches the file's MIME type or extension
         | 
| 26 | 
            +
              - to check if a web form file upload matches its HTTP content type
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            Compare:
         | 
| 29 | 
            +
              - MIME::Types ruby library 
         | 
| 30 | 
            +
              - Unix magic() command for testing files on disk
         | 
| 31 | 
            +
              - http://shared-mime.rubyforge.org/
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            =end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            require 'pp'
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            class IO
         | 
| 38 | 
            +
             | 
| 39 | 
            +
              # We implement magic by using a lookup hash.
         | 
| 40 | 
            +
              # The key is a string that encodes the first bits.
         | 
| 41 | 
            +
              # The value is a symbol that indicates the magic type.
         | 
| 42 | 
            +
              #
         | 
| 43 | 
            +
              # Examples:
         | 
| 44 | 
            +
              #   IO::MagicNumberType("BM") => :bitmap
         | 
| 45 | 
            +
              #   IO::MagicNumberType("GIF8") => :gif
         | 
| 46 | 
            +
              #   IO::MagicNumberType("\xa6\x00") => :pgp_encrypted_data
         | 
| 47 | 
            +
              #
         | 
| 48 | 
            +
              # Quirks:
         | 
| 49 | 
            +
              #   - JPEG adjustment:
         | 
| 50 | 
            +
              #     - Some cameras put JPEG Exif data in bytes 3 & 4,
         | 
| 51 | 
            +
              #       so we only check the first two bytes of a JPEG.
         | 
| 52 | 
            +
              #   - TIFF has two possible matches:
         | 
| 53 | 
            +
              #     - MM** is Motorola big endian
         | 
| 54 | 
            +
              #     - II** is Intel little ending
         | 
| 55 | 
            +
              #
         | 
| 56 | 
            +
              # See:
         | 
| 57 | 
            +
              #  - IO#magic_number_type
         | 
| 58 | 
            +
              #  - File.magic_number_type
         | 
| 59 | 
            +
             | 
| 60 | 
            +
              MagicNumberTypeHash = {
         | 
| 61 | 
            +
                "BC" => :bitcode,
         | 
| 62 | 
            +
                "BM" => :bitmap,
         | 
| 63 | 
            +
                "BZ" => :bzip,
         | 
| 64 | 
            +
                "MZ" => :exe,
         | 
| 65 | 
            +
                "SIMPLE"=> :fits,
         | 
| 66 | 
            +
                "GIF8" => :gif,
         | 
| 67 | 
            +
                "GKSM" => :gks,
         | 
| 68 | 
            +
                [0x01,0xDA].pack('c*') => :iris_rgb,
         | 
| 69 | 
            +
                [0xF1,0x00,0x40,0xBB].pack('c*') => :itc,
         | 
| 70 | 
            +
                [0xFF,0xD8].pack('c*') => :jpeg,
         | 
| 71 | 
            +
                "IIN1" => :niff,
         | 
| 72 | 
            +
                "MThd" => :midi,
         | 
| 73 | 
            +
                "%PDF" => :pdf,
         | 
| 74 | 
            +
                "VIEW" => :pm,
         | 
| 75 | 
            +
                [0x89].pack('c*') + "PNG" => :png,
         | 
| 76 | 
            +
                "%!" => :postscript,
         | 
| 77 | 
            +
                "Y" + [0xA6].pack('c*') + "j" + [0x95].pack('c*') => :sun_rasterfile,
         | 
| 78 | 
            +
                "MM*" + [0x00].pack('c*') => :tiff,
         | 
| 79 | 
            +
                "II*" + [0x00].pack('c*') => :tiff,
         | 
| 80 | 
            +
                "gimp xcf" => :gimp_xcf,
         | 
| 81 | 
            +
                "#FIG" => :xfig,
         | 
| 82 | 
            +
                "/* XPM */" => :xpm,
         | 
| 83 | 
            +
                [0x23,0x21].pack('c*') => :shebang,
         | 
| 84 | 
            +
                [0x1F,0x9D].pack('c*') => :compress,
         | 
| 85 | 
            +
                [0x1F,0x8B].pack('c*') => :gzip,
         | 
| 86 | 
            +
                "PK" + [0x03,0x04].pack('c*') => :pkzip,
         | 
| 87 | 
            +
                "MZ" => :dos_os2_windows_executable,
         | 
| 88 | 
            +
                ".ELF" => :unix_elf,
         | 
| 89 | 
            +
                [0x99,0x00].pack('c*') => :pgp_public_ring,
         | 
| 90 | 
            +
                [0x95,0x01].pack('c*') => :pgp_security_ring,
         | 
| 91 | 
            +
                [0x95,0x00].pack('c*') => :pgp_security_ring,
         | 
| 92 | 
            +
                [0xA6,0x00].pack('c*') => :pgp_encrypted_data,
         | 
| 93 | 
            +
                [0xD0,0xCF,0x11,0xE0].pack('c*') => :docfile
         | 
| 94 | 
            +
              }
         | 
| 95 | 
            +
             | 
| 96 | 
            +
              # Detect the data type by checking various "magic number" conventions
         | 
| 97 | 
            +
              # for the introductory bytes of a data stream
         | 
| 98 | 
            +
              #
         | 
| 99 | 
            +
              # Return the "magic number" as a symbol:
         | 
| 100 | 
            +
              #  - :bitmap = Bitmap image file, typical extension ".bmp"
         | 
| 101 | 
            +
              #  - :gzip = Unix GZIP compressed data, typical extension ".gz"
         | 
| 102 | 
            +
              #  - :postscript = Postscript pages, typical extension ".ps"
         | 
| 103 | 
            +
              # 
         | 
| 104 | 
            +
              # Return nil if there's no match for any known magic number.
         | 
| 105 | 
            +
              #
         | 
| 106 | 
            +
              # Example:
         | 
| 107 | 
            +
              #   f = File.open("test.ps","rb")
         | 
| 108 | 
            +
              #   put f.magic_number(s)
         | 
| 109 | 
            +
              #   => :postscript
         | 
| 110 | 
            +
              #
         | 
| 111 | 
            +
              # See:
         | 
| 112 | 
            +
              #  - IO::MagicNumberTypeHash
         | 
| 113 | 
            +
              #  - File.magic_number_type
         | 
| 114 | 
            +
             | 
| 115 | 
            +
              def magic_number_type(bytes=self.read(9))
         | 
| 116 | 
            +
                MagicNumberTypeHash.each_pair do |byte_string,type_symbol|
         | 
| 117 | 
            +
                  return type_symbol if byte_string==bytes[0,byte_string.length]
         | 
| 118 | 
            +
                end
         | 
| 119 | 
            +
                return nil
         | 
| 120 | 
            +
              end
         | 
| 121 | 
            +
             | 
| 122 | 
            +
            end
         | 
| 123 | 
            +
             | 
| 124 | 
            +
             | 
| 125 | 
            +
            class File
         | 
| 126 | 
            +
             | 
| 127 | 
            +
              # Detect the file's data type by opening the file then
         | 
| 128 | 
            +
              # using IO#magic_number_type to read the first bits.
         | 
| 129 | 
            +
              #
         | 
| 130 | 
            +
              # Return a magic number type symbol, e.g. :bitmap, :jpg, etc.
         | 
| 131 | 
            +
              #
         | 
| 132 | 
            +
              # Example:
         | 
| 133 | 
            +
              #   puts File.magic_number_type("test.ps") => :postscript
         | 
| 134 | 
            +
              #
         | 
| 135 | 
            +
              # See
         | 
| 136 | 
            +
              #   - IO#MagicNumberTypeHash
         | 
| 137 | 
            +
              #   - IO#magic_number_type
         | 
| 138 | 
            +
             | 
| 139 | 
            +
              def self.magic_number_type(file_name)
         | 
| 140 | 
            +
                File.open(file_name,"rb"){|f| f.magic_number_type }
         | 
| 141 | 
            +
              end
         | 
| 142 | 
            +
             | 
| 143 | 
            +
            end
         | 
| 144 | 
            +
             | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| @@ -0,0 +1,348 @@ | |
| 1 | 
            +
            %!PS-Adobe-3.0
         | 
| 2 | 
            +
            %%Creator: GIMP PostScript file plugin V 1.17 by Peter Kirchgessner
         | 
| 3 | 
            +
            %%Title: sample.ps
         | 
| 4 | 
            +
            %%CreationDate: Sun Feb  6 22:49:17 2011
         | 
| 5 | 
            +
            %%DocumentData: Clean7Bit
         | 
| 6 | 
            +
            %%LanguageLevel: 2
         | 
| 7 | 
            +
            %%Pages: 1
         | 
| 8 | 
            +
            %%BoundingBox: 14 14 115 115
         | 
| 9 | 
            +
            %%EndComments
         | 
| 10 | 
            +
            %%BeginProlog
         | 
| 11 | 
            +
            % Use own dictionary to avoid conflicts
         | 
| 12 | 
            +
            10 dict begin
         | 
| 13 | 
            +
            %%EndProlog
         | 
| 14 | 
            +
            %%Page: 1 1
         | 
| 15 | 
            +
            % Translate for offset
         | 
| 16 | 
            +
            14.173228346456694 14.173228346456694 translate
         | 
| 17 | 
            +
            % Translate to begin of first scanline
         | 
| 18 | 
            +
            0 99.999999999999986 translate
         | 
| 19 | 
            +
            99.999999999999986 -99.999999999999986 scale
         | 
| 20 | 
            +
            % Image geometry
         | 
| 21 | 
            +
            100 100 8
         | 
| 22 | 
            +
            % Transformation matrix
         | 
| 23 | 
            +
            [ 100 0 0 100 0 0 ]
         | 
| 24 | 
            +
            % Strings to hold RGB-samples per scanline
         | 
| 25 | 
            +
            /rstr 100 string def
         | 
| 26 | 
            +
            /gstr 100 string def
         | 
| 27 | 
            +
            /bstr 100 string def
         | 
| 28 | 
            +
            {currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop}
         | 
| 29 | 
            +
            {currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop}
         | 
| 30 | 
            +
            {currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop}
         | 
| 31 | 
            +
            true 3
         | 
| 32 | 
            +
            %%BeginData:         3724 ASCII Bytes
         | 
| 33 | 
            +
            colorimage
         | 
| 34 | 
            +
            SHaT~>
         | 
| 35 | 
            +
            Sc=3~>
         | 
| 36 | 
            +
            SH+0~>
         | 
| 37 | 
            +
            SHaT~>
         | 
| 38 | 
            +
            Sc=3~>
         | 
| 39 | 
            +
            SH+0~>
         | 
| 40 | 
            +
            SHaT~>
         | 
| 41 | 
            +
            Sc=3~>
         | 
| 42 | 
            +
            SH+0~>
         | 
| 43 | 
            +
            SHaT~>
         | 
| 44 | 
            +
            Sc=3~>
         | 
| 45 | 
            +
            SH+0~>
         | 
| 46 | 
            +
            SHaT~>
         | 
| 47 | 
            +
            Sc=3~>
         | 
| 48 | 
            +
            SH+0~>
         | 
| 49 | 
            +
            SHaT~>
         | 
| 50 | 
            +
            Sc=3~>
         | 
| 51 | 
            +
            SH+0~>
         | 
| 52 | 
            +
            SHaT~>
         | 
| 53 | 
            +
            Sc=3~>
         | 
| 54 | 
            +
            SH+0~>
         | 
| 55 | 
            +
            SHaT~>
         | 
| 56 | 
            +
            Sc=3~>
         | 
| 57 | 
            +
            SH+0~>
         | 
| 58 | 
            +
            SHaT~>
         | 
| 59 | 
            +
            Sc=3~>
         | 
| 60 | 
            +
            SH+0~>
         | 
| 61 | 
            +
            SHaT~>
         | 
| 62 | 
            +
            Sc=3~>
         | 
| 63 | 
            +
            SH+0~>
         | 
| 64 | 
            +
            SHaT~>
         | 
| 65 | 
            +
            Sc=3~>
         | 
| 66 | 
            +
            SH+0~>
         | 
| 67 | 
            +
            SHaT~>
         | 
| 68 | 
            +
            Sc=3~>
         | 
| 69 | 
            +
            SH+0~>
         | 
| 70 | 
            +
            SHaT~>
         | 
| 71 | 
            +
            Sc=3~>
         | 
| 72 | 
            +
            SH+0~>
         | 
| 73 | 
            +
            SHaT~>
         | 
| 74 | 
            +
            Sc=3~>
         | 
| 75 | 
            +
            SH+0~>
         | 
| 76 | 
            +
            SHaT~>
         | 
| 77 | 
            +
            Sc=3~>
         | 
| 78 | 
            +
            SH+0~>
         | 
| 79 | 
            +
            SHaT~>
         | 
| 80 | 
            +
            Sc=3~>
         | 
| 81 | 
            +
            SH+0~>
         | 
| 82 | 
            +
            SHaT~>
         | 
| 83 | 
            +
            Sc=3~>
         | 
| 84 | 
            +
            SH+0~>
         | 
| 85 | 
            +
            SHaT~>
         | 
| 86 | 
            +
            Sc=3~>
         | 
| 87 | 
            +
            SH+0~>
         | 
| 88 | 
            +
            SHaT~>
         | 
| 89 | 
            +
            Sc=3~>
         | 
| 90 | 
            +
            SH+0~>
         | 
| 91 | 
            +
            SHaT~>
         | 
| 92 | 
            +
            Sc=3~>
         | 
| 93 | 
            +
            SH+0~>
         | 
| 94 | 
            +
            SHaT~>
         | 
| 95 | 
            +
            Sc=3~>
         | 
| 96 | 
            +
            SH+0~>
         | 
| 97 | 
            +
            SHaT~>
         | 
| 98 | 
            +
            Sc=3~>
         | 
| 99 | 
            +
            SH+0~>
         | 
| 100 | 
            +
            SHaT~>
         | 
| 101 | 
            +
            Sc=3~>
         | 
| 102 | 
            +
            SH+0~>
         | 
| 103 | 
            +
            SHaT~>
         | 
| 104 | 
            +
            Sc=3~>
         | 
| 105 | 
            +
            SH+0~>
         | 
| 106 | 
            +
            SHaT~>
         | 
| 107 | 
            +
            Sc=3~>
         | 
| 108 | 
            +
            SH+0~>
         | 
| 109 | 
            +
            SHaT~>
         | 
| 110 | 
            +
            Sc=3~>
         | 
| 111 | 
            +
            SH+0~>
         | 
| 112 | 
            +
            SHaT~>
         | 
| 113 | 
            +
            Sc=3~>
         | 
| 114 | 
            +
            SH+0~>
         | 
| 115 | 
            +
            SHaT~>
         | 
| 116 | 
            +
            Sc=3~>
         | 
| 117 | 
            +
            SH+0~>
         | 
| 118 | 
            +
            SHaT~>
         | 
| 119 | 
            +
            Sc=3~>
         | 
| 120 | 
            +
            SH+0~>
         | 
| 121 | 
            +
            SHaT~>
         | 
| 122 | 
            +
            Sc=3~>
         | 
| 123 | 
            +
            SH+0~>
         | 
| 124 | 
            +
            SHaT~>
         | 
| 125 | 
            +
            Sc=3~>
         | 
| 126 | 
            +
            SH+0~>
         | 
| 127 | 
            +
            SHaT~>
         | 
| 128 | 
            +
            Sc=3~>
         | 
| 129 | 
            +
            SH+0~>
         | 
| 130 | 
            +
            SHaT~>
         | 
| 131 | 
            +
            Sc=3~>
         | 
| 132 | 
            +
            SH+0~>
         | 
| 133 | 
            +
            SHaT~>
         | 
| 134 | 
            +
            Sc=3~>
         | 
| 135 | 
            +
            SH+0~>
         | 
| 136 | 
            +
            SHaT~>
         | 
| 137 | 
            +
            Sc=3~>
         | 
| 138 | 
            +
            SH+0~>
         | 
| 139 | 
            +
            SHaT~>
         | 
| 140 | 
            +
            Sc=3~>
         | 
| 141 | 
            +
            SH+0~>
         | 
| 142 | 
            +
            SHaT~>
         | 
| 143 | 
            +
            Sc=3~>
         | 
| 144 | 
            +
            SH+0~>
         | 
| 145 | 
            +
            SHaT~>
         | 
| 146 | 
            +
            Sc=3~>
         | 
| 147 | 
            +
            SH+0~>
         | 
| 148 | 
            +
            ]a"H9j9C,~>
         | 
| 149 | 
            +
            ^&S'3jSs`~>
         | 
| 150 | 
            +
            SH+0~>
         | 
| 151 | 
            +
            p'(a*!W`9$!<NAM#6"V`#(Q~>
         | 
| 152 | 
            +
            pAYBH=;_5I*^FVis8E#Zs*t~>
         | 
| 153 | 
            +
            SH+0~>
         | 
| 154 | 
            +
            pBCU$q#JbGrW)!`J,~>
         | 
| 155 | 
            +
            p\t9:$2OYKs8E#Zs*t~>
         | 
| 156 | 
            +
            SH+0~>
         | 
| 157 | 
            +
            pBCm)!!!**"pG,1cj'ILj9C,~>
         | 
| 158 | 
            +
            p\tLe!!%lFq:_2pd/X(FjSs`~>
         | 
| 159 | 
            +
            SH+0~>
         | 
| 160 | 
            +
            pBLTsp'(L"r;Zm"!X8N,rW!90!WW6'"pG&.!<`6(rW!*+!s&B&"8rH'!<!*+"9JT(!!3;l#(Q~>
         | 
| 161 | 
            +
            p\t=(!!)]drrA\j!!<KNA)$t^rW!>u?O@U/s4p*K(O,cTs8E!&rJN!-+F<b\s8E#srs#l+(^1L=
         | 
| 162 | 
            +
            X7-(=~>
         | 
| 163 | 
            +
            SH+0~>
         | 
| 164 | 
            +
            pBLTs!<NH""on`$!!!3%#6"T&!rW*"!s/?#!!E0(rVup"qu?]trW`?%rWW?(q>^Ksn-4C~>
         | 
| 165 | 
            +
            p\t@+!!$BRq#:>$qZ$X,fDbgL!!#pq!!.urr;ZhNrVuis!+l'."$cY^s8E#urrN+3q>^M-nGe"~>
         | 
| 166 | 
            +
            SH+0~>
         | 
| 167 | 
            +
            pBCU"r;Zm"!sJK*#Qb,4"pP/0!!<-(rW!!$"pFo*"Tel2!!!&u#6"T/!<iZ2!<<*%"pY&,rrrf5
         | 
| 168 | 
            +
            !!!$'"pG&.!!MfrJ,~>
         | 
| 169 | 
            +
            p\t55r;ZpMJ%PXVrs2f$jSS:s!!$7&s8E!":%+hU!!Q'bT`>'<rVuis#q*plbp`VmNW9%X!<<'+
         | 
| 170 | 
            +
            SH&X?`qnUe!!&__s*t~>
         | 
| 171 | 
            +
            SH+0~>
         | 
| 172 | 
            +
            p'(L!qZ$Wt"nr6$!!!'!#6"T("U521!!3<.#6"W$#6"T&"TAT/"98E&"pY&,rrrQ+!!!3%"p5#/
         | 
| 173 | 
            +
            !!2ToJ,~>
         | 
| 174 | 
            +
            p\t<mJ-u2S!@?@mrr`0!!#tq;rW!#Is76-h"jd5F!!!3$s8Duu^&J$8^&S-fs8W&us8N0Y!!(1@
         | 
| 175 | 
            +
            rr_Kc!'0TLJ,~>
         | 
| 176 | 
            +
            SH+0~>
         | 
| 177 | 
            +
            oEG<u!rW*!!rW<("9SE"rW`?%rW`?%rW`?%r<E6$r!*-#rs&H&rs&/snHOL~>
         | 
| 178 | 
            +
            p&>-[O'3+o!!#=arri=j5nsP$!!!0$s8E!"q>^Hn!!W/trrE*"rVuis!;?El"nhor$31&)!<<'!
         | 
| 179 | 
            +
            $MXT$%.X@J~>
         | 
| 180 | 
            +
            SH+0~>
         | 
| 181 | 
            +
            ncf*u!r`3!"onc#!<*3%!<*3%!<*3%!<!-$!;m'#!<39&!<38s!:^8D~>
         | 
| 182 | 
            +
            o)AjU7fWMprr2t@p]1<nrW)rtrW)rtrW)osrVurlrr3/q!!!?*s8E#urr<E#!:g)>~>
         | 
| 183 | 
            +
            SH+0~>
         | 
| 184 | 
            +
            n-8jlrW`?%!!N9*rW)p%rW)p%rW)p%rW)m$rVup$rWWN/!!!$(#6"W&"p4l+!!VWlJ,~>
         | 
| 185 | 
            +
            nc&^\!!!K-rrs&8!2oJhoDSahs8E#ts8E#ts8E#ss8Duu^Ae-9^&S-fs8W&us8N0[!!(a<s*t~>
         | 
| 186 | 
            +
            SH+0~>
         | 
| 187 | 
            +
            pBC["!sSZ.!s8N'!r`E'!!<?."TnZ'rW`?%rW`?%rW`?%r<E6$#lt26"T\T'!sSu/!<361"98E&
         | 
| 188 | 
            +
            "9o&6"9S\p#(Q~>
         | 
| 189 | 
            +
            p\tOOJACIJmY1]A7/m2j%0-C6q:emJ!<3#t!<3#t!<3#t!<)rs!!t+!qT^Mi!0$sXrW)uu$D@G"
         | 
| 190 | 
            +
            0Yd;XkIl?rnc++~>
         | 
| 191 | 
            +
            SH+0~>
         | 
| 192 | 
            +
            pBLBm!!W?+!!E-!!!<-"rW`?%rW`?%rW`?%r<E6$!!<&u!!3''rW)p%!!DurnHOL~>
         | 
| 193 | 
            +
            p]($h!=?jHrr?j4!!$@)!<3#t!<3#t!<3#t!<)rs!!$U.!!>@[s8W&urr2t>p]0jaJ,~>
         | 
| 194 | 
            +
            SH+0~>
         | 
| 195 | 
            +
            pBC[%!Wi9#!W`?+r!!<,!<<-"W%#6"W%#6"W%#6"W$#6"T+"p4l+!<`9)rW)m$#R(81!!!$#
         | 
| 196 | 
            +
            !sS3!J,~>
         | 
| 197 | 
            +
            p\tMl@5&;r#9dL*rVm)uINJ_8IJa!Drr;rtrr;rtrr;rtrVuis#5sH+"s8*_rr;rtrVm/@>pBXY
         | 
| 198 | 
            +
            (I*>qnc++~>
         | 
| 199 | 
            +
            SH+0~>
         | 
| 200 | 
            +
            ap.hFf*6a~>
         | 
| 201 | 
            +
            b5_G@fDg@~>
         | 
| 202 | 
            +
            SH+0~>
         | 
| 203 | 
            +
            ap.hFf*6a~>
         | 
| 204 | 
            +
            b5_G@fDg@~>
         | 
| 205 | 
            +
            SH+0~>
         | 
| 206 | 
            +
            ap.hFf*6a~>
         | 
| 207 | 
            +
            b5_G@fDg@~>
         | 
| 208 | 
            +
            SH+0~>
         | 
| 209 | 
            +
            ap.hFf*6a~>
         | 
| 210 | 
            +
            b5_G@fDg@~>
         | 
| 211 | 
            +
            SH+0~>
         | 
| 212 | 
            +
            SHaT~>
         | 
| 213 | 
            +
            Sc=3~>
         | 
| 214 | 
            +
            SH+0~>
         | 
| 215 | 
            +
            SHaT~>
         | 
| 216 | 
            +
            Sc=3~>
         | 
| 217 | 
            +
            SH+0~>
         | 
| 218 | 
            +
            SHaT~>
         | 
| 219 | 
            +
            Sc=3~>
         | 
| 220 | 
            +
            SH+0~>
         | 
| 221 | 
            +
            SHaT~>
         | 
| 222 | 
            +
            Sc=3~>
         | 
| 223 | 
            +
            SH+0~>
         | 
| 224 | 
            +
            SHaT~>
         | 
| 225 | 
            +
            Sc=3~>
         | 
| 226 | 
            +
            SH+0~>
         | 
| 227 | 
            +
            SHaT~>
         | 
| 228 | 
            +
            Sc=3~>
         | 
| 229 | 
            +
            SH+0~>
         | 
| 230 | 
            +
            SHaT~>
         | 
| 231 | 
            +
            Sc=3~>
         | 
| 232 | 
            +
            SH+0~>
         | 
| 233 | 
            +
            SHaT~>
         | 
| 234 | 
            +
            Sc=3~>
         | 
| 235 | 
            +
            SH+0~>
         | 
| 236 | 
            +
            SHaT~>
         | 
| 237 | 
            +
            Sc=3~>
         | 
| 238 | 
            +
            SH+0~>
         | 
| 239 | 
            +
            SHaT~>
         | 
| 240 | 
            +
            Sc=3~>
         | 
| 241 | 
            +
            SH+0~>
         | 
| 242 | 
            +
            SHaT~>
         | 
| 243 | 
            +
            Sc=3~>
         | 
| 244 | 
            +
            SH+0~>
         | 
| 245 | 
            +
            SHaT~>
         | 
| 246 | 
            +
            Sc=3~>
         | 
| 247 | 
            +
            SH+0~>
         | 
| 248 | 
            +
            SHaT~>
         | 
| 249 | 
            +
            Sc=3~>
         | 
| 250 | 
            +
            SH+0~>
         | 
| 251 | 
            +
            SHaT~>
         | 
| 252 | 
            +
            Sc=3~>
         | 
| 253 | 
            +
            SH+0~>
         | 
| 254 | 
            +
            SHaT~>
         | 
| 255 | 
            +
            Sc=3~>
         | 
| 256 | 
            +
            SH+0~>
         | 
| 257 | 
            +
            SHaT~>
         | 
| 258 | 
            +
            Sc=3~>
         | 
| 259 | 
            +
            SH+0~>
         | 
| 260 | 
            +
            SHaT~>
         | 
| 261 | 
            +
            Sc=3~>
         | 
| 262 | 
            +
            SH+0~>
         | 
| 263 | 
            +
            SHaT~>
         | 
| 264 | 
            +
            Sc=3~>
         | 
| 265 | 
            +
            SH+0~>
         | 
| 266 | 
            +
            SHaT~>
         | 
| 267 | 
            +
            Sc=3~>
         | 
| 268 | 
            +
            SH+0~>
         | 
| 269 | 
            +
            SHaT~>
         | 
| 270 | 
            +
            Sc=3~>
         | 
| 271 | 
            +
            SH+0~>
         | 
| 272 | 
            +
            SHaT~>
         | 
| 273 | 
            +
            Sc=3~>
         | 
| 274 | 
            +
            SH+0~>
         | 
| 275 | 
            +
            SHaT~>
         | 
| 276 | 
            +
            Sc=3~>
         | 
| 277 | 
            +
            SH+0~>
         | 
| 278 | 
            +
            SHaT~>
         | 
| 279 | 
            +
            Sc=3~>
         | 
| 280 | 
            +
            SH+0~>
         | 
| 281 | 
            +
            SHaT~>
         | 
| 282 | 
            +
            Sc=3~>
         | 
| 283 | 
            +
            SH+0~>
         | 
| 284 | 
            +
            SHaT~>
         | 
| 285 | 
            +
            Sc=3~>
         | 
| 286 | 
            +
            SH+0~>
         | 
| 287 | 
            +
            SHaT~>
         | 
| 288 | 
            +
            Sc=3~>
         | 
| 289 | 
            +
            SH+0~>
         | 
| 290 | 
            +
            SHaT~>
         | 
| 291 | 
            +
            Sc=3~>
         | 
| 292 | 
            +
            SH+0~>
         | 
| 293 | 
            +
            SHaT~>
         | 
| 294 | 
            +
            Sc=3~>
         | 
| 295 | 
            +
            SH+0~>
         | 
| 296 | 
            +
            SHaT~>
         | 
| 297 | 
            +
            Sc=3~>
         | 
| 298 | 
            +
            SH+0~>
         | 
| 299 | 
            +
            SHaT~>
         | 
| 300 | 
            +
            Sc=3~>
         | 
| 301 | 
            +
            SH+0~>
         | 
| 302 | 
            +
            SHaT~>
         | 
| 303 | 
            +
            Sc=3~>
         | 
| 304 | 
            +
            SH+0~>
         | 
| 305 | 
            +
            SHaT~>
         | 
| 306 | 
            +
            Sc=3~>
         | 
| 307 | 
            +
            SH+0~>
         | 
| 308 | 
            +
            SHaT~>
         | 
| 309 | 
            +
            Sc=3~>
         | 
| 310 | 
            +
            SH+0~>
         | 
| 311 | 
            +
            SHaT~>
         | 
| 312 | 
            +
            Sc=3~>
         | 
| 313 | 
            +
            SH+0~>
         | 
| 314 | 
            +
            SHaT~>
         | 
| 315 | 
            +
            Sc=3~>
         | 
| 316 | 
            +
            SH+0~>
         | 
| 317 | 
            +
            SHaT~>
         | 
| 318 | 
            +
            Sc=3~>
         | 
| 319 | 
            +
            SH+0~>
         | 
| 320 | 
            +
            SHaT~>
         | 
| 321 | 
            +
            Sc=3~>
         | 
| 322 | 
            +
            SH+0~>
         | 
| 323 | 
            +
            SHaT~>
         | 
| 324 | 
            +
            Sc=3~>
         | 
| 325 | 
            +
            SH+0~>
         | 
| 326 | 
            +
            SHaT~>
         | 
| 327 | 
            +
            Sc=3~>
         | 
| 328 | 
            +
            SH+0~>
         | 
| 329 | 
            +
            SHaT~>
         | 
| 330 | 
            +
            Sc=3~>
         | 
| 331 | 
            +
            SH+0~>
         | 
| 332 | 
            +
            SHaT~>
         | 
| 333 | 
            +
            Sc=3~>
         | 
| 334 | 
            +
            SH+0~>
         | 
| 335 | 
            +
            SHaT~>
         | 
| 336 | 
            +
            Sc=3~>
         | 
| 337 | 
            +
            SH+0~>
         | 
| 338 | 
            +
            SHaT~>
         | 
| 339 | 
            +
            Sc=3~>
         | 
| 340 | 
            +
            SH+0~>
         | 
| 341 | 
            +
            SHaT~>
         | 
| 342 | 
            +
            Sc=3~>
         | 
| 343 | 
            +
            SH+0~>
         | 
| 344 | 
            +
            %%EndData
         | 
| 345 | 
            +
            showpage
         | 
| 346 | 
            +
            %%Trailer
         | 
| 347 | 
            +
            end
         | 
| 348 | 
            +
            %%EOF
         | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,88 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 | 
            +
            name: sixarm_ruby_magic_number_type
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              prerelease: 
         | 
| 5 | 
            +
              version: 1.0.0
         | 
| 6 | 
            +
            platform: ruby
         | 
| 7 | 
            +
            authors: 
         | 
| 8 | 
            +
            - SixArm
         | 
| 9 | 
            +
            autorequire: 
         | 
| 10 | 
            +
            bindir: bin
         | 
| 11 | 
            +
            cert_chain: 
         | 
| 12 | 
            +
            - |
         | 
| 13 | 
            +
              -----BEGIN CERTIFICATE-----
         | 
| 14 | 
            +
              MIIDBDCCAm2gAwIBAgIJAKPwEETU5bHoMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
         | 
| 15 | 
            +
              BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
         | 
| 16 | 
            +
              c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTAx
         | 
| 17 | 
            +
              MjEzMjMyNzEzWhcNMTMwOTA4MjMyNzEzWjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
         | 
| 18 | 
            +
              CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEPMA0GA1UEChMG
         | 
| 19 | 
            +
              U2l4QXJtMRMwEQYDVQQDEwpzaXhhcm0uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
         | 
| 20 | 
            +
              ADCBiQKBgQC94mD9JDwBsunsOI0VR3CXXbOWg9cWaWciwFyJNFiM7A9I8KPLfXUw
         | 
| 21 | 
            +
              QC4czUe5ZuG4WHvinrWhkrCK+1dWBqoEClxdF/FoKO5a+tonGCjjmfy81JmFjjyx
         | 
| 22 | 
            +
              eTsjsHyvw+Qik9kpf9aj6+pnkNrVswgNHVea2o9yabbEiS6VSeJWoQIDAQABo4HF
         | 
| 23 | 
            +
              MIHCMB0GA1UdDgQWBBQzPJtqmSgc53eDN7aSzDQwr9TALDCBkgYDVR0jBIGKMIGH
         | 
| 24 | 
            +
              gBQzPJtqmSgc53eDN7aSzDQwr9TALKFkpGIwYDELMAkGA1UEBhMCVVMxEzARBgNV
         | 
| 25 | 
            +
              BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xDzANBgNVBAoT
         | 
| 26 | 
            +
              BlNpeEFybTETMBEGA1UEAxMKc2l4YXJtLmNvbYIJAKPwEETU5bHoMAwGA1UdEwQF
         | 
| 27 | 
            +
              MAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAooEexP/oPam1TP71SyuhxMb+uTrZbSQe
         | 
| 28 | 
            +
              jVB+ExRwWadGwaNPUA56d39qwavwP+iu+3JpeonNMVvbWXF5naCX/dNFIeREHzER
         | 
| 29 | 
            +
              ZDRQYMqru9TEMna6HD9zpcstF7vwThGovlOQ+3Y6plQ4nMzipXcZ9THqs65PIL0q
         | 
| 30 | 
            +
              eabwpCbAopo=
         | 
| 31 | 
            +
              -----END CERTIFICATE-----
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            date: 2011-02-07 00:00:00 -08:00
         | 
| 34 | 
            +
            default_executable: 
         | 
| 35 | 
            +
            dependencies: []
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            description: 
         | 
| 38 | 
            +
            email: sixarm@sixarm.com
         | 
| 39 | 
            +
            executables: []
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            extensions: []
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            extra_rdoc_files: []
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            files: 
         | 
| 46 | 
            +
            - README.rdoc
         | 
| 47 | 
            +
            - LICENSE.txt
         | 
| 48 | 
            +
            - lib/sixarm_ruby_magic_number_type.rb
         | 
| 49 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.fit
         | 
| 50 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.gif
         | 
| 51 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.jpg
         | 
| 52 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.png
         | 
| 53 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.ps
         | 
| 54 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.ras
         | 
| 55 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.sgi
         | 
| 56 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.tiff
         | 
| 57 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.xcf.bz2
         | 
| 58 | 
            +
            - test/sixarm_ruby_magic_number_type/sample.xcf.gz
         | 
| 59 | 
            +
            has_rdoc: true
         | 
| 60 | 
            +
            homepage: http://sixarm.com/
         | 
| 61 | 
            +
            licenses: []
         | 
| 62 | 
            +
             | 
| 63 | 
            +
            post_install_message: 
         | 
| 64 | 
            +
            rdoc_options: []
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            require_paths: 
         | 
| 67 | 
            +
            - lib
         | 
| 68 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 69 | 
            +
              none: false
         | 
| 70 | 
            +
              requirements: 
         | 
| 71 | 
            +
              - - ">="
         | 
| 72 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 73 | 
            +
                  version: "0"
         | 
| 74 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 75 | 
            +
              none: false
         | 
| 76 | 
            +
              requirements: 
         | 
| 77 | 
            +
              - - ">="
         | 
| 78 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 79 | 
            +
                  version: "0"
         | 
| 80 | 
            +
            requirements: []
         | 
| 81 | 
            +
             | 
| 82 | 
            +
            rubyforge_project: 
         | 
| 83 | 
            +
            rubygems_version: 1.5.0
         | 
| 84 | 
            +
            signing_key: 
         | 
| 85 | 
            +
            specification_version: 3
         | 
| 86 | 
            +
            summary: "SixArm.com \xC2\xBB Ruby \xC2\xBB Magic number type inspects bytes to decide on a mime type"
         | 
| 87 | 
            +
            test_files: []
         | 
| 88 | 
            +
             | 
    
        metadata.gz.sig
    ADDED