Sha256: 2b3fc4560d80e86dc3c8118c9039f8a19451599bccfc4cfa4c9959789093abd0

Contents?: true

Size: 1.18 KB

Versions: 12

Compression:

Stored size: 1.18 KB

Contents

require 'rdoc/rdoc'
##
# Build the rdoc documentation. Also, try to build the RI documentation.
#
def build_rdoc(options)
  RDoc::RDoc.new.document(options)
rescue RDoc::RDocError => e
  $stderr.puts e.message
rescue Exception => e
  $stderr.puts "Couldn't build RDoc documentation\n#{e.message}"
end

def build_ri(files)
  RDoc::RDoc.new(["--ri-site", "--merge"] + files)
rescue RDoc::RDocError => e
  $stderr.puts e.message
rescue Exception => e
  $stderr.puts "Couldn't build Ri documentation\n#{e.message}"
end

def run_tests(test_list)
  return if test_list.empty?

  require 'test/unit/ui/console/testrunner'
  $:.unshift "lib"
  test_list.each do |test|
    next if File.directory?(test)
    require test
  end

  tests = []
  ObjectSpace.each_object { |o| tests << o if o.kind_of?(Class) }
  tests.delete_if { |o| !o.ancestors.include?(Test::Unit::TestCase) }
  tests.delete_if { |o| o == Test::Unit::TestCase }

  tests.each { |test| Test::Unit::UI::Console::TestRunner.run(test) }
  $:.shift
end

rdoc  = %w(--main README --line-numbers
           --title MIME::Types)
ri    = %w(--ri-site --merge)
dox   = %w(README ChangeLog lib)
build_rdoc rdoc + dox
build_ri ri + dox
run_tests Dir["tests/**/*"]

Version data entries

12 entries across 12 versions & 6 rubygems

Version Path
cbot-cbot-mime-types-1.16 pre-setup.rb
cbot-mime-types-1.16 pre-setup.rb
genki-mime-types-1.15 pre-setup.rb
myobie-mime-types-1.15.1 pre-setup.rb
myobie-mime-types-1.15.2 pre-setup.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/mime-types-1.15/pre-setup.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/mime-types-1.15/pre-setup.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/mime-types-1.15/pre-setup.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/mime-types-1.15/pre-setup.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/mime-types-1.15/pre-setup.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/mime-types-1.15/pre-setup.rb
mime-types-1.15 pre-setup.rb