<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>File: README</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



  <div id="fileHeader">
    <h1>README</h1>
    <table class="header-table">
    <tr class="top-aligned-row">
      <td><strong>Path:</strong></td>
      <td>README
      </td>
    </tr>
    <tr class="top-aligned-row">
      <td><strong>Last Update:</strong></td>
      <td>Sat Oct 08 01:14:17 EDT 2005</td>
    </tr>
    </table>
  </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <h1><a href="../classes/Reap.html">Reap</a></h1>
<p>
User Friendly Project Assitant for Ruby
</p>
<h2>What&#8217;s This?</h2>
<p>
<a href="../classes/Reap.html">Reap</a> is a user friendly project
assistant for Ruby developers. By organizing your project in a conventional
manner, as promoted by setup.rb, <a href="../classes/Reap.html">Reap</a>
makes it easy to do the following tasks:
</p>
<ul>
<li>Generate RDocs.

</li>
<li>Run unit tests.

</li>
<li>Create Ruby Gem packages.

</li>
<li>Create standard .tgz, tbz (bzip2) and/or .zip packages.

</li>
<li>Publish documents to Rubyforge or other web sites.

</li>
<li>Announce a release to Ruby-talk or other mailing list.

</li>
<li>Prepare files for distribution (i.e. chmod, tag, etc.).

</li>
<li>Upload packages (coming soon!).

</li>
</ul>
<p>
If you have special needs that <a href="../classes/Reap.html">Reap</a>
doesn&#8217;t accomodate, new task are farily easy to create. And I am
always happy to hear suggestions.
</p>
<h2>Installation</h2>
<h3>Gem Install</h3>
<p>
Install the ruby gem as you would any other:
</p>
<pre>
  &lt;tt&gt;gem install reap&lt;/tt&gt;
</pre>
<p>
<a href="../classes/Reap.html">Reap</a> requires Ruby Facets.
</p>
<h3>Manual Install</h3>
<p>
To install manually follow the usual setup.eb steps:
</p>
<ol>
<li>Download the compressed package.

</li>
<li>Unpack it.

</li>
<li>Change into the unpacked directory.

</li>
<li>run <tt>sudo ruby setup.rb</tt>

</li>
</ol>
<p>
You should be good to go.
</p>
<h2>Usage</h2>
<h3>Using a <a href="../classes/Reap.html">Reap</a> Task</h3>
<p>
<a href="../classes/Reap.html">Reap</a> makes it pretty easy to use
it&#8217;s built-in tasks. Largely this is because it grabs common data
from a <a href="../classes/ProjectInfo.html">ProjectInfo</a> (or Reapfile)
YAML file if available. Some <a href="../classes/Reap.html">Reap</a> tasks
are automatic, bc/ there are defaults, other require entries in the <a
href="../classes/ProjectInfo.html">ProjectInfo</a> file.
</p>
<p>
For instance, to create a &quot;package&quot; target all you generally need
in your Rakefile is:
</p>
<p>
The reaon this can be so simple, is b/c <a
href="../classes/Reap.html">Reap</a> extrapolates the information it needs
from a comon <a href="../classes/ProjectInfo.html">ProjectInfo</a> file.
You will of course need to create this file in you projects main directory.
A template is provided and a command line tool to copy it to your current
directory. Simply type:
</p>
<pre>
  &gt; reap template
</pre>
<p>
Then edit the <a href="../classes/ProjectInfo.html">ProjectInfo</a> file.
The fields are fairly self explanitiory. Apart from <a
href="../classes/Reap.html">Reap</a> such a file is nice to have on
it&#8217;s own merits too.
</p>
<h3>Building a <a href="../classes/Reap.html">Reap</a> Task</h3>
<p>
Building a <a href="../classes/Reap.html">Reap</a> task differs from
building a Rake task by two important factors. First there is only one
target per task (this may change) Second, task blocks are yeilded
<em>prior</em> to the init routine being exectuted. So your init routine
should expect data to already be present in the tasks attribute and take
that into account (usually that means using ++||=++)
</p>
<p>
Here&#8217;s an, oh so simple, example:
</p>
<pre>
  class MyOhSoSimpleTask &lt; Reap::Task

     task_desc 'This is a custom reap task'

     attr_accessor :message

     def init
       @message ||= master['default'] || 'None Found!'
     end

     # run the target task
     def run
       puts @message
     end

   end
</pre>
<p>
The corresponding settings in the <a
href="../classes/ProjectInfo.html">ProjectInfo</a> file (master) will then
be:
</p>
<pre>
   default: Default text, if any.
</pre>
<p>
And to use it in your Rake file:
</p>
<pre>
  ReapTask::my_oh_so_simple_task :mytarget
</pre>
<h2>Status</h2>
<p>
<a href="../classes/Reap.html">Reap</a> is currently Usable Beta. Most of
the tasks work very well. Refinements are still common though, and a few
important tasks are still being planned.
</p>
<h2>Legal</h2>
<p>
<a href="../classes/Reap.html">Reap</a> Copyright&#169;2004-2005 Thomas
Sawyer Ruby License
</p>

    </div>


   </div>


  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>