rbbt-rest 1.2.41 → 1.3.0

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: e6f8eeae288c3d77f179fb05a04e323097034b51
4
- data.tar.gz: 8594c40f6f6b69dba4cc2240924cbdd77d184ee7
3
+ metadata.gz: f2b2a924290d2d90b77317f8ff443e515accbef3
4
+ data.tar.gz: 11ffdc8e6988331b88dfe7e7698b2a3f5cf69a69
5
5
  SHA512:
6
- metadata.gz: 2e34f15d8f08800a71d2ca1c9efc6b32f54eb80c5b4ad4076c5d7ad1e609acce015ba54c5835255dc9b5e5c4f34a54349562f02d8c07b841f67c087fb1f6d8b9
7
- data.tar.gz: 3b59788ef2ae00032c303b04c37d8df8d5c01c274216c5f1174d056331981537e0a4f5e1c61f5faca04f90e022cdd3a5b67b92f051a54616524acc267612b90d
6
+ metadata.gz: 4c7f7b942ad71effd216ad6789de00717c72f7475ed702b767154f5fd2e91758b03bc6517a0e879e481a2adde98fe3f2b7abf5e10a5d70213e7757750fa88914
7
+ data.tar.gz: acf5284071e5d43349268ff6c5b883e1111a303ba215439ca93aaabca011f8a7ca2e8eb44bd20be61ce2b6137174da4c723f2f614e84d1249fe69ca016d1db75
@@ -69,7 +69,7 @@ module WorkflowRESTHelpers
69
69
  end
70
70
 
71
71
  def show_exec_result(result, workflow, task)
72
- case format
72
+ case format.to_sym
73
73
  when :html
74
74
  show_result_html result, workflow, task, nil
75
75
  when :json
@@ -80,7 +80,12 @@ module WorkflowRESTHelpers
80
80
  halt 200, result.to_s
81
81
  when :literal, :raw
82
82
  content_type "text/plain"
83
- halt 200, result.to_s
83
+ case workflow.task_info(task)[:result_type]
84
+ when :array
85
+ halt 200, result * "\n"
86
+ else
87
+ halt 200, result.to_s
88
+ end
84
89
  when :binary
85
90
  content_type "application/octet-stream"
86
91
  halt 200, result.to_s
@@ -1,7 +1,6 @@
1
1
  ul.tasks > li
2
2
  display: block !important
3
3
 
4
-
5
4
  .workflow_task
6
5
  .title
7
6
  span.workflow
@@ -15,6 +14,9 @@ ul.tasks > li
15
14
 
16
15
  .form
17
16
  @extend .action_parameters
17
+ select#_format
18
+ width: 5em
19
+ float: right
18
20
 
19
21
  dd.job_control
20
22
  ul
@@ -8,4 +8,5 @@
8
8
  %span.workflow= workflow
9
9
  %span.task= Misc.humanize task
10
10
  .form
11
- = partial_render('partials/form', :id => id, :action => action, :method => 'post', :enctype => "multipart/form-data", :info => task_info, :klass => 'workflow_task')
11
+ = partial_render('partials/form', :id => id, :action => action, :method => 'post',
12
+ :enctype => "multipart/form-data", :info => task_info, :klass => 'workflow_task')
@@ -29,5 +29,8 @@
29
29
  - input_options = input_options.dup unless input_options.nil?
30
30
  != form_input(input, types[input], defaults[input], values[input], descriptions[input], input_id, input_options)
31
31
 
32
+
32
33
  .input.submit
34
+ - if klass =~ /workflow_task/
35
+ != form_input('_format', :select , :html, nil, "result format", "_format", {:select_options =>[:html, :json, :raw, :binary]})
33
36
  %input(type="submit")
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.2.41
4
+ version: 1.3.0
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-04 00:00:00.000000000 Z
11
+ date: 2014-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake