mime-types 1.16 → 3.5.2
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.
- checksums.yaml +7 -0
 - data/.standard.yml +4 -0
 - data/Code-of-Conduct.md +73 -0
 - data/Contributing.md +133 -0
 - data/History.md +335 -0
 - data/Licence.md +25 -0
 - data/Manifest.txt +27 -7
 - data/README.rdoc +194 -0
 - data/Rakefile +191 -278
 - data/lib/mime/type/columnar.rb +57 -0
 - data/lib/mime/type.rb +660 -0
 - data/lib/mime/types/_columnar.rb +137 -0
 - data/lib/mime/types/cache.rb +54 -0
 - data/lib/mime/types/columnar.rb +3 -0
 - data/lib/mime/types/container.rb +96 -0
 - data/lib/mime/types/deprecations.rb +36 -0
 - data/lib/mime/types/full.rb +19 -0
 - data/lib/mime/types/loader.rb +159 -0
 - data/lib/mime/types/logger.rb +37 -0
 - data/lib/mime/types/registry.rb +90 -0
 - data/lib/mime/types.rb +197 -715
 - data/lib/mime-types.rb +3 -0
 - data/test/bad-fixtures/malformed +9 -0
 - data/test/fixture/json.json +1 -0
 - data/test/fixture/old-data +9 -0
 - data/test/fixture/yaml.yaml +55 -0
 - data/test/minitest_helper.rb +10 -0
 - data/test/test_mime_type.rb +585 -284
 - data/test/test_mime_types.rb +134 -83
 - data/test/test_mime_types_cache.rb +118 -0
 - data/test/test_mime_types_class.rb +164 -0
 - data/test/test_mime_types_lazy.rb +49 -0
 - data/test/test_mime_types_loader.rb +32 -0
 - metadata +295 -110
 - data/History.txt +0 -107
 - data/Install.txt +0 -17
 - data/Licence.txt +0 -15
 - data/README.txt +0 -28
 - data/lib/mime/types.rb.data +0 -1324
 - data/mime-types.gemspec +0 -43
 - data/setup.rb +0 -1585
 - data.tar.gz.sig +0 -2
 - metadata.gz.sig +0 -0
 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -1,316 +1,229 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
               
     | 
| 
       29 
     | 
    
         
            -
               
     | 
| 
       30 
     | 
    
         
            -
               
     | 
| 
       31 
     | 
    
         
            -
               
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
               
     | 
| 
       34 
     | 
    
         
            -
               
     | 
| 
       35 
     | 
    
         
            -
               
     | 
| 
       36 
     | 
    
         
            -
               
     | 
| 
       37 
     | 
    
         
            -
              p.changes         = p.paragraphs_of("History.txt", 0..0).join("\n\n")
         
     | 
| 
       38 
     | 
    
         
            -
              p.description     = p.paragraphs_of("README.txt", 1..1).join("\n\n")
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
              p.extra_dev_deps  << %w(archive-tar-minitar ~>0.5)
         
     | 
| 
       41 
     | 
    
         
            -
              p.extra_dev_deps  << %w(nokogiri ~>1.2)
         
     | 
| 
       42 
     | 
    
         
            -
              p.extra_dev_deps  << %w(rcov ~>0.8)
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
              p.clean_globs     << "coverage"
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
              p.spec_extras[:extra_rdoc_files] = MANIFEST.grep(/txt$/) - ["Manifest.txt"]
         
     | 
| 
      
 1 
     | 
    
         
            +
            require "rubygems"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "hoe"
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "rake/clean"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Hoe.plugin :cov
         
     | 
| 
      
 6 
     | 
    
         
            +
            Hoe.plugin :doofus
         
     | 
| 
      
 7 
     | 
    
         
            +
            Hoe.plugin :gemspec2
         
     | 
| 
      
 8 
     | 
    
         
            +
            Hoe.plugin :git2
         
     | 
| 
      
 9 
     | 
    
         
            +
            Hoe.plugin :minitest
         
     | 
| 
      
 10 
     | 
    
         
            +
            Hoe.plugin :rubygems
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            spec = Hoe.spec "mime-types" do
         
     | 
| 
      
 13 
     | 
    
         
            +
              developer("Austin Ziegler", "halostatue@gmail.com")
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              self.history_file = "History.md"
         
     | 
| 
      
 16 
     | 
    
         
            +
              self.readme_file = "README.rdoc"
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              license "MIT"
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              require_ruby_version ">= 2.0"
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" }
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              extra_deps << ["mime-types-data", "~> 3.2015"]
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              extra_dev_deps << ["hoe", ">= 3.0", "< 5"]
         
     | 
| 
      
 27 
     | 
    
         
            +
              extra_dev_deps << ["hoe-doofus", "~> 1.0"]
         
     | 
| 
      
 28 
     | 
    
         
            +
              extra_dev_deps << ["hoe-gemspec2", "~> 1.1"]
         
     | 
| 
      
 29 
     | 
    
         
            +
              extra_dev_deps << ["hoe-git2", "~> 1.7"]
         
     | 
| 
      
 30 
     | 
    
         
            +
              extra_dev_deps << ["hoe-rubygems", "~> 1.0"]
         
     | 
| 
      
 31 
     | 
    
         
            +
              extra_dev_deps << ["minitest", "~> 5.0"]
         
     | 
| 
      
 32 
     | 
    
         
            +
              extra_dev_deps << ["minitest-autotest", "~> 1.0"]
         
     | 
| 
      
 33 
     | 
    
         
            +
              extra_dev_deps << ["minitest-focus", "~> 1.0"]
         
     | 
| 
      
 34 
     | 
    
         
            +
              extra_dev_deps << ["minitest-hooks", "~> 1.4"]
         
     | 
| 
      
 35 
     | 
    
         
            +
              extra_dev_deps << ["rake", ">= 10.0", "< 14.0"]
         
     | 
| 
      
 36 
     | 
    
         
            +
              extra_dev_deps << ["standard", "~> 1.0"]
         
     | 
| 
       47 
37 
     | 
    
         
             
            end
         
     | 
| 
       48 
38 
     | 
    
         | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
               
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                 
     | 
| 
       54 
     | 
    
         
            -
                t.verbose = true
         
     | 
| 
      
 39 
     | 
    
         
            +
            namespace :benchmark do
         
     | 
| 
      
 40 
     | 
    
         
            +
              task :support do
         
     | 
| 
      
 41 
     | 
    
         
            +
                %w[lib support].each { |path|
         
     | 
| 
      
 42 
     | 
    
         
            +
                  $LOAD_PATH.unshift(File.join(Rake.application.original_dir, path))
         
     | 
| 
      
 43 
     | 
    
         
            +
                }
         
     | 
| 
       55 
44 
     | 
    
         
             
              end
         
     | 
| 
       56 
     | 
    
         
            -
            rescue LoadError
         
     | 
| 
       57 
     | 
    
         
            -
              puts "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
         
     | 
| 
       58 
     | 
    
         
            -
            end
         
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
            =begin
         
     | 
| 
       61 
     | 
    
         
            -
              require 'cucumber/rake/task'
         
     | 
| 
       62 
     | 
    
         
            -
              Cucumber::Rake::Task.new(:features)
         
     | 
| 
       63 
     | 
    
         
            -
            rescue LoadError
         
     | 
| 
       64 
     | 
    
         
            -
              puts "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
         
     | 
| 
       65 
     | 
    
         
            -
            =end
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
            desc "Build a MIME::Types .tar.gz distribution."
         
     | 
| 
       68 
     | 
    
         
            -
            task :tar => [ PKG_TAR ]
         
     | 
| 
       69 
     | 
    
         
            -
            file PKG_TAR => [ :test ] do |t|
         
     | 
| 
       70 
     | 
    
         
            -
              require 'archive/tar/minitar'
         
     | 
| 
       71 
     | 
    
         
            -
              require 'zlib'
         
     | 
| 
       72 
     | 
    
         
            -
              files = MANIFEST.map { |f|
         
     | 
| 
       73 
     | 
    
         
            -
                fn = File.join(PKG_DIST, f)
         
     | 
| 
       74 
     | 
    
         
            -
                tm = File.stat(f).mtime
         
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
                if File.directory?(f)
         
     | 
| 
       77 
     | 
    
         
            -
                  { :name => fn, :mode => 0755, :dir => true, :mtime => tm }
         
     | 
| 
       78 
     | 
    
         
            -
                else
         
     | 
| 
       79 
     | 
    
         
            -
                  mode = if f =~ %r{^bin}
         
     | 
| 
       80 
     | 
    
         
            -
                           0755
         
     | 
| 
       81 
     | 
    
         
            -
                         else
         
     | 
| 
       82 
     | 
    
         
            -
                           0644
         
     | 
| 
       83 
     | 
    
         
            -
                         end
         
     | 
| 
       84 
     | 
    
         
            -
                  data = File.read(f)
         
     | 
| 
       85 
     | 
    
         
            -
                  { :name => fn, :mode => mode, :data => data, :size => data.size,
         
     | 
| 
       86 
     | 
    
         
            -
                    :mtime => tm }
         
     | 
| 
       87 
     | 
    
         
            -
                end
         
     | 
| 
       88 
     | 
    
         
            -
              }
         
     | 
| 
       89 
45 
     | 
    
         | 
| 
       90 
     | 
    
         
            -
               
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
                 
     | 
| 
       97 
     | 
    
         
            -
                tw = Archive::Tar::Minitar::Writer.new(gz)
         
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
                files.each do |entry|
         
     | 
| 
       100 
     | 
    
         
            -
                  if entry[:dir]
         
     | 
| 
       101 
     | 
    
         
            -
                    tw.mkdir(entry[:name], entry)
         
     | 
| 
       102 
     | 
    
         
            -
                  else
         
     | 
| 
       103 
     | 
    
         
            -
                    tw.add_file_simple(entry[:name], entry) { |os|
         
     | 
| 
       104 
     | 
    
         
            -
                      os.write(entry[:data])
         
     | 
| 
       105 
     | 
    
         
            -
                    }
         
     | 
| 
       106 
     | 
    
         
            -
                  end
         
     | 
| 
       107 
     | 
    
         
            -
                end
         
     | 
| 
       108 
     | 
    
         
            -
              ensure
         
     | 
| 
       109 
     | 
    
         
            -
                tw.close if tw
         
     | 
| 
       110 
     | 
    
         
            -
                gz.close if gz
         
     | 
| 
      
 46 
     | 
    
         
            +
              desc "Benchmark Load Times"
         
     | 
