rbbt-rest 1.8.146 → 1.8.150
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/Rakefile +1 -0
- data/lib/rbbt/rest/common/cache.rb +14 -5
- data/lib/rbbt/rest/workflow.rb +1 -1
- data/share/views/job_files.haml +1 -1
- data/share/views/job_result/job_control.haml +4 -1
- data/share/views/public/js/rbbt/table.js +0 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1879b80d1d7873e206a425939bf4de751ce2d105990fb0fbf12bc8b6daf29cf2
|
4
|
+
data.tar.gz: 10b027be58fef0428acd946102267e6dd789d17c4df5a5af61b0ac2b2b8c0298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a800de9e65f448d8e4951f7e98ff4415f072732d93ee6374896166e13e05a9a2ec8c09533ffd3415603f80195f3d79a2f8fd35b96504b7f0013ccaa0ba3f8c9e
|
7
|
+
data.tar.gz: 5b1e2a4225567a64de9a4208c4bc1d840005e4f087ebd64e7688c807663c6adeeaa608e1f908b717d7205ba8f240a07fcc4b5305a6e1cfa03496323169613435
|
data/LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -21,6 +21,7 @@ begin
|
|
21
21
|
gem.add_dependency('json')
|
22
22
|
gem.add_dependency('haml')
|
23
23
|
gem.add_dependency('rest-client')
|
24
|
+
gem.add_dependency('therubyracer')
|
24
25
|
gem.add_dependency('sinatra-authorization')
|
25
26
|
gem.add_dependency('sinatra-cross_origin')
|
26
27
|
gem.add_dependency('sinatra-contrib')
|
@@ -4,6 +4,17 @@ require 'rbbt/rest/common/table'
|
|
4
4
|
|
5
5
|
module RbbtRESTHelpers
|
6
6
|
|
7
|
+
def escape_url(url)
|
8
|
+
base, _sep, query = url.partition("?")
|
9
|
+
base = base.split("/").collect{|p| CGI.escape(p) }* "/"
|
10
|
+
if query && ! query.empty?
|
11
|
+
query = query.split("&").collect{|e| e.split("=").collect{|pe| CGI.escape(pe) } * "=" } * "&"
|
12
|
+
[base, query] * "?"
|
13
|
+
else
|
14
|
+
base
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
7
18
|
MEMORY_CACHE = {}
|
8
19
|
|
9
20
|
def old_cache(path, check)
|
@@ -164,15 +175,13 @@ module RbbtRESTHelpers
|
|
164
175
|
list_id = "List of #{type} in table #{ @fragment }"
|
165
176
|
list_id << " (#{ @filter })" if @filter
|
166
177
|
Entity::List.save_list(type.to_s, list_id, list, user)
|
167
|
-
|
168
|
-
url = Entity::REST.entity_list_url(list_id, type)
|
178
|
+
url = Entity::REST.entity_list_url(list_id, type)
|
169
179
|
url = url + '?_layout=false' unless @layout
|
170
|
-
url =
|
180
|
+
url = escape_url(url)
|
171
181
|
redirect to(url)
|
172
182
|
when "map"
|
173
183
|
raw_tsv, tsv_options = load_tsv(fragment_file)
|
174
184
|
raw_tsv.unnamed = true
|
175
|
-
Log.tsv raw_tsv
|
176
185
|
tsv = tsv_process(raw_tsv)
|
177
186
|
|
178
187
|
field = tsv.key_field
|
@@ -189,7 +198,7 @@ module RbbtRESTHelpers
|
|
189
198
|
Entity::Map.save_map(type.to_s, column, map_id, tsv, user)
|
190
199
|
url = Entity::REST.entity_map_url(map_id, type, column)
|
191
200
|
url = url + '?_layout=false' unless @layout
|
192
|
-
url =
|
201
|
+
url = escape_url(url)
|
193
202
|
redirect to(url)
|
194
203
|
when "excel"
|
195
204
|
require 'rbbt/tsv/excel'
|
data/lib/rbbt/rest/workflow.rb
CHANGED
@@ -292,7 +292,7 @@ module Sinatra
|
|
292
292
|
job = consume_parameter(:job)
|
293
293
|
filename = params[:splat].first
|
294
294
|
|
295
|
-
raise Workflow::TaskNotFoundException.new workflow, task unless workflow.tasks.include?
|
295
|
+
raise Workflow::TaskNotFoundException.new workflow, task unless workflow.tasks.include?(task.to_sym)
|
296
296
|
|
297
297
|
execution_type = execution_type(workflow, task)
|
298
298
|
|
data/share/views/job_files.haml
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
.ui.buttons.job_control
|
2
|
-
|
2
|
+
- if Open.exists?(job.info_file)
|
3
|
+
%a.ui.small.basic.red.button(href="/#{[workflow.to_s, task, jobname] * "/"}?_update=clean") clean job
|
4
|
+
- else
|
5
|
+
%a.ui.small.basic.red.button.disabled(href="/#{[workflow.to_s, task, jobname] * "/"}?_update=clean") clean job
|
3
6
|
%a.ui.small.basic.blue.button(href="/#{[workflow.to_s, task, jobname, "info"] * "/"}") job info
|
4
7
|
- if job.files.any?
|
5
8
|
%a.ui.small.basic.blue.button(href="/#{[workflow.to_s, task, jobname, "files"] * "/"}") job files
|
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.8.
|
4
|
+
version: 1.8.150
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: therubyracer
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: sinatra-authorization
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|