public
Description: A framework for creating configurable, distributable tasks and workflows.
Homepage: http://tap.rubyforge.org
Clone URL: git://github.com/bahuvrihi/tap.git
tap / rap
name age message
..
file History Loading commit data...
file MIT-LICENSE Mon Feb 16 23:41:10 -0800 2009 documentation updates for rap [bahuvrihi]
file README
file Rakefile
directory bin/
directory doc/
directory lib/
file rap.gemspec
file tap.yml Wed Dec 31 08:47:06 -0800 2008 updates to run tests with submodules [bahuvrihi]
directory test/
rap/README
= {Rap (Rakish App)}[http://tap.rubyforge.org/rap]

  rap v. a quick, sharp knock or blow
  rakish adj. having a dashing, jaunty, or slightly disreputable quality or appearance

A rakish extension to {Tap}[http://tap.rubyforge.org/rdoc].

== Description

Rap supercharges the syntax of Rake by adding configurations, extended
documentation, and class-based tasks that are easy to test.

Rap is a part of the {Tap-Suite}[http://tap.rubyforge.org/tap-suite].
Check out these links for documentation, development, and bug tracking.

* Website[http://tap.rubyforge.org]
* Lighthouse[http://bahuvrihi.lighthouseapp.com/projects/9908-tap-task-application/tickets]
* Github[http://github.com/bahuvrihi/tap/tree/master]
* {Google Group}[http://groups.google.com/group/ruby-on-tap]

== Usage

Usage is much like {rake}[http://rake.rubyforge.org/]:

  [Rapfile]
  require 'rap/declarations'
  include Rap::Declarations
  
  desc "your basic goodnight moon task"
  
  # Says goodnight with a configurable message.
  task(:goodnight, :obj, :message => 'goodnight') do |task, args|
    puts "#{task.message} #{args.obj}\n"
  end
  
Now from the command line:

  % rap goodnight moon
  goodnight moon
  
  % rap goodnight world --message hello
  hello world
  
  % rap goodnight --help
  Goodnight -- your basic goodnight moon task
  --------------------------------------------------------------------------------
    Says goodnight with a configurable message.
  --------------------------------------------------------------------------------
  usage: rap goodnight OBJ

  configurations:
          --message MESSAGE

  options:
      -h, --help                       Print this help
          --name NAME                  Specify a name
          --use FILE                   Loads inputs from file

For testing, load the Rapfile and access the task as a constant.

  [test.rb]
  load 'Rapfile'
  require 'test/unit'
  require 'stringio'
  
  class RapfileTest < Test::Unit::TestCase
    def test_the_goodnight_task
      $stdout = StringIO.new
      
      task = Goodnight.new
      assert_equal 'goodnight', task.message
      
      task.process('moon')
      assert_equal "goodnight moon", $stdout.string
    end
  end

The test passes:

  % ruby test.rb
  Loaded suite test
  Started
  .
  Finished in 0.004921 seconds.

  1 tests, 2 assertions, 0 failures, 0 errors

Generally speaking, the rap executable is a shorthand for 'tap run --' so you
can use rap to quickly launch workflows as well.  See the 
{Command}[link:files/doc/Command%20Reference.html] and 
{Syntax}[link:files/doc/Syntax%20Reference.html] References for more information.

=== Limitations

Rap is not a pure replacement of Rake.  Rap does not support builds by default,
classes like FileList are not included, and namespace lookup is slightly
different (see the {Syntax Reference}[link:files/doc/Syntax%20Reference.html]).

== Installation

Rap is available as a gem on RubyForge[http://rubyforge.org/projects/tap].  Use:

  % gem install rap

Rap requires an updated version of RubyGems[http://docs.rubygems.org/] 
(>= 1.2.0).  To check the version and update RubyGems:

  % gem --version
  % gem --update system
    
== Info 

Copyright (c) 2009, Regents of the University of Colorado.
Developer:: {Simon Chiang}[http://bahuvrihi.wordpress.com], {Biomolecular Structure Program}[http://biomol.uchsc.edu/], 
{Hansen Lab}[http://hsc-proteomics.uchsc.edu/hansenlab/] 
Support:: CU Denver School of Medicine Deans Academic Enrichment Fund
Licence:: {MIT-Style}[link:files/MIT-LICENSE.html]