rbbt-rest 1.3.0 → 1.3.1

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: f2b2a924290d2d90b77317f8ff443e515accbef3
4
- data.tar.gz: 11ffdc8e6988331b88dfe7e7698b2a3f5cf69a69
3
+ metadata.gz: 2e55cf49281298b1246307255c0a12b1d21ed9c7
4
+ data.tar.gz: f1c82dbd4fbcfa7aa7319a062572d7e2668a372e
5
5
  SHA512:
6
- metadata.gz: 4c7f7b942ad71effd216ad6789de00717c72f7475ed702b767154f5fd2e91758b03bc6517a0e879e481a2adde98fe3f2b7abf5e10a5d70213e7757750fa88914
7
- data.tar.gz: acf5284071e5d43349268ff6c5b883e1111a303ba215439ca93aaabca011f8a7ca2e8eb44bd20be61ce2b6137174da4c723f2f614e84d1249fe69ca016d1db75
6
+ metadata.gz: 6a115419189c4329aa8a21583470a30aabf4b6df83496ba0c4458b4c82abd69c52735d960dd593e8daf8ff4edb50aa3bd98104c5543e4e8f4e659301d6e30e7a
7
+ data.tar.gz: df4116e66c81deda238babf66b90a660b66dd20cd09a61b80a00ad2714a62204fa69752c12e4418e1cdd68569dafe9142af9248487ffdc40ac3b4a63ed98411a
@@ -252,19 +252,23 @@ class WorkflowRESTClient
252
252
  end
253
253
 
254
254
  def rec_input_defaults(taskname)
255
- [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_defaults}
255
+ [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_defaults}.
256
+ tap{|h| IndiferentHash.setup(h) }
256
257
  end
257
258
 
258
259
  def rec_input_types(taskname)
259
- [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_types}
260
+ [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_types}.
261
+ tap{|h| IndiferentHash.setup(h) }
260
262
  end
261
263
 
262
264
  def rec_input_descriptions(taskname)
263
- [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_descriptions}
265
+ [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_descriptions}.
266
+ tap{|h| IndiferentHash.setup(h) }
264
267
  end
265
268
 
266
269
  def rec_input_options(taskname)
267
- [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_options}
270
+ [taskname].concat(rec_dependencies(taskname)).inject({}){|acc, tn| acc.merge tasks[tn.to_sym].input_options}.
271
+ tap{|h| IndiferentHash.setup(h) }
268
272
  end
269
273
 
270
274
  def init_remote_tasks
@@ -15,9 +15,11 @@ module RbbtRESTHelpers
15
15
  html_tag('label', text, {:id => label_id, :for => id, :title => description}.merge(options))
16
16
  end
17
17
 
18
- def file_or_text_area(id, name, value)
18
+ def file_or_text_area(id, name, value, tsv = false)
19
+ text_area_string = tsv ? "or use the text area bellow (you may use ',' intead of tabs)" : "or use the text area bellow"
20
+
19
21
  html_tag("input", nil, :type => "file", :id => (id.nil? ? nil : id + "__" + "param_file"), :name => name.to_s + "__" + "param_file") +
20
- html_tag("span", "or use the text area bellow", :class => "file_or_text_area") +
22
+ html_tag("span", text_area_string, :class => "file_or_text_area") +
21
23
  html_tag("textarea", value || "" , :name => name, :id => id )
22
24
  end
23
25
 
@@ -101,7 +103,7 @@ module RbbtRESTHelpers
101
103
  html_tag("textarea", value || "" , :name => name, :id => id )
102
104
  else
103
105
  input_label(id, name, description, default, extra) +
104
- file_or_text_area(id, name, value)
106
+ file_or_text_area(id, name, value, type == :tsv)
105
107
  end
106
108
 
107
109
  when :select
@@ -148,7 +148,7 @@ module RbbtRESTHelpers
148
148
  if param_file and (value.nil? or (String === value and value.empty?))
149
149
  TSV.open(param_file[:tempfile].open)
150
150
  else
151
- TSV.open(StringIO.new(value))
151
+ TSV.open(StringIO.new(value), :sep=>/\t|,/)
152
152
  end
153
153
  end
154
154
  end
@@ -87,8 +87,6 @@ module EntityRESTHelpers
87
87
 
88
88
  if (file = dir[entity_type]).exists?
89
89
  lists = Open.read(file).split("\n")
90
- ddd lists
91
- ddd list
92
90
  lists -= [list]
93
91
  if lists.any?
94
92
  Open.write(file, lists * "\n")
@@ -86,3 +86,10 @@
86
86
  margin-bottom: 3px
87
87
  display: inline-block
88
88
  font-color: $color_action_parameter_label
89
+
90
+ input.jobname
91
+ float: right
92
+ width: auto
93
+ select.format
94
+ float: right
95
+ width: auto
@@ -7,6 +7,10 @@
7
7
  %h3
8
8
  %span.workflow= workflow
9
9
  %span.task= Misc.humanize task
10
+ - if task_info[:description]
11
+ .description
12
+ :markdown
13
+ #{task_info[:description]}
10
14
  .form
11
15
  = partial_render('partials/form', :id => id, :action => action, :method => 'post',
12
16
  :enctype => "multipart/form-data", :info => task_info, :klass => 'workflow_task')
@@ -32,5 +32,8 @@
32
32
 
33
33
  .input.submit
34
34
  - if klass =~ /workflow_task/
35
- != form_input('_format', :select , :html, nil, "result format", "_format", {:select_options =>[:html, :json, :raw, :binary]})
35
+ %input.jobname(type='text' name='jobname' placeholder='optional job name')
36
+ %select.format(name="_format")
37
+ - [:html, :json, :raw, :binary].each do |format|
38
+ %option(value=format)= format.to_s
36
39
  %input(type="submit")
@@ -16,5 +16,5 @@
16
16
  %a(href="#{File.join("/", workflow.to_s, task.to_s)}")= task
17
17
  - info = workflow.task_info(task)
18
18
  - if info[:description]
19
- %p= info[:description]
19
+ %p= info[:description].split(/\n\s*\n/).first
20
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
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-02-10 00:00:00.000000000 Z
11
+ date: 2014-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake