tap-tasks 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History +6 -0
- data/MIT-LICENSE +22 -0
- data/README +20 -0
- data/lib/tap/tasks/argv.rb +28 -0
- data/lib/tap/tasks/dump/inspect.rb +24 -0
- data/lib/tap/tasks/dump/yaml.rb +25 -0
- data/lib/tap/tasks/load/yaml.rb +25 -0
- data/tap.yml +0 -0
- metadata +76 -0
data/History
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2009, Regents of the University of Colorado.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
= Tap Tasks
|
2
|
+
|
3
|
+
A set of standard Tap tasks.
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
Tap Tasks is a standard library of utility tasks.
|
8
|
+
|
9
|
+
== Installation
|
10
|
+
|
11
|
+
Tap Tasks is available as a gem on RubyForge[http://rubyforge.org/projects/tap]. Use:
|
12
|
+
|
13
|
+
% gem install tap-tasks
|
14
|
+
|
15
|
+
== Info
|
16
|
+
|
17
|
+
Copyright (c) 2009, Regents of the University of Colorado.
|
18
|
+
Developer:: {Simon Chiang}[http://bahuvrihi.wordpress.com], {Biomolecular Structure Program}[http://biomol.uchsc.edu/], {Hansen Lab}[http://hsc-proteomics.uchsc.edu/hansenlab/]
|
19
|
+
Support:: CU Denver School of Medicine Deans Academic Enrichment Fund
|
20
|
+
License:: {MIT-Style}[link:files/MIT-LICENSE.html]
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Tap
|
2
|
+
module Tasks
|
3
|
+
# :startdoc::manifest provides a handle to ARGV
|
4
|
+
#
|
5
|
+
# Simply returns ARGV. This task can be a useful hook when executing
|
6
|
+
# saved workflows via run (given that all arguments after the workflow
|
7
|
+
# file are preserved in ARGV).
|
8
|
+
#
|
9
|
+
# # [workflow.yml]
|
10
|
+
# # - - argv
|
11
|
+
# # - - dump/yaml
|
12
|
+
# # - 0[1]
|
13
|
+
#
|
14
|
+
# % tap run -w workflow.yml a b c
|
15
|
+
# ---
|
16
|
+
# - a
|
17
|
+
# - b
|
18
|
+
# - c
|
19
|
+
#
|
20
|
+
class Argv < Tap::Task
|
21
|
+
|
22
|
+
# Simply returns ARGV.
|
23
|
+
def process
|
24
|
+
ARGV
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'tap/dump'
|
2
|
+
|
3
|
+
module Tap
|
4
|
+
module Tasks
|
5
|
+
module Dump
|
6
|
+
|
7
|
+
# :startdoc::manifest inspect and dump an object
|
8
|
+
#
|
9
|
+
# Dumps objects to a file or IO using object.inspect. See the default
|
10
|
+
# tap dump task for more details.
|
11
|
+
#
|
12
|
+
# % tap run -- load/yaml "{key: value}" --: inspect
|
13
|
+
# {"key"=>"value"}
|
14
|
+
#
|
15
|
+
class Inspect < Tap::Dump
|
16
|
+
|
17
|
+
# Dumps the object to io using obj.inspect
|
18
|
+
def dump(obj, io)
|
19
|
+
io.puts obj.inspect
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'tap/dump'
|
2
|
+
|
3
|
+
module Tap
|
4
|
+
module Tasks
|
5
|
+
module Dump
|
6
|
+
|
7
|
+
# :startdoc::manifest dumps data as YAML
|
8
|
+
#
|
9
|
+
# Dumps workflow results to a file or IO as YAML. See the default tap
|
10
|
+
# dump task for more details.
|
11
|
+
#
|
12
|
+
# % tap run -- load/yaml "{key: value}" --: dump/yaml
|
13
|
+
# ---
|
14
|
+
# key: value
|
15
|
+
#
|
16
|
+
class Yaml < Tap::Dump
|
17
|
+
|
18
|
+
# Dumps the object to io as YAML.
|
19
|
+
def dump(obj, io)
|
20
|
+
YAML.dump(obj, io)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'tap/load'
|
2
|
+
|
3
|
+
module Tap
|
4
|
+
module Tasks
|
5
|
+
module Load
|
6
|
+
|
7
|
+
# :startdoc::manifest loads data as YAML
|
8
|
+
#
|
9
|
+
# Loads data from the input IO as YAML. See the default tap load task
|
10
|
+
# for more details.
|
11
|
+
#
|
12
|
+
# % tap run -- load/yaml "{key: value}" --: dump/yaml
|
13
|
+
# ---
|
14
|
+
# key: value
|
15
|
+
#
|
16
|
+
class Yaml < Tap::Load
|
17
|
+
|
18
|
+
# Loads data from io as YAML.
|
19
|
+
def load(io)
|
20
|
+
YAML.load(io)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/tap.yml
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tap-tasks
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Simon Chiang
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-03-23 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: tap
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.12.4
|
24
|
+
version:
|
25
|
+
description:
|
26
|
+
email: simon.a.chiang@gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- History
|
33
|
+
- README
|
34
|
+
- MIT-LICENSE
|
35
|
+
files:
|
36
|
+
- lib/tap/tasks/argv.rb
|
37
|
+
- lib/tap/tasks/dump/inspect.rb
|
38
|
+
- lib/tap/tasks/dump/yaml.rb
|
39
|
+
- lib/tap/tasks/load/yaml.rb
|
40
|
+
- tap.yml
|
41
|
+
- History
|
42
|
+
- README
|
43
|
+
- MIT-LICENSE
|
44
|
+
has_rdoc: true
|
45
|
+
homepage: http:/tap.rubyforge.org/tap-tasks/
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options:
|
48
|
+
- --main
|
49
|
+
- README
|
50
|
+
- -S
|
51
|
+
- -N
|
52
|
+
- --title
|
53
|
+
- Tap Tasks
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: "0"
|
61
|
+
version:
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: "0"
|
67
|
+
version:
|
68
|
+
requirements: []
|
69
|
+
|
70
|
+
rubyforge_project: tap
|
71
|
+
rubygems_version: 1.3.1
|
72
|
+
signing_key:
|
73
|
+
specification_version: 2
|
74
|
+
summary: A set of standard Tap tasks
|
75
|
+
test_files: []
|
76
|
+
|