rbbt-util 5.8.8 → 5.8.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79182b6a00b36773864861817a0994c8b89b466a
4
- data.tar.gz: 64eda216950e3ea231a67d5ebf463ddfd6f99855
3
+ metadata.gz: 35fd0fde3df8674639985a5bbabd89e0a83058ee
4
+ data.tar.gz: dc3c48e82d9f04bedf08f44e9464808f5391b431
5
5
  SHA512:
6
- metadata.gz: 77f978c48f2f87df1b39e200d02ddec6b2b9e99413281935c4e95d8c8320e8f1ad3b4ec30e43677af723b19386152f86b10a0faee2e466fdd6d745c65d1d2c83
7
- data.tar.gz: 0144b36d0f85345835b9abba865aa866e7d98df42f73f3594c967b8d5dfb8cb07f19719fe11c1bea3f03b5871779fac3146966b19a6e6edf2f10f21e55d28521
6
+ metadata.gz: 03400322b9a7c297733595da6383d92bdd8da7885e606ab4fdfd2676d92889d6be8a2143b8116962ab99d9e8d877644d7dedf58abd635e39c4de1619c69b661a
7
+ data.tar.gz: ab8493c97a47c7e075c0db9556c1d1c62b46d0801beabf033c27e9f58d9e9c342b2fc831f22d7fdbef0a08f04c145a8be7badc39108eb159b91fe10b8fc39098
@@ -41,7 +41,7 @@ module SOPT
41
41
 
42
42
  def self.require(options, *parameters)
43
43
  parameters.flatten.each do |parameter|
44
- raise ParameterException, "Parameter '#{ parameter }' not given" if options[parameter].nil?
44
+ raise ParameterException, "Parameter '#{ Log.color :blue, parameter }' not given" if options[parameter].nil?
45
45
  end
46
46
  end
47
47
  end
@@ -2,21 +2,20 @@ require 'rbbt/util/simpleopt/parse'
2
2
  require 'rbbt/util/simpleopt/get'
3
3
  require 'rbbt/util/simpleopt/doc'
4
4
  module SOPT
5
+
5
6
  def self.setup(str)
6
- summary, synopsys, description, options = str.split(/\n\n+/)
7
+ parts = str.split(/\n\n+/)
7
8
 
8
- if summary[0]=="-"
9
- summary, synopsys, description, options = nil, nil, nil, summary
10
- end
9
+ summary = parts.shift unless parts.first =~ /^\s*\$-/
10
+ synopsys = parts.shift if parts.first =~ /^\s*\$/
11
11
 
12
- if synopsys and synopsys[0] != "$"
13
- description, options = synopsys, description
14
- synopsys = nil
12
+ description = []
13
+ while parts.first and parts.first !~ /^\s*-/
14
+ description << parts.shift
15
15
  end
16
+ description = description * "\n\n"
16
17
 
17
- if description and description[0] == "-"
18
- description, options = nil, description
19
- end
18
+ options = parts.collect{|part| part.split("\n").select{|l| l=~ /^\s*-/ } }.flatten.compact * "\n"
20
19
 
21
20
  synopsys.sub!(/^\$\s+/,'') if synopsys
22
21
 
@@ -131,7 +131,27 @@ def fix_options(workflow, task, job_options)
131
131
  job_options_cleaned
132
132
  end
133
133
 
134
- options = SOPT.get <<EOF
134
+ options = SOPT.setup <<EOF
135
+ Enact workflow tasks
136
+
137
+ $ rbbt workflow task <workflow> [<task>] [<options>]
138
+
139
+ Examine workflows and enact tasks from them. If no `task` is specified, a list
140
+ of available tasks is shown. If a `task` is given it will be enacted with the
141
+ parameters specified in `options`. Use *-h* option to display the description
142
+ of a task, including the parameters it accepts; and some examples, if
143
+ available. Examples can be enacted using `rbbt workflow example <workflow>
144
+ [<task>] [<example>]`.
145
+
146
+ When a task is enacted a job is instantiated. This job is identified by the
147
+ `jobname` (which is *Default* unless specified otherwise) and the values of the
148
+ parameters. If the same taks is enacted using the same `jobname` and
149
+ parameters, then the same job will be the same.
150
+
151
+ The first time a job is executed it will save the result. Once the job is done
152
+ you can re-doit using the `clean` parameter. The `recursive_clean` cleans all
153
+ the job dependencies recursively.
154
+
135
155
  -h--help Show this help:
136
156
  -wd--workdir* Change the working directory of the workflow:
137
157
  -as--array_separator* Change the character that separates elements of Arrays, ',', '|', or '\\n' by default:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.8.8
4
+ version: 5.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-17 00:00:00.000000000 Z
11
+ date: 2014-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake