module Reap # = Doap task # # This task simply generates an XML DOAP project file. # This file can be useful for RSS and Atom feeds to # project tracking sites. The task utilizes as much # information as it can from the ProjectInfo file. # class Doap < Task task_desc %{Generate DOAP project file.} task_help %{ reap doap DOAP is an XML/RTF format for describing a project. It contains much of the same information as Reap's ProjectInfo file, but is more suitable to RESTful interapplication communications, like RSS/Atom feeds. } task_available { |app| app.projectfile? } task_attr :prj def run puts "Generating doap.xml file..." x = '' x << %{ | | #{prj.title} | #{prj.name} | | | #{prj.created} | }.margin x << "\n" << prj.summary.word_wrap(50).indent(6) x << %{ | | }.margin x << "\n" << prj.description.word_wrap(50).indent(6) x << %{ | | | | #{prj.maintainer} | #{prj.email} | | | | }.margin File.open( "doap.xml", 'w' ) { |f| f << x } end end end # Rake interface. if defined?(Rake) #require 'reap/rake/adapter' module Rake ReapDoap = ::Reap::RakeAdapter( ::Reap::Doap ) end end