tap 0.19.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History +100 -45
- data/MIT-LICENSE +1 -1
- data/README +95 -51
- data/bin/tap +11 -57
- data/bin/tapexe +84 -0
- data/doc/API +91 -139
- data/doc/Configuration +93 -0
- data/doc/Examples/Command Line +10 -42
- data/doc/Examples/Tapfile +124 -0
- data/doc/Ruby to Ruby +87 -0
- data/doc/Workflow Syntax +185 -0
- data/lib/tap.rb +74 -5
- data/lib/tap/app.rb +217 -310
- data/lib/tap/app/api.rb +44 -23
- data/lib/tap/app/queue.rb +11 -12
- data/lib/tap/app/stack.rb +4 -4
- data/lib/tap/declarations.rb +200 -0
- data/lib/tap/declarations/context.rb +31 -0
- data/lib/tap/declarations/description.rb +33 -0
- data/lib/tap/env.rb +133 -779
- data/lib/tap/env/cache.rb +87 -0
- data/lib/tap/env/constant.rb +94 -39
- data/lib/tap/env/path.rb +71 -0
- data/lib/tap/join.rb +42 -78
- data/lib/tap/joins/gate.rb +85 -0
- data/lib/tap/joins/switch.rb +4 -2
- data/lib/tap/joins/sync.rb +3 -3
- data/lib/tap/middleware.rb +5 -5
- data/lib/tap/middlewares/debugger.rb +18 -58
- data/lib/tap/parser.rb +115 -183
- data/lib/tap/root.rb +162 -239
- data/lib/tap/signal.rb +72 -0
- data/lib/tap/signals.rb +20 -2
- data/lib/tap/signals/class_methods.rb +38 -43
- data/lib/tap/signals/configure.rb +19 -0
- data/lib/tap/signals/help.rb +5 -7
- data/lib/tap/signals/load.rb +49 -0
- data/lib/tap/signals/module_methods.rb +1 -0
- data/lib/tap/task.rb +46 -275
- data/lib/tap/tasks/dump.rb +21 -16
- data/lib/tap/tasks/list.rb +184 -0
- data/lib/tap/tasks/load.rb +4 -4
- data/lib/tap/tasks/prompt.rb +128 -0
- data/lib/tap/tasks/signal.rb +42 -0
- data/lib/tap/tasks/singleton.rb +35 -0
- data/lib/tap/tasks/stream.rb +64 -0
- data/lib/tap/utils.rb +83 -0
- data/lib/tap/version.rb +2 -2
- data/lib/tap/workflow.rb +124 -0
- data/tap.yml +0 -0
- metadata +59 -24
- data/cmd/console.rb +0 -43
- data/cmd/manifest.rb +0 -118
- data/cmd/run.rb +0 -145
- data/doc/Examples/Workflow +0 -40
- data/lib/tap/app/node.rb +0 -29
- data/lib/tap/env/context.rb +0 -61
- data/lib/tap/env/gems.rb +0 -63
- data/lib/tap/env/manifest.rb +0 -179
- data/lib/tap/env/minimap.rb +0 -308
- data/lib/tap/intern.rb +0 -50
- data/lib/tap/joins.rb +0 -9
- data/lib/tap/prompt.rb +0 -36
- data/lib/tap/root/utils.rb +0 -220
- data/lib/tap/root/versions.rb +0 -138
- data/lib/tap/signals/signal.rb +0 -68
data/lib/tap/signals/signal.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
module Tap
|
2
|
-
module Signals
|
3
|
-
|
4
|
-
# Signal attaches an object and allows a specific method to be triggered
|
5
|
-
# through a standard interface.
|
6
|
-
class Signal
|
7
|
-
class << self
|
8
|
-
# A description of self
|
9
|
-
attr_accessor :desc
|
10
|
-
end
|
11
|
-
|
12
|
-
# The object receiving signals through self.
|
13
|
-
attr_reader :obj
|
14
|
-
|
15
|
-
attr_reader :block
|
16
|
-
|
17
|
-
def initialize(obj, &block)
|
18
|
-
@obj = obj
|
19
|
-
@block = block
|
20
|
-
end
|
21
|
-
|
22
|
-
# Calls process with the input args and returns the result. This method
|
23
|
-
# is a hook for subclasses.
|
24
|
-
def call(args)
|
25
|
-
process(args)
|
26
|
-
end
|
27
|
-
|
28
|
-
# Simply returns the input args. This method is a hook for subclasses.
|
29
|
-
def process(args)
|
30
|
-
args
|
31
|
-
end
|
32
|
-
|
33
|
-
protected
|
34
|
-
|
35
|
-
def convert_to_array(obj, signature=[], options=false)
|
36
|
-
return obj if obj.kind_of?(Array)
|
37
|
-
|
38
|
-
argv = signature.collect {|key| obj[key] }
|
39
|
-
|
40
|
-
if options
|
41
|
-
opts = {}
|
42
|
-
(obj.keys - signature).each do |key|
|
43
|
-
opts[key] = obj[key]
|
44
|
-
end
|
45
|
-
|
46
|
-
argv << opts
|
47
|
-
end
|
48
|
-
|
49
|
-
argv
|
50
|
-
end
|
51
|
-
|
52
|
-
def convert_to_hash(obj, signature=[], remainder=nil)
|
53
|
-
return obj if obj.kind_of?(Hash)
|
54
|
-
|
55
|
-
args, argh = obj, {}
|
56
|
-
signature.each do |key|
|
57
|
-
argh[key] = args.shift
|
58
|
-
end
|
59
|
-
|
60
|
-
if remainder
|
61
|
-
argh[remainder] = args
|
62
|
-
end
|
63
|
-
|
64
|
-
argh
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|