Tap (Task Application)
A framework for creating configurable, distributable tasks and workflows.
Description
Tap tasks are designed to be easy to test, subclass, use in scripts, and run from the command line. Tap provides methods to join tasks into imperative and dependecy-based workflows, utilize static config files, as well as dump and reuse results. Task libraries are readily shared as gems.
Check out these links for tutorials, development, and bug tracking.
Features
-
Tap and Rake are targeted at different problems, but play well together. See the Tutorial.
-
Tap is tested on MRI (the standard Ruby interpreter, versions 1.8.6 and 1.9.0) and JRuby.
Usage
A simple task illustrates the usage of tap:
[lib/goodnight.rb]
# Goodnight::manifest your basic goodnight moon task
# Says goodnight with a configurable message.
class Goodnight < Tap::Task
config :message, 'goodnight' # a goodnight message
def process(name)
log(, name)
"#{message} #{name}"
end
end
Tap pulls documentation out of task classes to generate manifests:
% tap run -T
sample:
goodnight # your basic goodnight moon task
tap:
dump # the default dump task
load # the default load task
rake # run rake tasks
And help:
% tap run -- goodnight --help
Goodnight -- your basic goodnight moon task
--------------------------------------------------------------------------------
Says goodnight with a configurable .
--------------------------------------------------------------------------------
usage: tap run -- goodnight NAME
configurations:
-- MESSAGE a goodnight
options:
-h, --help Print this help
--name NAME Specify a name
--use FILE Loads inputs from file
Tasks are immediately available to run through tap or rap:
% tap run -- goodnight moon
I[00:09:55] goodnight moon
% rap goodnight moon -- hello
I[00:10:01] hello moon
Tap comes with generators. To get started:
% tap generate root sample
% cd sample
% tap generate task goodnight
% rap goodnight moon
Bugs/Known Issues
-
Some inconsequential tests on JRuby fail due to bugs in JRuby itself.
-
Joins, Parser, and Schema require additional documentation and may be internally reworked. The workflow syntax should remain the same.
Installation
Tap is available as a gem on RubyForge. Use:
% gem install tap
Tap requires an updated version of RubyGems (>= 1.2.0). To check the version and update RubyGems:
% gem --version
% gem --update system
Info
Copyright © 2006-2008, Regents of the University of Colorado.
- Developer
- Support
-
CU Denver School of Medicine Deans Academic Enrichment Fund
- Licence