Sha256: 36fc973deadc6c2b122bf6a4ef31134dcb467f73c6fbd39ffd4d60948b2985bd

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

# ==========================================================================
#  Construction de la tache rdoc (apidoc)
#  author: Vincent Dubois
#  date: 06 fevrier 2009
# ==========================================================================
class RdocBuilder
  include Utils

  # Implementation de la construction de la tache
  def build(project_name, auto_install, proxy_option)
    # On lance la generation
    puts " Building rdoc api and rdoc generation report..."
    if !File.exist?("#{RAILS_ROOT}/doc")
      FileUtils.mkdir("#{RAILS_ROOT}/doc")
    end
    if !File.exist?("#{RAILS_ROOT}/doc/README_FOR_APP")
      if File.exist?("#{RAILS_ROOT}/README")
        FileUtils.copy_file("#{RAILS_ROOT}/README", "#{RAILS_ROOT}/doc/README_FOR_APP")
      else
        FileUtils.touch("#{RAILS_ROOT}/doc/README_FOR_APP")
      end
    end
    File.delete("rdoc.log") if File.exist?("rdoc.log")
    rdoc_pass = system("rake doc:app > rdoc.log")
    if !rdoc_pass
      raise " Execution of rdoc failed with command 'rake doc:reapp'.\n BUILD FAILED."
    end
    # On recupere la documentation et le fichier de log generes
    Dir.mkdir "#{Continuous4r::WORK_DIR}/rdoc"
    FileUtils.mv("doc/app/", "#{Continuous4r::WORK_DIR}/rdoc/")
    FileUtils.mv("rdoc.log", "#{Continuous4r::WORK_DIR}/rdoc/")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
continuous4r-0.0.2 lib/rdoc_builder.rb
continuous4r-0.0.3 lib/rdoc_builder.rb
continuous4r-0.0.4 lib/rdoc_builder.rb