setup.rb
#
# TASK index
#
# TODO: Totally deprecate stadard ri support in favor of fastri.
TASK index
TODO: Totally deprecate stadard ri support in favor of fastri.
TASK index TODO : Totally deprecate stadard ri support in favor of fastri .
def exec_index
      begin
        require 'fastri/version'
        fastri = true
      rescue LoadError
        fastri = false
      end
      if fastri
        if no_harm?
          $stderr.puts "fastri-server -b"
        else
          system "fastri-server -b"
        end
      else
        case config.installdirs
        when 'std'
          output = "--ri-system"
        when 'site'
          output = "--ri-site"
        when 'home'
          output = "--ri"
        else
          abort "bad config: sould not be possible -- installdirs = #{config.installdirs}"
        end
        if File.exist?('.document')
          files = File.read('.document').split("\n")
          files.reject!{ |l| l =~ /^\s*[#]/ || l !~ /\S/ }
          files.collect!{ |f| f.strip }
        else
          files = ["lib", "ext"]
        end
        opt = []
        opt << "-U"
        opt << output
        opt << files
        opt = opt.flatten
        if no_harm?
          puts "rdoc #{opt.join(' ').strip}"
        else
          require 'rdoc/rdoc'
          ::RDoc::RDoc.new.document(opt)
        end
      end
    end
def exec_index begin require 'fastri/version' fastri = true rescue LoadError fastri = false end if fastri if no_harm? $stderr . puts "fastri-server -b" else system "fastri-server -b" end else case config . installdirs when 'std' output = "--ri-system" when 'site' output = "--ri-site" when 'home' output = "--ri" else abort "bad config: sould not be possible -- installdirs = #{config.installdirs}" end if File . exist? ( '.document' ) files = File . read ( '.document' ) . split ( "\n" ) files . reject! { | l | l =~ / ^ \s *[#] / || l !~ / \S / } files . collect! { | f | f . strip } else files = [ "lib" , "ext" ] end opt = [ ] opt << "-U" opt << output opt << files opt = opt . flatten if no_harm? puts "rdoc #{opt.join(' ').strip}" else require 'rdoc/rdoc' :: RDoc :: RDoc . new . document ( opt ) end end end
TASK index
TODO: Totally deprecate stadard ri support in favor of fastri.
TASK index TODO : Totally deprecate stadard ri support in favor of fastri .
#sh "rdoc #{opt.join(' ').strip}"