| 
      
 47 
     | 
    
         
            +
              task :load, [:repeats] => "benchmark:support" do |_, args|
         
     | 
| 
      
 48 
     | 
    
         
            +
                require "benchmarks/load"
         
     | 
| 
      
 49 
     | 
    
         
            +
                Benchmarks::Load.report(
         
     | 
| 
      
 50 
     | 
    
         
            +
                  File.join(Rake.application.original_dir, "lib"),
         
     | 
| 
      
 51 
     | 
    
         
            +
                  args.repeats
         
     | 
| 
      
 52 
     | 
    
         
            +
                )
         
     | 
| 
       111 
53 
     | 
    
         
             
              end
         
     | 
| 
       112 
     | 
    
         
            -
            end
         
     | 
| 
       113 
     | 
    
         
            -
            task :package => [ PKG_TAR ]
         
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
            desc "Build the manifest file from the current set of files."
         
     | 
| 
       116 
     | 
    
         
            -
            task :build_manifest do |t|
         
     | 
| 
       117 
     | 
    
         
            -
              require 'find'
         
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
              hoerc = File.join(File.dirname(__FILE__), ".hoerc")
         
     | 
| 
       120 
     | 
    
         
            -
              hoerc = File.open(hoerc, "rb") { |f| f.read }
         
     | 
| 
       121 
     | 
    
         
            -
              hoerc = YAML::load(hoerc)
         
     | 
| 
       122 
54 
     | 
    
         | 
| 
       123 
     | 
    
         
            -
               
     | 
| 
       124 
     | 
    
         
            -
               
     | 
| 
       125 
     | 
    
         
            -
                 
     | 
| 
       126 
     | 
    
         
            -
                 
     | 
| 
      
 55 
     | 
    
         
            +
              desc "Allocation counts"
         
     | 
| 
      
 56 
     | 
    
         
            +
              task :allocations, [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
         
     | 
| 
      
 57 
     | 
    
         
            +
                require "benchmarks/load_allocations"
         
     | 
| 
      
 58 
     | 
    
         
            +
                Benchmarks::LoadAllocations.report(
         
     | 
| 
      
 59 
     | 
    
         
            +
                  top_x: args.top_x,
         
     | 
| 
      
 60 
     | 
    
         
            +
                  mime_types_only: args.mime_types_only
         
     | 
| 
      
 61 
     | 
    
         
            +
                )
         
     | 
| 
       127 
62 
     | 
    
         
             
              end
         
     | 
| 
       128 
63 
     | 
    
         | 
| 
       129 
     | 
    
         
            -
               
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
                 
     | 
| 
      
 64 
     | 
    
         
            +
              desc "Columnar allocation counts"
         
     | 
| 
      
 65 
     | 
    
         
            +
              task "allocations:columnar", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
         
     | 
| 
      
 66 
     | 
    
         
            +
                require "benchmarks/load_allocations"
         
     | 
| 
      
 67 
     | 
    
         
            +
                Benchmarks::LoadAllocations.report(
         
     | 
| 
      
 68 
     | 
    
         
            +
                  columnar: true,
         
     | 
| 
      
 69 
     | 
    
         
            +
                  top_x: args.top_x,
         
     | 
| 
      
 70 
     | 
    
         
            +
                  mime_types_only: args.mime_types_only
         
     | 
| 
      
 71 
     | 
    
         
            +
                )
         
     | 
| 
       133 
72 
     | 
    
         
             
              end
         
     | 
| 
       134 
73 
     | 
    
         | 
| 
       135 
     | 
    
         
            -
               
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
       144 
     | 
    
         
            -
              when :text, :both, :html
         
     | 
| 
       145 
     | 
    
         
            -
                nil
         
     | 
| 
       146 
     | 
    
         
            -
              else
         
     | 
| 
       147 
     | 
    
         
            -
                raise "Unknown save type provided. Must be one of text, both, or html."
         
     | 
| 
      
 74 
     | 
    
         
            +
              desc "Columnar allocation counts (full load)"
         
     | 
| 
      
 75 
     | 
    
         
            +
              task "allocations:columnar:full", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
         
     | 
| 
      
 76 
     | 
    
         
            +
                require "benchmarks/load_allocations"
         
     | 
| 
      
 77 
     | 
    
         
            +
                Benchmarks::LoadAllocations.report(
         
     | 
| 
      
 78 
     | 
    
         
            +
                  columnar: true,
         
     | 
| 
      
 79 
     | 
    
         
            +
                  top_x: args.top_x,
         
     | 
| 
      
 80 
     | 
    
         
            +
                  mime_types_only: args.mime_types_only,
         
     | 
| 
      
 81 
     | 
    
         
            +
                  full: true
         
     | 
| 
      
 82 
     | 
    
         
            +
                )
         
     | 
| 
       148 
83 
     | 
    
         
             
              end
         
     | 
| 
       149 
84 
     | 
    
         | 
| 
       150 
     | 
    
         
            -
               
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
       154 
     | 
    
         
            -
             
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
             
     | 
| 
       158 
     | 
    
         
            -
             
     | 
| 
       159 
     | 
    
         
            -
                INDEX = %q(http://www.iana.org/assignments/media-types/)
         
     | 
| 
       160 
     | 
    
         
            -
                CONTACT_PEOPLE = %r{http://www.iana.org/assignments/contact-people.html?#(.*)}
         
     | 
| 
       161 
     | 
    
         
            -
                RFC_EDITOR = %r{http://www.rfc-editor.org/rfc/rfc(\d+).txt}
         
     | 
| 
       162 
     | 
    
         
            -
                IETF_RFC = %r{http://www.ietf.org/rfc/rfc(\d+).txt}
         
     | 
| 
       163 
     | 
    
         
            -
                IETF_RFC_TOOLS = %r{http://tools.ietf.org/html/rfc(\d+)}
         
     | 
| 
      
 85 
     | 
    
         
            +
              desc "Memory profiler"
         
     | 
| 
      
 86 
     | 
    
         
            +
              task :memory, [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
         
     | 
| 
      
 87 
     | 
    
         
            +
                require "benchmarks/memory_profiler"
         
     | 
| 
      
 88 
     | 
    
         
            +
                Benchmarks::ProfileMemory.report(
         
     | 
| 
      
 89 
     | 
    
         
            +
                  mime_types_only: args.mime_types_only,
         
     | 
| 
      
 90 
     | 
    
         
            +
                  top_x: args.top_x
         
     | 
| 
      
 91 
     | 
    
         
            +
                )
         
     | 
| 
      
 92 
     | 
    
         
            +
              end
         
     | 
| 
       164 
93 
     | 
    
         | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
             
     | 
| 
       167 
     | 
    
         
            -
             
     | 
| 
      
 94 
     | 
    
         
            +
              desc "Columnar memory profiler"
         
     | 
| 
      
 95 
     | 
    
         
            +
              task "memory:columnar", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
         
     | 
| 
      
 96 
     | 
    
         
            +
                require "benchmarks/memory_profiler"
         
     | 
| 
      
 97 
     | 
    
         
            +
                Benchmarks::ProfileMemory.report(
         
     | 
| 
      
 98 
     | 
    
         
            +
                  columnar: true,
         
     | 
| 
      
 99 
     | 
    
         
            +
                  mime_types_only: args.mime_types_only,
         
     | 
| 
      
 100 
     | 
    
         
            +
                  top_x: args.top_x
         
     | 
| 
      
 101 
     | 
    
         
            +
                )
         
     | 
| 
      
 102 
     | 
    
         
            +
              end
         
     | 
| 
       168 
103 
     | 
    
         | 
| 
       169 
     | 
    
         
            -
             
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
       171 
     | 
    
         
            -
             
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
             
     | 
| 
       175 
     | 
    
         
            -
                   
     | 
| 
      
 104 
     | 
    
         
            +
              desc "Columnar allocation counts (full load)"
         
     | 
| 
      
 105 
     | 
    
         
            +
              task "memory:columnar:full", [:top_x, :mime_types_only] => "benchmark:support" do |_, args|
         
     | 
| 
      
 106 
     | 
    
         
            +
                require "benchmarks/memory_profiler"
         
     | 
| 
      
 107 
     | 
    
         
            +
                Benchmarks::ProfileMemory.report(
         
     | 
| 
      
 108 
     | 
    
         
            +
                  columnar: true,
         
     | 
| 
      
 109 
     | 
    
         
            +
                  full: true,
         
     | 
| 
      
 110 
     | 
    
         
            +
                  top_x: args.top_x,
         
     | 
| 
      
 111 
     | 
    
         
            +
                  mime_types_only: args.mime_types_only
         
     | 
| 
      
 112 
     | 
    
         
            +
                )
         
     | 
| 
      
 113 
     | 
    
         
            +
              end
         
     | 
| 
       176 
114 
     | 
    
         | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
       178 
     | 
    
         
            -
             
     | 
| 
      
 115 
     | 
    
         
            +
              desc "Object counts"
         
     | 
| 
      
 116 
     | 
    
         
            +
              task objects: "benchmark:support" do
         
     | 
| 
      
 117 
     | 
    
         
            +
                require "benchmarks/object_counts"
         
     | 
| 
      
 118 
     | 
    
         
            +
                Benchmarks::ObjectCounts.report
         
     | 
| 
      
 119 
     | 
    
         
            +
              end
         
     | 
| 
       179 
120 
     | 
    
         | 
| 
       180 
     | 
    
         
            -
             
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
       184 
     | 
    
         
            -
             
     | 
| 
      
 121 
     | 
    
         
            +
              desc "Columnar object counts"
         
     | 
| 
      
 122 
     | 
    
         
            +
              task "objects:columnar" => "benchmark:support" do
         
     | 
| 
      
 123 
     | 
    
         
            +
                require "benchmarks/object_counts"
         
     | 
| 
      
 124 
     | 
    
         
            +
                Benchmarks::ObjectCounts.report(columnar: true)
         
     | 
| 
      
 125 
     | 
    
         
            +
              end
         
     | 
| 
       185 
126 
     | 
    
         | 
| 
       186 
     | 
    
         
            -
             
     | 
| 
       187 
     | 
    
         
            -
             
     | 
| 
       188 
     | 
    
         
            -
                 
     | 
| 
       189 
     | 
    
         
            -
                 
     | 
| 
      
 127 
     | 
    
         
            +
              desc "Columnar object counts (full load)"
         
     | 
| 
      
 128 
     | 
    
         
            +
              task "objects:columnar:full" => "benchmark:support" do
         
     | 
| 
      
 129 
     | 
    
         
            +
                require "benchmarks/object_counts"
         
     | 
| 
      
 130 
     | 
    
         
            +
                Benchmarks::ObjectCounts.report(columnar: true, full: true)
         
     | 
| 
      
 131 
     | 
    
         
            +
              end
         
     | 
| 
      
 132 
     | 
    
         
            +
            end
         
     | 
| 
       190 
133 
     | 
    
         | 
| 
       191 
     | 
    
         
            -
             
     | 
| 
       192 
     | 
    
         
            -
             
     | 
| 
       193 
     | 
    
         
            -
             
     | 
| 
      
 134 
     | 
    
         
            +
            namespace :profile do
         
     | 
| 
      
 135 
     | 
    
         
            +
              directory "tmp/profile"
         
     | 
| 
      
 136 
     | 
    
         
            +
             
     | 
| 
      
 137 
     | 
    
         
            +
              CLEAN.add "tmp"
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
              def ruby_prof(script)
         
     | 
| 
      
 140 
     | 
    
         
            +
                require "pathname"
         
     | 
| 
      
 141 
     | 
    
         
            +
                output = Pathname("tmp/profile").join(script)
         
     | 
| 
      
 142 
     | 
    
         
            +
                output.mkpath
         
     | 
| 
      
 143 
     | 
    
         
            +
                script = Pathname("support/profile").join("#{script}.rb")
         
     | 
| 
      
 144 
     | 
    
         
            +
             
     | 
| 
      
 145 
     | 
    
         
            +
                args = [
         
     | 
| 
      
 146 
     | 
    
         
            +
                  "-W0",
         
     | 
| 
      
 147 
     | 
    
         
            +
                  "-Ilib",
         
     | 
| 
      
 148 
     | 
    
         
            +
                  "-S", "ruby-prof",
         
     | 
| 
      
 149 
     | 
    
         
            +
                  "-R", "mime/types",
         
     | 
| 
      
 150 
     | 
    
         
            +
                  "-s", "self",
         
     | 
| 
      
 151 
     | 
    
         
            +
                  "-p", "multi",
         
     | 
| 
      
 152 
     | 
    
         
            +
                  "-f", output.to_s,
         
     | 
| 
      
 153 
     | 
    
         
            +
                  script.to_s
         
     | 
| 
      
 154 
     | 
    
         
            +
                ]
         
     | 
| 
      
 155 
     | 
    
         
            +
                ruby args.join(" ")
         
     | 
| 
      
 156 
     | 
    
         
            +
              end
         
     | 
| 
       194 
157 
     | 
    
         | 
| 
       195 
     | 
    
         
            -
             
     | 
| 
       196 
     | 
    
         
            -
             
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
      
 158 
     | 
    
         
            +
              task full: "tmp/profile" do
         
     | 
| 
      
 159 
     | 
    
         
            +
                ruby_prof "full"
         
     | 
| 
      
 160 
     | 
    
         
            +
              end
         
     | 
| 
       198 
161 
     | 
    
         | 
| 
       199 
     | 
    
         
            -
             
     | 
| 
       200 
     | 
    
         
            -
             
     | 
| 
       201 
     | 
    
         
            -
             
     | 
| 
      
 162 
     | 
    
         
            +
              task columnar: :support do
         
     | 
| 
      
 163 
     | 
    
         
            +
                ruby_prof "columnar"
         
     | 
| 
      
 164 
     | 
    
         
            +
              end
         
     | 
| 
       202 
165 
     | 
    
         | 
| 
       203 
     | 
    
         
            -
             
     | 
| 
       204 
     | 
    
         
            -
             
     | 
| 
       205 
     | 
    
         
            -
             
     | 
| 
       206 
     | 
    
         
            -
             
     | 
| 
       207 
     | 
    
         
            -
                  node_count = nodes.first.children.select { |node| node.elem? }.size
         
     | 
| 
       208 
     | 
    
         
            -
             
     | 
| 
       209 
     | 
    
         
            -
                  @mime_types = nodes.map do |node|
         
     | 
| 
       210 
     | 
    
         
            -
                    next if node == nodes.first
         
     | 
| 
       211 
     | 
    
         
            -
                    elems = node.children.select { |n| n.elem? }
         
     | 
| 
       212 
     | 
    
         
            -
                    next if elems.size.zero?
         
     | 
| 
       213 
     | 
    
         
            -
                    raise "size mismatch #{elems.size} != #{node_count}" if node_count != elems.size
         
     | 
| 
       214 
     | 
    
         
            -
             
     | 
| 
       215 
     | 
    
         
            -
                    case elems.size
         
     | 
| 
       216 
     | 
    
         
            -
                    when 3
         
     | 
| 
       217 
     | 
    
         
            -
                      subtype_index = 1
         
     | 
| 
       218 
     | 
    
         
            -
                      refnode_index = 2
         
     | 
| 
       219 
     | 
    
         
            -
                    when 4
         
     | 
| 
       220 
     | 
    
         
            -
                      subtype_index = 1
         
     | 
| 
       221 
     | 
    
         
            -
                      refnode_index = 3
         
     | 
| 
       222 
     | 
    
         
            -
                    else
         
     | 
| 
       223 
     | 
    
         
            -
                      raise "Unknown element size."
         
     | 
| 
       224 
     | 
    
         
            -
                    end
         
     | 
| 
       225 
     | 
    
         
            -
             
     | 
| 
       226 
     | 
    
         
            -
                    subtype   = elems[subtype_index].content.chomp.strip
         
     | 
| 
       227 
     | 
    
         
            -
                    refnodes  = elems[refnode_index].children.select { |n| n.elem? }.map { |ref|
         
     | 
| 
       228 
     | 
    
         
            -
                      case ref['href']
         
     | 
| 
       229 
     | 
    
         
            -
                      when CONTACT_PEOPLE
         
     | 
| 
       230 
     | 
    
         
            -
                        tag = CGI::unescape($1).chomp.strip
         
     | 
| 
       231 
     | 
    
         
            -
                        if tag == ref.content
         
     | 
| 
       232 
     | 
    
         
            -
                        "[#{ref.content}]"
         
     | 
| 
       233 
     | 
    
         
            -
                        else
         
     | 
| 
       234 
     | 
    
         
            -
                        "[#{ref.content}=#{tag}]"
         
     | 
| 
       235 
     | 
    
         
            -
                        end
         
     | 
| 
       236 
     | 
    
         
            -
                      when RFC_EDITOR, IETF_RFC, IETF_RFC_TOOLS
         
     | 
| 
       237 
     | 
    
         
            -
                      "RFC#$1"
         
     | 
| 
       238 
     | 
    
         
            -
                      when %r{(https?://.*)}
         
     | 
| 
       239 
     | 
    
         
            -
                      "{#{ref.content}=#$1}"
         
     | 
| 
       240 
     | 
    
         
            -
                      else
         
     | 
| 
       241 
     | 
    
         
            -
                        ref
         
     | 
| 
       242 
     | 
    
         
            -
                      end
         
     | 
| 
       243 
     | 
    
         
            -
                    }
         
     | 
| 
       244 
     | 
    
         
            -
                    refs = refnodes.join(',')
         
     | 
| 
       245 
     | 
    
         
            -
             
     | 
| 
       246 
     | 
    
         
            -
                  "#@type/#{subtype} 'IANA,#{refs}"
         
     | 
| 
       247 
     | 
    
         
            -
                  end.compact
         
     | 
| 
       248 
     | 
    
         
            -
             
     | 
| 
       249 
     | 
    
         
            -
                  @mime_types
         
     | 
| 
       250 
     | 
    
         
            -
                end
         
     | 
| 
      
 166 
     | 
    
         
            +
              task "columnar:full" => :support do
         
     | 
| 
      
 167 
     | 
    
         
            +
                ruby_prof "columnar_full"
         
     | 
| 
      
 168 
     | 
    
         
            +
              end
         
     | 
| 
      
 169 
     | 
    
         
            +
            end
         
     | 
| 
       251 
170 
     | 
    
         | 
| 
       252 
     | 
    
         
            -
             
     | 
| 
       253 
     | 
    
         
            -
             
     | 
| 
      
 171 
     | 
    
         
            +
            if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0")
         
     | 
| 
      
 172 
     | 
    
         
            +
              namespace :test do
         
     | 
| 
      
 173 
     | 
    
         
            +
                desc "Run test coverage"
         
     | 
| 
      
 174 
     | 
    
         
            +
                task :coverage do
         
     | 
| 
      
 175 
     | 
    
         
            +
                  spec.test_prelude = [
         
     | 
| 
      
 176 
     | 
    
         
            +
                    'require "simplecov"',
         
     | 
| 
      
 177 
     | 
    
         
            +
                    'SimpleCov.start("test_frameworks") { command_name "Minitest" }',
         
     | 
| 
      
 178 
     | 
    
         
            +
                    'gem "minitest"'
         
     | 
| 
      
 179 
     | 
    
         
            +
                  ].join("; ")
         
     | 
| 
      
 180 
     | 
    
         
            +
                  Rake::Task["test"].execute
         
     | 
| 
       254 
181 
     | 
    
         
             
                end
         
     | 
| 
       255 
182 
     | 
    
         
             
              end
         
     | 
| 
      
 183 
     | 
    
         
            +
            end
         
     | 
| 
       256 
184 
     | 
    
         | 
| 
       257 
     | 
    
         
            -
             
     | 
| 
       258 
     | 
    
         
            -
               
     | 
| 
      
 185 
     | 
    
         
            +
            namespace :convert do
         
     | 
| 
      
 186 
     | 
    
         
            +
              namespace :docs do
         
     | 
| 
      
 187 
     | 
    
         
            +
                task :setup do
         
     | 
| 
      
 188 
     | 
    
         
            +
                  gem "rdoc"
         
     | 
| 
      
 189 
     | 
    
         
            +
                  require "rdoc/rdoc"
         
     | 
| 
      
 190 
     | 
    
         
            +
                  @doc_converter ||= RDoc::Markup::ToMarkdown.new
         
     | 
| 
      
 191 
     | 
    
         
            +
                end
         
     | 
| 
       259 
192 
     | 
    
         | 
| 
       260 
     | 
    
         
            -
             
     | 
| 
       261 
     | 
    
         
            -
             
     | 
| 
       262 
     | 
    
         
            -
             
     | 
| 
       263 
     | 
    
         
            -
                IANAParser.types.values.sort.each do |parser|
         
     | 
| 
       264 
     | 
    
         
            -
                  next if parser.name == "example" or parser.name == "mime"
         
     | 
| 
       265 
     | 
    
         
            -
                  puts "Downloading #{parser.name} from #{parser.url}"
         
     | 
| 
       266 
     | 
    
         
            -
                  parser.download
         
     | 
| 
      
 193 
     | 
    
         
            +
                FileList["*.rdoc"].each do |name|
         
     | 
| 
      
 194 
     | 
    
         
            +
                  rdoc = name
         
     | 
| 
      
 195 
     | 
    
         
            +
                  mark = "#{File.basename(name, ".rdoc")}.md"
         
     | 
| 
       267 
196 
     | 
    
         | 
| 
       268 
     | 
    
         
            -
                   
     | 
| 
       269 
     | 
    
         
            -
                    puts " 
     | 
| 
       270 
     | 
    
         
            -
                     
     | 
| 
      
 197 
     | 
    
         
            +
                  file mark => [rdoc, :setup] do |t|
         
     | 
| 
      
 198 
     | 
    
         
            +
                    puts "#{rdoc} => #{mark}"
         
     | 
| 
      
 199 
     | 
    
         
            +
                    File.binwrite(t.name, @doc_converter.convert(IO.read(t.prerequisites.first)))
         
     | 
| 
       271 
200 
     | 
    
         
             
                  end
         
     | 
| 
       272 
201 
     | 
    
         | 
| 
       273 
     | 
    
         
            -
                   
     | 
| 
       274 
     | 
    
         
            -
                  parser.parse
         
     | 
| 
      
 202 
     | 
    
         
            +
                  CLEAN.add mark
         
     | 
| 
       275 
203 
     | 
    
         | 
| 
       276 
     | 
    
         
            -
                   
     | 
| 
       277 
     | 
    
         
            -
                    puts "Saving #{parser.name}.txt"
         
     | 
| 
       278 
     | 
    
         
            -
                    parser.save_text
         
     | 
| 
       279 
     | 
    
         
            -
                  end
         
     | 
| 
      
 204 
     | 
    
         
            +
                  task run: [mark]
         
     | 
| 
       280 
205 
     | 
    
         
             
                end
         
     | 
| 
       281 
206 
     | 
    
         
             
              end
         
     | 
| 
       282 
     | 
    
         
            -
            end
         
     | 
| 
       283 
207 
     | 
    
         | 
| 
       284 
     | 
    
         
            -
            desc " 
     | 
| 
       285 
     | 
    
         
            -
            task : 
     | 
| 
       286 
     | 
    
         
            -
              puts <<-EOS
         
     | 
| 
       287 
     | 
    
         
            -
            http://www.ltsw.se/knbase/internet/mime.htp
         
     | 
| 
       288 
     | 
    
         
            -
            http://www.webmaster-toolkit.com/mime-types.shtml
         
     | 
| 
       289 
     | 
    
         
            -
            http://plugindoc.mozdev.org/winmime.php
         
     | 
| 
       290 
     | 
    
         
            -
            http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html  
         
     | 
| 
       291 
     | 
    
         
            -
            http://www.feedforall.com/mime-types.htm
         
     | 
| 
       292 
     | 
    
         
            -
            http://www.iana.org/assignments/media-types/
         
     | 
| 
       293 
     | 
    
         
            -
              EOS
         
     | 
| 
      
 208 
     | 
    
         
            +
              desc "Convert documentation from RDoc to Markdown"
         
     | 
| 
      
 209 
     | 
    
         
            +
              task docs: "convert:docs:run"
         
     | 
| 
       294 
210 
     | 
    
         
             
            end
         
     | 
| 
       295 
211 
     | 
    
         | 
| 
       296 
     | 
    
         
            -
             
     | 
| 
       297 
     | 
    
         
            -
            task : 
     | 
| 
       298 
     | 
    
         
            -
             
     | 
| 
       299 
     | 
    
         
            -
             
     | 
| 
       300 
     | 
    
         
            -
              require 'rubygems/specification'
         
     | 
| 
       301 
     | 
    
         
            -
              data = File.read("#{PKG_NAME}.gemspec")
         
     | 
| 
       302 
     | 
    
         
            -
              spec = nil
         
     | 
| 
       303 
     | 
    
         
            -
             
     | 
| 
       304 
     | 
    
         
            -
              if data !~ %r{!ruby/object:Gem::Specification}
         
     | 
| 
       305 
     | 
    
         
            -
                code = "$SAFE = 3\n#{data}"
         
     | 
| 
       306 
     | 
    
         
            -
                p code.split($/)[44]
         
     | 
| 
       307 
     | 
    
         
            -
                Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join
         
     | 
| 
       308 
     | 
    
         
            -
              else
         
     | 
| 
       309 
     | 
    
         
            -
                spec = YAML.load(data)
         
     | 
| 
      
 212 
     | 
    
         
            +
            namespace :deps do
         
     | 
| 
      
 213 
     | 
    
         
            +
              task :top, [:number] => "benchmark:support" do |_, args|
         
     | 
| 
      
 214 
     | 
    
         
            +
                require "deps"
         
     | 
| 
      
 215 
     | 
    
         
            +
                Deps.run(args)
         
     | 
| 
       310 
216 
     | 
    
         
             
              end
         
     | 
| 
      
 217 
     | 
    
         
            +
            end
         
     | 
| 
       311 
218 
     | 
    
         | 
| 
       312 
     | 
    
         
            -
             
     | 
| 
       313 
     | 
    
         
            -
             
     | 
| 
       314 
     | 
    
         
            -
               
     | 
| 
       315 
     | 
    
         
            -
               
     | 
| 
      
 219 
     | 
    
         
            +
            task :console do
         
     | 
| 
      
 220 
     | 
    
         
            +
              arguments = %w[irb]
         
     | 
| 
      
 221 
     | 
    
         
            +
              arguments.push(*spec.spec.require_paths.map { |dir| "-I#{dir}" })
         
     | 
| 
      
 222 
     | 
    
         
            +
              arguments.push("-r#{spec.spec.name.gsub("-", File::SEPARATOR)}")
         
     | 
| 
      
 223 
     | 
    
         
            +
              unless system(*arguments)
         
     | 
| 
      
 224 
     | 
    
         
            +
                error "Command failed: #{show_command}"
         
     | 
| 
      
 225 
     | 
    
         
            +
                abort
         
     | 
| 
      
 226 
     | 
    
         
            +
              end
         
     | 
| 
       316 
227 
     | 
    
         
             
            end
         
     | 
| 
      
 228 
     | 
    
         
            +
             
     | 
| 
      
 229 
     | 
    
         
            +
            # vim: syntax=ruby
         
     | 
| 
         @@ -0,0 +1,57 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "mime/type"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            # A version of MIME::Type that works hand-in-hand with a MIME::Types::Columnar
         
     | 
| 
      
 6 
     | 
    
         
            +
            # container to load data by columns.
         
     | 
| 
      
 7 
     | 
    
         
            +
            #
         
     | 
| 
      
 8 
     | 
    
         
            +
            # When a field is has not yet been loaded, that data will be loaded for all
         
     | 
| 
      
 9 
     | 
    
         
            +
            # types in the container before forwarding the message to MIME::Type.
         
     | 
| 
      
 10 
     | 
    
         
            +
            #
         
     | 
| 
      
 11 
     | 
    
         
            +
            # More information can be found in MIME::Types::Columnar.
         
     | 
| 
      
 12 
     | 
    
         
            +
            #
         
     | 
| 
      
 13 
     | 
    
         
            +
            # MIME::Type::Columnar is *not* intended to be created except by
         
     | 
| 
      
 14 
     | 
    
         
            +
            # MIME::Types::Columnar containers.
         
     | 
| 
      
 15 
     | 
    
         
            +
            class MIME::Type::Columnar < MIME::Type
         
     | 
| 
      
 16 
     | 
    
         
            +
              def initialize(container, content_type, extensions) # :nodoc:
         
     | 
| 
      
 17 
     | 
    
         
            +
                @container = container
         
     | 
| 
      
 18 
     | 
    
         
            +
                self.content_type = content_type
         
     | 
| 
      
 19 
     | 
    
         
            +
                self.extensions = extensions
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              def self.column(*methods, file: nil) # :nodoc:
         
     | 
| 
      
 23 
     | 
    
         
            +
                file ||= methods.first
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                file_method = :"load_#{file}"
         
     | 
| 
      
 26 
     | 
    
         
            +
                methods.each do |m|
         
     | 
| 
      
 27 
     | 
    
         
            +
                  define_method m do |*args|
         
     | 
| 
      
 28 
     | 
    
         
            +
                    @container.send(file_method)
         
     | 
| 
      
 29 
     | 
    
         
            +
                    super(*args)
         
     | 
| 
      
 30 
     | 
    
         
            +
                  end
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
              end
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
              column :friendly
         
     | 
| 
      
 35 
     | 
    
         
            +
              column :encoding, :encoding=
         
     | 
| 
      
 36 
     | 
    
         
            +
              column :docs, :docs=
         
     | 
| 
      
 37 
     | 
    
         
            +
              column :preferred_extension, :preferred_extension=
         
     | 
| 
      
 38 
     | 
    
         
            +
              column :obsolete, :obsolete=, :obsolete?, :registered, :registered=, :registered?, :signature, :signature=,
         
     | 
| 
      
 39 
     | 
    
         
            +
                :signature?, :provisional, :provisional=, :provisional?, file: "flags"
         
     | 
| 
      
 40 
     | 
    
         
            +
              column :xrefs, :xrefs=, :xref_urls
         
     | 
| 
      
 41 
     | 
    
         
            +
              column :use_instead, :use_instead=
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
              def encode_with(coder) # :nodoc:
         
     | 
| 
      
 44 
     | 
    
         
            +
                @container.send(:load_friendly)
         
     | 
| 
      
 45 
     | 
    
         
            +
                @container.send(:load_encoding)
         
     | 
| 
      
 46 
     | 
    
         
            +
                @container.send(:load_docs)
         
     | 
| 
      
 47 
     | 
    
         
            +
                @container.send(:load_flags)
         
     | 
| 
      
 48 
     | 
    
         
            +
                @container.send(:load_use_instead)
         
     | 
| 
      
 49 
     | 
    
         
            +
                @container.send(:load_xrefs)
         
     | 
| 
      
 50 
     | 
    
         
            +
                @container.send(:load_preferred_extension)
         
     | 
| 
      
 51 
     | 
    
         
            +
                super
         
     | 
| 
      
 52 
     | 
    
         
            +
              end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 55 
     | 
    
         
            +
                undef column
         
     | 
| 
      
 56 
     | 
    
         
            +
              end
         
     | 
| 
      
 57 
     | 
    
         
            +
            end
         
     |